An effect of excessive RGB conversion on video streaming performance (continued)

This continues the topic raised by previous post. As fairly noticed by The March Hare, video renderer is using hardware overlay and the benchmark is incorrect if we are to extrapolate the performance to scenario with multiple video renderers.

So, an updated test application creates 16 video renderers with 16 threads pumping two meida samples through each of the 16 filter graphs.

The screen shot shows that there is only one video overlay in use (which image was not captured and blackness is shown instead), so results may be inaccurate for one of the graph among 16. In this simple test I disregard this.

Here go the results (in all tests CPU usage is maxed out):

  • YUY2 Source -> VMR: 3,480 fps
  • YUY2 Source -> AVI Decompressor (converts to 24-bit RGB) -> Sample Grabber (without processing) -> Color Space Converter (converts to 32-bit RGB) -> VMR: 560 fps
  • YUY2 Source -> AVI Decompressor (converts to 32-bit RGB) -> Color Space Converter -> VMR: 390 fps

For a comprehensive study, let us also measure direct rendering of 24-bit and 32-bit RGB data the way we stream YUY2:

It is worth mentioning that Video Mixing Renderer Filter does not like 24-bit RGB on input and intelligent connect auto-inserts additional Color Space Converter Filter to convert 24-bit RGB into 32-bit RGB.This explains better performance with 32-bit RGB.

  • 24-bit RGB Source -> Color Space Converter (converts to 32-bit RGB) -> VMR: 1,175 fps
  • 32-bit RGB Source -> VMR: 1,660 fps

Another popular YUV pixel format is YV12, which is also very much important as used as original output of MPEG-4 and H.264/MPEG-4 AVC decoders. It is also normally supported natively by hardware:

Performance tests repeat YUY2 frame rates with the difference for higher YV12 rates because of more compact 12 bit per pixel format (as opposed to 16 bit YUY2):

  • YV12 Source -> VMR: 4,780 fps
  • YV12 Source -> AVI Decompressor (converts to 24-bit RGB) -> Sample Grabber (without processing) -> Color Space Converter (converts to 32-bit RGB) -> VMR: 900 fps
  • YV12 Source -> AVI Decompressor (converts to 32-bit RGB) -> Color Space Converter -> VMR: 1,510 fps

The difference of YV12 from YUY2 is that scenario with Sample Grabber Filter removed shows [expectedly] higher frame rates than with 24-bit RGB sample grabber.

Download Information

One Reply to “An effect of excessive RGB conversion on video streaming performance (continued)”

  1. Added support for more source media types:

    MEDIASUBTYPE_ARGB32
    MEDIASUBTYPE_A2R10G10B10 *2 (does not work for me)
    MEDIASUBTYPE_A2B10G10R10 *2 (does not work for me)
    MEDIASUBTYPE_RGB555 *1
    MEDIASUBTYPE_RGB565 *1
    MEDIASUBTYPE_ARGB1555 *2 (does not work for me)
    MEDIASUBTYPE_ARGB4444 *2 (does not work for me)

    *1 – defined using BI_BITFIELDS, however it is also possible to use BI_RGB (source code change required)
    *2 – defined using BI_BITFIELDS

    A Visual C++ .NET 2008 source code is available from SVN.

    See Also: Uncompressed RGB Video Subtypes

Leave a Reply