<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Slow H264 encoding - How to speed up? in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784806#M1874</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Are you testing with the umc_video_enc_con application with the sample code? I agree this may not be related to OpenMP threading, since it even cannot take the usage of the single core. Also, how are you reading the input data file, will it potentially have any IO problem there?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chao&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jul 2010 03:03:07 GMT</pubDate>
    <dc:creator>Chao_Y_Intel</dc:creator>
    <dc:date>2010-07-09T03:03:07Z</dc:date>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784803#M1871</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I know there's tons of post on this subject - but I think I've read all of them and I'm still stuck and now wondering if this is even possible. I also tried the recommended settings in posts such as: &lt;A href="http://software.intel.com/en-us/articles/setting-h264-encoding-parameters-in-intel-ipp-media-processing-samples/" target="_blank"&gt;http://software.intel.com/en-us/articles/setting-h264-encoding-parameters-in-intel-ipp-media-processing-samples/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My goal is to encode 1280x720 at 30fps at &amp;gt;= 1mbps for live conferencing. I need the encode to take no longer than 33ms per frame.&lt;BR /&gt;&lt;BR /&gt;No matter what settings I use (on H264EncoderParams) I can't get the encode time lower than 40ms (unless i sacrifice bitrate).&lt;BR /&gt;&lt;BR /&gt;First...&lt;BR /&gt;I've tested on a dual core and a quad core (~2ghz) and the performance was about the same: &amp;gt;70% on either machine (with all cores working). Encode time ~40-60ms.&lt;BR /&gt;&lt;BR /&gt;Then...&lt;BR /&gt;I found a post suggesting to remove OpenMP if you are using UMC from within a multithreaded environment (which I am). So I removed it and now the performance is: ~70% of just one core on either machine. &lt;BR /&gt;&lt;BR /&gt;Problem:&lt;BR /&gt;Unfortunately though, the encode time is still ~40ms.&lt;BR /&gt;&lt;BR /&gt;Is there anything that can be done here? Any changes to the UMC code perhaps (this almost seems like an artificial delay)? I have CPU cores just sitting there waiting to do the work - is it even possible to parallelize in a beneficial way at this point? Or is this the limit with this encoder?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 07 Jul 2010 01:53:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784803#M1871</guid>
      <dc:creator>sheado</dc:creator>
      <dc:date>2010-07-07T01:53:13Z</dc:date>
    </item>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784804#M1872</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;For enabling encoder threading, the slide number need to be set to the threading number. Is the parameter be changed?&lt;/P&gt;&lt;P&gt;2 1 4 /* num_ref_frames (2-16), minimum length of list1 for backward prediction (only 1 is supported!), number of slices. */&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chao &lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2010 01:42:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784804#M1872</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2010-07-08T01:42:15Z</dc:date>
    </item>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784805#M1873</link>
      <description>Hi Chao,&lt;BR /&gt;&lt;BR /&gt;Thanks for the response.&lt;BR /&gt;&lt;BR /&gt;I tried 2 1 4 with no luck. I tried it with and without OpenMP. Here are some performance numbers:&lt;BR /&gt;&lt;BR /&gt;With OpenMP:&lt;BR /&gt;&lt;META name="qrichtext" content="1" /&gt;&lt;META http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;&lt;STYLE type="text/css"&gt;&amp;lt;!--
