NorPix Directshow Codec

By: Norpix  09-12-2011

NorPix Codecs are DirectX based video encoders and decoders. Those codecs are based on Microsoft DirectX Media Object, allowing an excellent integration to all Windows based platforms.

NorPix decided to jump into the DirectShow codec arena for multiple reasons. First, many of our end users did not feel particularly satisfied with the codecs available on the market. Numerous times, customers reported poor efficiency and performance or stability issues when using third party codecs with StreamPix. Codec crashes would, for instance, lead to a StreamPix crash, resulting in a poor user experience. We felt that by having our own Codec, we would be better able to control any issues that came up and would be better equipped to fix the problem in a timely manner.

Current codec implementation provides two products:

  • NorPix MJPEG codec.
  • NorPix H.264 codec.

We may add more specific codecs in the future.

Our H.264 and MJPEG codec implementation is using low-level Intel libraries like IPP and Quick Sync Video, and therefore are fine-tuned for Intel multicore and multithreaded architecture. Latest revisions include support for the new Sandy Bridge processors that includes hardware accelerated H.264 encoding capability.

Our codec implementation was targeted to serve our end user, typically working with monochrome, color or raw Bayer sensor. The codecs include built-in functionalities to Bayer interpolate and color balance images before being compressed as well as a few other unique features. We have made sure the codecs support most of the StreamPix and TroublePix image formats the most natively as possible, reducing transcoding or image format conversion.

Codecs support concurrent multiple instance, so that when using multiple cameras, all streams can be compressed in parallel.

The H.264 codec is supported only with Window Vista or Windows 7 operating systems. It is not supported under Windows XP.

Example of H.264 codec performance:

    1920 x 1080 YUV422 to H264 1920 x 1080 Raw Bayer to H264
Core i3-2100T Preprocessing (CPU) 10 ms 15 ms
Compression Sandy Bridge CPU Sandy Bridge GPU Sandy Bridge CPU Sandy Bridge GPU
39 ms 13 ms 39 ms 13 ms
Total processing time 49 ms 23 ms 54 ms 28 ms
Core i7-2600 Preprocessing (CPU) 5 ms 9 ms
Compression Sandy Bridge CPU Sandy Bridge GPU Sandy Bridge CPU Sandy Bridge GPU
20 ms 13 ms 20 ms 13 ms
Total processing time 25 ms 18 ms 29 ms 21 ms

Preprocessing includes image conversion to an intermediate image format compatible with H.264 compression.
Bayer interpolation and white balancing are performed during preprocessing

Example of MJPEG codec performance:

Image size and type Frame rate CPU load
640x480 raw Bayer 200 55%
640x480 monochrome 200 50%
1920x1080 raw Bayer 30 80%
1920x1080 monochrome 30 70%

CPU load while real time encoding at the specified frame rate including concurrent StreamPix load with image capture, display and streaming to disk. Bayer interpolation included for raw format. Intel core i5-850 processor.

Codecs are available in 32 bit or 64 bit mode, and will be maintained. That includes bug fixes, improvements and we will provide tech support.

