DShow does not use NV12/YV12 surface RRS feed

  • Question

  • Hello,
    I'm using WCE 6 and have a filter that offers output pin for RGB565 and NV12.
    My display driver can create overlay surface with NV12 and RGB565.
    But I have seen, that DShow VideoRenderer do NOT use YUV surface.
    In documentation I can read, that DShow alwys needs RGB output pin for still image.
    When it starts RUN mode, it switches to YUV surface.
    All what I see is that with RUN mode it starts using flipping RGB surface.

    Any idea what I can check ?

    Thanks for your help


    Monday, October 4, 2010 12:29 PM

All replies

  • Hi,
    Normally as you said for PREVIEW mode DShow will use YUV output.For STILL mode we can use RGB output.
    If your display driver has support for DDRAW then renderer check the hardware capabilities and will use the hardware YUV layer accordingly to render your YV12 output.
    You can check by printing the filter graph to check whether it is adding Color space convertor filter before renderer for converting the YUV to RGB output.
    How did you verified it is not using hardware overlay surface?
    Monday, October 4, 2010 6:19 PM
  • Hello,

    I verified it by printing the filter graph. That means using debug version of quart.dll and set debug zones accordingly.
    I have tried different things:
    1.) In case my filter only outputs YV12, colorspace converter is inserted in filter graph for still and run image.
    2.) In case my filter supports YV12 and RGB, RGB pin is used for still and run image.
    3.) In case my filter supports only NV12, filter grapg can't build because standard color space converter has no input pin accepting NV12.
    4.) In case my filter supports NV12 and RGB, RGB pin is used for still and run image.

    So you can see, I have tried a lot but without success.

    Any ideas what I can check ?

    Thank you







    Tuesday, October 5, 2010 8:33 AM
  • From your findings it looks like your display driver is not exposing the YUV hardware layer capablities.If it is exposing then DShow renderer will make use of it automatically without using Color Space conversion.
    To verify whether your display driver has the YUV hardware layer support,you can check with the following sample application.
    Wednesday, October 6, 2010 6:06 AM
  • I have already tested the sample MOSQUITO. It runs without problems.

    Any ideas ?

    Thank you


    Wednesday, October 6, 2010 5:15 PM
  • Sample MOSQUITO application is compiled as library in the public/directx folder but from where it exe is been created.


    If i compile it as a seperate exe in the BSP by including relevent files. At run time DirectDrawCreate() failes always.




    Wednesday, October 6, 2010 5:38 PM
  • Hi Holger,
    By default the mosquito application will check for Only the RGB surface support of the display driver.But for testing the YUV surface capablities you need to uncomment the YUV formats in the following ddpfOverlayFormats array.
        {sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('Y','U','Y','V'),0,0,0,0,0},  // YUYV
        {sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('U','Y','V','Y'),0,0,0,0,0},  // UYVY
    After doing this changes you can check the application on the device to verify the YUV surface capablities of the display driver.
    Wednesday, October 6, 2010 9:06 PM
  • Hi Misbah,
    During SYSGEN phase only it will be created as binary.If you have copied the MOSQUITO folder to your BSP folder,then you need to change the sources file to compile it as application binary.These information will be found on the makefile which is used during sysgen phase,
    modify the sources file of the mosquito application inside your BSP.And also add the dependency dlls for the linker.
                          $(SG_OUTPUT_SDKLIB)\ddguid.lib, \
    Wednesday, October 6, 2010 9:08 PM
  • Hello Prabu,

    I have now enabled usage of  YUV surfaces in MOSQUITO.

     {sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('Y','U','Y','V'),0,0,0,0,0},  // YUYV

    Works without problems. Now I have changed above line to

    and it fails in DirecDraw UpdateOverlay function. That menas it fails before calling my display driver.

    53597 PID:23a004e TID:23b004e 888 ColorKeyLow:0xff0000, High:0x0

    54571 PID:400002 TID:23b004e Source color-space keying for overlays not supported.

    54629 PID:23a004e TID:23b004e GWES Hook fails to update overlay. IDirectDrawSurface::UpdateOverlay fails.

    54630 PID:23a004e TID:23b004e *** UNLOCK_DD

    Any ideas ?>



    Thursday, October 7, 2010 3:50 PM
  • Hello,

    I have now the sample MOSQUITO with NV12 support running.

    I have added the following two defines

    DDOVERLAYCAPS_CKEYSRCCLRSPACE | // Supports source color-space keying for overlays.
    DDOVERLAYCAPS_CKEYSRCCLRSPACEYUV | // Supports source color-space keying for overlays with FOURCC pixel formats.


    // General overlay capabilities.

    in file halcaps.cpp.

    After this modification mosquito works.

    But, my original problem with the video renderer still exists. Means, DShow doesn't use YUV support of my video driver to show video.

    Can anybody help ?



    Tuesday, October 12, 2010 7:54 AM