p, li { white-space: pre-wrap; }
--&amp;gt;&lt;/STYLE&gt;
&lt;P&gt;&lt;!--StartFragment--&gt;Cpu0  : &lt;B&gt;62.9%&lt;/B&gt;us,  3.6%sy,  0.0%ni, 32.8%id,  0.7%wa,  0.0%hi,  0.0%si,  0.0%st&lt;/P&gt;
&lt;P&gt;Cpu1  : &lt;B&gt;46.7%&lt;/B&gt;us,  2.9%sy,  0.0%ni, 50.0%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st&lt;/P&gt;
&lt;P&gt;Cpu2  : &lt;B&gt;48.5%&lt;/B&gt;us,  3.3%sy,  0.0%ni, 46.9%id,  1.0%wa,  0.0%hi,  0.3%si,  0.0%st&lt;/P&gt;
&lt;P&gt;Cpu3  : &lt;B&gt;48.9%&lt;/B&gt;us,  3.0%sy,  0.0%ni, 48.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st&lt;/P&gt;
&lt;P&gt;&lt;B&gt;~70-120ms per frame&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Without  OpenMP&lt;/P&gt;
&lt;P&gt;Cpu0  :  0.3%us,  1.3%sy,  0.0%ni, 98.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st&lt;/P&gt;
&lt;P&gt;Cpu1  : &lt;B&gt;82.5%&lt;/B&gt;us,  0.3%sy,  0.0%ni, 17.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st&lt;/P&gt;
&lt;P&gt;Cpu2  :  3.6%us,  1.0%sy,  0.0%ni, 95.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st&lt;/P&gt;
&lt;P&gt;Cpu3  :  0.3%us,  0.0%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st&lt;/P&gt;
&lt;P&gt;&lt;B&gt;~45ms per frame&lt;/B&gt;&lt;!--EndFragment--&gt;&lt;/P&gt;Again my goal is to get it down to &lt;B&gt;32ms&lt;/B&gt; per frame.&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;I found the following article regarding OpenMP thread block issues under certain circumstances: &lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/articles/high-cpu-usage-and-intel-ipp-threaded-function/" target="_blank"&gt;http://software.intel.com/en-us/articles/high-cpu-usage-and-intel-ipp-threaded-function/&lt;/A&gt;&lt;BR /&gt;Following their advice I set KMP_BLOCKTIME to 0, but did not see any improvements.&lt;BR /&gt;&lt;BR /&gt;I also found this forum post (with accepted answer) saying that OpenMP does not work within a threaded environment: &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=73301&amp;amp;o=a&amp;amp;s=lr" target="_blank"&gt;http://software.intel.com/en-us/forums/showthread.php?t=73301&amp;amp;o=a&amp;amp;s=lr&lt;/A&gt;&lt;BR /&gt;Recommendation is to disable threading.&lt;BR /&gt;&lt;BR /&gt;Despite all this, I have a feeling the slow frame compression time has nothing to do with CPU ability. Even when running on a single core I'm getting less than 100% utilization. That tells me that there's something in the UMC H264 encoder that's sleeping, buffering, or lagging an unecessarily long amount. &lt;BR /&gt;&lt;BR /&gt;Can anybody who knows the UMC code well point me at a part of the code where I can make the necessary changes to suit my needs?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jul 2010 19:34:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784805#M1873</guid>
      <dc:creator>sheado</dc:creator>
      <dc:date>2010-07-08T19:34:06Z</dc:date>
    </item>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784806#M1874</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Are you testing with the umc_video_enc_con application with the sample code? I agree this may not be related to OpenMP threading, since it even cannot take the usage of the single core. Also, how are you reading the input data file, will it potentially have any IO problem there?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chao&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2010 03:03:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784806#M1874</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2010-07-09T03:03:07Z</dc:date>
    </item>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784807#M1875</link>
      <description>Hi Chao,&lt;BR /&gt;&lt;BR /&gt;My video IO is not blocking. If I test just with camera preview I can get 30fps at less than 10% CPU.&lt;BR /&gt;&lt;BR /&gt;I am testing with my own code and the main slow down is observed where I call: &lt;BR /&gt;&lt;I&gt;UMC::H264VideoEncoder.GetFrame( in, out );&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;I'm using clock() around the call to GetFrame() to measure the elapsed time, and then I average the results over 60 frames. The average time GetFrame() takes to complete is ~40-60ms.&lt;BR /&gt;&lt;BR /&gt;Is there anything I can do? Or is the UMC H264 encoder not designed for realtime HD encoding?&lt;BR /&gt;&lt;BR /&gt;Thank You.</description>
      <pubDate>Tue, 13 Jul 2010 17:51:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784807#M1875</guid>
      <dc:creator>sheado</dc:creator>
      <dc:date>2010-07-13T17:51:57Z</dc:date>
    </item>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784808#M1876</link>
      <description>Hello Sheado,&lt;BR /&gt;&lt;BR /&gt;Did you get any further with this issue ?&lt;BR /&gt;&lt;BR /&gt;I having the same problem and wondered if you have gotten any further.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Jacob</description>
      <pubDate>Mon, 23 Aug 2010 14:03:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784808#M1876</guid>
      <dc:creator>jacobh</dc:creator>
      <dc:date>2010-08-23T14:03:30Z</dc:date>
    </item>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784809#M1877</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am not sure there are much you can do without modifying the mode decision/motion estimation algorithm in the encoder itself (there are several shortcuts that can be taken the lower the encode quality a bit but decrease the encoding time).&lt;BR /&gt;&lt;BR /&gt;There are two steps that I can think of that can improve the performance a bit without too much work.&lt;BR /&gt;&lt;BR /&gt;Check if you can get I420 or YV12 directly out of the device to avoid having to do any color conversion in the encoder.&lt;BR /&gt;&lt;BR /&gt;In H264CoreEncoder_Init, you should be able to disable the ANALYSE_FRAME_TYPE flag. This is use for scene cut detection that you probably don't need if the video comes from a capture device. If remember correctly this use to take a little chunk of CPU.&lt;BR /&gt;&lt;BR /&gt;Emmanuel&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Aug 2010 03:47:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784809#M1877</guid>
      <dc:creator>Emmanuel_W_</dc:creator>
      <dc:date>2010-08-24T03:47:04Z</dc:date>
    </item>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784810#M1878</link>
      <description>Hi Jacob &amp;amp; Emmanuel,&lt;BR /&gt;&lt;BR /&gt;i pretty much gave up on this and moved on to other encoders. When i was testing i did use YV12, but I never tried disabling ANALYSE_FRAME_TYPE. After sifting through the forums it seemed to me like this will require changes to the encoder to get the performance improvement we're looking for.&lt;BR /&gt;&lt;BR /&gt;Sheado&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Aug 2010 20:08:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784810#M1878</guid>
      <dc:creator>sheado</dc:creator>
      <dc:date>2010-08-24T20:08:30Z</dc:date>
    </item>
    <item>
      <title>Slow H264 encoding - How to speed up?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784811#M1879</link>
      <description>&lt;P&gt;Hi Jacob and Sheado,&lt;/P&gt;&lt;P&gt;The test results showed that the threaded version of encoder is much slower than the non-threaded version.&lt;/P&gt;&lt;P&gt;With OpenMP:&lt;BR /&gt;~70-120ms per frame&lt;/P&gt;&lt;P&gt;Without OpenMP&lt;BR /&gt;~45ms per frame&lt;/P&gt;&lt;P&gt;This does not look to be expected. &lt;/P&gt;&lt;P&gt;Could you test with IPP sample application 'umc_video_enc_con', and check if it produce similar performance result? If the performance is different, the problem may be related to the usage of the Codec.&lt;/P&gt;&lt;P&gt;If umc_video_enc_con application also produce such result, possibly you can provide the encoding par file, and bit stream, so we can have a check about the problem.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Chao &lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2010 07:37:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Slow-H264-encoding-How-to-speed-up/m-p/784811#M1879</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2010-08-25T07:37:32Z</dc:date>
    </item>
  </channel>
</rss>