The codecs support the following image formats natively:

  • BYR1:
  • BYR2:
  • Y8:
  • Y16:
  • UIVY:
  • Y422:
  • UVY411:
  • YUV444:
  • RGB555:
  • RGB565:
  • RGB:
  • RGB32:
  • 8bit RAW format.
    12bit RAW format.
    8bit Gray format.
    12bit Gray format.
    UVY422 format.
    YUV422 format.
    YUV411 format.
    YUV444 format.
    RGB555 format.
    RGB565 format.
    RGB24 format.
    RGB with Alpha channel format.

    Codecs run identically with or without a license code. However, non-licensed versions will print a watermark on generated encoded images.

    Using the codecs:

    Codec Settings can be accessed via properties dialog of each application using the codec. In case the calling application does not provide any option to access the codec setting, you can run the following utility to access each codec setting:

    "All Programs | Norpix | NpxCodec | Codec Settings":

    Codecs include 4 setting pages:

    H.264 Encoding Page:

    • Encoding Profile:
      • High Profile: Use YUV420 color coding.
      • BaseLine: Recommended for monochrome image.
      • Main Profile: Use YUV420 color coding.
    • GOP size: The number of frames to be part of the same group of frames. The larger the GOP size is, the less key frames are inserted with the cost of longer seek time.
    • Bit Rate: Stream bit rate per second of content.
    • Number of Core for Encoding: Instruct the codec about the number of CPU core to use. It is not recommended to use all cores for real time encoding, since CPU resources may not be available to service other StreamPix capture and streaming threads.

    MJPEG codec settings

    • Quality: The jpeg compression quality. 100% quality will give best image quality with low compression factor.

    Bayer Conversion

    Parameters for embedded raw to Bayer interpolation: Before encoding an image, raw Bayer image can be color interpolated. Note that if Bayer is enabled, monochrome image will be interpolated too.

    • Enable/Disable conversion. Only useful if processing a raw Bayer image.
    • Bayer Pattern: Select the Bayer pattern matching your sensor.

    White Balancing

    Following a Bayer interpolation, or if image format is RGB, codec can perform some automatic white balance correction. Furthermore, one can define a region on the image to be used as a reference for white balance calculation.

    • Enable: Enable/Disable auto white balance.
    • Algorithm:
      • Mean Equalization
      • Gray Word
      • Standard Deviation
      • Mean and Standard Deviation
    • ROI: define WB area

    Linear Shift

    Linear window leveling can be performed for pixel depth greater that 8 bits before encoding. By default, encoder will always keep the 8 most significant bits of captured images. Window leveling can be used to force the usage of other bit range:

    As an example, a 10 bit image can be leveled in 3 ways:

    • 8 most significant bits (bit 2 to 10, default)
    • 8 middle significant bits (bit 1 to 9)
    • 8 least significant bits (bit 0 to 7)

    Pseudo Color

    This can be used for remapping monochrome image to pseudo color. Currently, 2 predefined look up table functions are available. Please contact Norpix if you feel more LUT should be added.

    Available predefined LUTs are:

    Pseudo color cannot be used with true color RGB or YUV images.

    NorPix Lookup table

    A text file, comma separated that can be generated (save Excel file as a .csv format) and can be used to force pixel intensity remapping to pseudo color.


    #Index, Blue, Green, Red Remapping value
    0, 255, 0, 0 : gray level 0 will be Remapping as pure blue,
    1, 10, 10, ,: gray level 1 will be Remapping as Blue = 10, Green = 10, Red default
    [200,255], 255, 255, 255: gray levels 200 to 255 are Remapping to pure white


    Correct image temperature.
    The range is between 5000K-20000K.

    Only useful for color images.


    The American Society of Cinematographers Color Decision List (ASC CDL) has defined a format for the exchange of basic primary color grading information. A 3 parameters formula can be used to define most possible remapping and color correction.

    The formula for ASC CDL color correction is:

    out = (i*s +o)p


    • out is the color graded pixel code value.
    • i is the input pixel code value (0=black, 1=white).
    • s is slope (any number 0 or greater, nominal value is 1.0).
    • o is offset (any number, nominal value is 0).
    • p is power (any number greater than 0, nominal value is 1.0).

    FourCC settings

    Each codec is uniquely identified by a FourCC code. Mediaplayer application can identify what codec has been used to encode the video and search for a corresponding decoder.

    By default, the codec will use standard FourCC name, to allow any MJPEG or H.264 compatible decoder to render the images. That means there is no need to install NorPix codec on playback computers when default FourCC names are used.

    If you encounter playback issues, or prefer the end user to use the NorPix codec for decoding, set the FourCC to be either NPXJ for MJPEG or NPXH for H.264.

    Licencing the codec

    To avoid the watermark on encoded image, make sure to register the codec. Provide a user name and Norpix will send you a valid key.

    Contact Norpix

    Email - none provided

    Print this page

    Other products and services from Norpix


    StreamPix Single and Multiple Camera Video Recording and PlayBack software

    The number of cameras supported is only limited by a condition wherein the combined data rate of the cameras exceeds the internal bus bandwidth or processor capabilities of the computer. Resulting from more than 10 years of interaction with our vast group of customers, StreamPix has become the ultimate Digital Video Recording software.


    TrouplePix, Single Camera DVR Software

    TroublePix is a digital video recording software designed for factory floor applications or requirements needing a simple user interface. TroublePix provides features such as looping, Pre/Post triggering, event marking and much more. With TroublePix, you can acquire, view and review all within the same user interface.


    HERMES API. DVR Software Development Kit

    HERMES is a set of C/C++ callable objects and functions that can be added to your own application to handle image capture, image recording and playback, as well as image display and exporting. Adjust camera parameters such as gain, brightness, shutter, gamma, hue, saturation, white balance. Connect to any of the over one hundred frame grabbers and cameras supported by NorPix.


    Streampix 5 Product Comparison Chart

    High Speed Digital Video Recording Software and Solutions. Supports 100+ camera lines from the best manufacturers. Export a sequence file + AUD file to an AVI file. Capture video to sequence file in RAM. Capture video and audio to AVI file.



    If the video source supports multicasting, multiple instances of the viewer can run simultaneously on different network computers, allowing multiple screens to display the same images from a single source. Note that in multi view, the number of rows and columns defining the layout depends on your Video Layout X and Video Layout Y system settings, which can be adjusted through the File> Setup menu.