{"id":551,"date":"2008-08-18T11:00:07","date_gmt":"2008-08-18T09:00:07","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=551"},"modified":"2016-09-09T18:45:18","modified_gmt":"2016-09-09T16:45:18","slug":"an-effect-of-excessive-rgb-conversion-onto-video-streaming-perofrmance-continued","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/551","title":{"rendered":"An effect of excessive RGB conversion on video streaming performance (continued)"},"content":{"rendered":"<p>This continues the topic raised by <a href=\"https:\/\/alax.info\/blog\/538\">previous post<\/a>. As fairly noticed by <a href=\"http:\/\/tmhare.mvps.org\/help.htm\">The March Hare<\/a>, video renderer is using hardware overlay and the benchmark is incorrect if we are to extrapolate the performance to scenario with multiple video renderers.<\/p>\n<p>So, an updated test application creates 16 video renderers with 16 threads pumping two meida samples through each of the 16 filter graphs.<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image001.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-552\" title=\"16 VMRs\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image001-300x203.png\" alt=\"\" width=\"300\" height=\"203\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image001-300x203.png 300w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image001.png 755w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p>Here go the results (in all tests CPU usage is maxed out):<\/p>\n<ul>\n<li>YUY2 Source -&gt; VMR: <span style=\"color: #0000ff;\"><strong>3,480 fps<\/strong><\/span><\/li>\n<li>YUY2 Source -&gt; AVI Decompressor (converts to 24-bit RGB) -&gt; Sample Grabber (without processing) -&gt; Color Space Converter (converts to 32-bit RGB) -&gt; VMR: <span style=\"color: #0000ff;\"><strong>560 fps<\/strong><\/span><\/li>\n<li>YUY2 Source -&gt; AVI Decompressor (converts to 32-bit RGB) -&gt; Color Space Converter -&gt; VMR: <span style=\"color: #0000ff;\"><strong>390 fps<\/strong><\/span><\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>For a comprehensive study, let us also measure direct rendering of 24-bit and 32-bit RGB data the way we stream YUY2:<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image002.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-556\" title=\"24-bit RGB to VMR\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image002-300x182.png\" alt=\"\" width=\"300\" height=\"182\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image002-300x182.png 300w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image002.png 1287w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image003.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-557\" title=\"32-bit RGB to VMR\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image003-300x182.png\" alt=\"\" width=\"300\" height=\"182\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image003-300x182.png 300w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image003.png 1287w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>It is worth mentioning that <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms787917(VS.85).aspx\">Video Mixing Renderer Filter<\/a> does not like 24-bit RGB on input and intelligent connect auto-inserts additional <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms781972(VS.85).aspx\">Color Space Converter Filter<\/a> to convert 24-bit RGB into 32-bit RGB.This explains better performance with 32-bit RGB.<\/p>\n<ul>\n<li>24-bit RGB Source -&gt; Color Space Converter (converts to 32-bit RGB) -&gt; VMR: <span style=\"color: #0000ff;\"><strong>1,175 fps<\/strong><\/span><\/li>\n<li>32-bit RGB Source -&gt; VMR: <span style=\"color: #0000ff;\"><strong>1,660 fps<\/strong><\/span><\/li>\n<\/ul>\n<p>Another popular YUV pixel format is <a href=\"http:\/\/fourcc.org\/yuv.php#YV12\">YV12<\/a>, which is also very much important as used as original output of <a href=\"http:\/\/en.wikipedia.org\/wiki\/MPEG-4\">MPEG-4<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/H.264\">H.264\/MPEG-4 AVC<\/a> decoders. It is also normally supported natively by hardware:<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image004.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-563\" title=\"DXCapsViewer FourCC Codes\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image004-300x237.png\" alt=\"\" width=\"300\" height=\"237\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image004-300x237.png 300w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2008\/08\/18-image004.png 618w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Performance tests repeat <a href=\"http:\/\/fourcc.org\/yuv.php#YUY2\">YUY2<\/a> frame rates with the difference for higher <a href=\"http:\/\/fourcc.org\/yuv.php#YV12\">YV12<\/a> rates because of more compact 12 bit per pixel format (as opposed to 16 bit <a href=\"http:\/\/fourcc.org\/yuv.php#YUY2\">YUY2<\/a>):<\/p>\n<ul>\n<li>YV12 Source -&gt; VMR: <span style=\"color: #0000ff;\"><strong>4,780 fps<\/strong><\/span><\/li>\n<li>YV12 Source -&gt; AVI Decompressor (converts to 24-bit RGB) -&gt; Sample Grabber (without processing) -&gt; Color Space Converter (converts to 32-bit RGB) -&gt; VMR: <span style=\"color: #0000ff;\"><strong>900 fps<\/strong><\/span><\/li>\n<li>YV12 Source -&gt; AVI Decompressor (converts to 32-bit RGB) -&gt; Color Space Converter -&gt; VMR: <span style=\"color: #0000ff;\"><strong>1,510 fps<\/strong><\/span><\/li>\n<\/ul>\n<p>The difference of <a href=\"http:\/\/fourcc.org\/yuv.php#YV12\">YV12<\/a> from <a href=\"http:\/\/fourcc.org\/yuv.php#YUY2\">YUY2<\/a> is that scenario with <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms787594(VS.85).aspx\">Sample Grabber Filter<\/a> removed shows [expectedly] higher frame rates than with 24-bit RGB sample grabber.<\/p>\n<h4>Download Information<\/h4>\n<ul>\n<li>Download (32-bit): <a href=\"http:\/\/trac.assembla.com\/roatl-utilities\/browser\/trunk\/FrameRateSample02\/Release\/FrameRateSample02.exe?format=raw\">FrameRateSample02.exe<\/a><\/li>\n<li>Partial Visual C++ 2008 Source Code: <a href=\"http:\/\/trac.assembla.com\/roatl-utilities\/browser\/trunk\/FrameRateSample02\">http:\/\/trac.assembla.com\/&#8230;\/FrameRateSample02<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/551\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,12,10],"tags":[78,103,101,488,102],"class_list":["post-551","post","type-post","status-publish","format-standard","hentry","category-source","category-technology","category-video","tag-directshow","tag-performance","tag-rgb","tag-source","tag-yuv"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=551"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/551\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}