<?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 Re: high context switching when multi threading VC1 encoder in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/high-context-switching-when-multi-threading-VC1-encoder/m-p/860629#M7707</link>
    <description>As additionnal info, it's exactly two unique function calls in intra mb encoding which trigger the problem (&lt;B&gt;ippiSubC_16s_C1IRSfs&lt;/B&gt; and &lt;B&gt;ippiAddC_16s_C1IRSfs&lt;/B&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;umc_vc1_enc_picture_sm.cpp:1362 &lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt; //only intra blocks:&lt;BR /&gt;&lt;BR /&gt; for (blk = 0; blk&amp;lt;6; blk++)&lt;BR /&gt;&lt;BR /&gt; {&lt;BR /&gt;&lt;BR /&gt; roiSize.height = 8;&lt;BR /&gt;&lt;BR /&gt; roiSize.width = 8;&lt;BR /&gt;&lt;BR /&gt;IPP_STAT_START_TIME(m_IppStat-&amp;gt;IppStartTime);&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;FONT color="#ff0000"&gt;_own_Diff8x8C_16s(128, pCurMBData-&amp;gt;m_pBlock[blk], pCurMBData-&amp;gt;m_uiBlockStep[blk], roiSize, 0);&lt;/FONT&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;IPP_STAT_END_TIME(m_IppStat-&amp;gt;IppStartTime, m_IppStat-&amp;gt;IppEndTime, m_IppStat-&amp;gt;IppTotalTime);&lt;BR /&gt;&lt;BR /&gt;STATISTICS_START_TIME(m_TStat-&amp;gt;FwdQT_StartTime);&lt;BR /&gt;&lt;BR /&gt; IntraTransformQuantACFunction(pCurMBData-&amp;gt;m_pBlock[blk], pCurMBData-&amp;gt;m_uiBlockStep[blk],&lt;BR /&gt;&lt;BR /&gt; DCQuant, doubleQuant);&lt;BR /&gt;&lt;BR /&gt;STATISTICS_END_TIME(m_TStat-&amp;gt;FwdQT_StartTime, m_TStat-&amp;gt;FwdQT_EndTime, m_TStat-&amp;gt;FwdQT_TotalTime);&lt;BR /&gt;&lt;BR /&gt; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;umc_vc1_enc_picture_sm.cpp:1449&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt; for (blk=0;blk&amp;lt;6; blk++)&lt;BR /&gt;&lt;BR /&gt; {&lt;BR /&gt;&lt;BR /&gt;STATISTICS_START_TIME(m_TStat-&amp;gt;InvQT_StartTime);&lt;BR /&gt;&lt;BR /&gt; IntraInvTransformQuantACFunction(pCurMBData-&amp;gt;m_pBlock[blk],pCurMBData-&amp;gt;m_uiBlockStep[blk],&lt;BR /&gt;&lt;BR /&gt; TempBlock.m_pBlock[blk],TempBlock.m_uiBlockStep[blk],&lt;BR /&gt;&lt;BR /&gt; DCQuant, doubleQuant);&lt;BR /&gt;&lt;BR /&gt;STATISTICS_END_TIME(m_TStat-&amp;gt;InvQT_StartTime, m_TStat-&amp;gt;InvQT_EndTime, m_TStat-&amp;gt;InvQT_TotalTime);&lt;BR /&gt;&lt;BR /&gt;IPP_STAT_START_TIME(m_IppStat-&amp;gt;IppStartTime);&lt;BR /&gt;&lt;BR /&gt;
 &lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#ff0000" face="Courier New"&gt;_own_Add8x8C_16s(128, TempBlock.m_pBlock[blk],TempBlock.m_uiBlockStep[blk],roiSize,0);&lt;/FONT&gt;&lt;/B&gt;&lt;FONT face="Courier New"&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;IPP_STAT_END_TIME(m_IppStat-&amp;gt;IppStartTime, m_IppStat-&amp;gt;IppEndTime, m_IppStat-&amp;gt;IppTotalTime);&lt;BR /&gt;&lt;BR /&gt; }&lt;/FONT&gt;&lt;/PRE&gt;&lt;BR /&gt;Meanwhile, I've fixed my issue by writing custom unoptimized replacement function for those two cases.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 10 Jul 2008 14:21:12 GMT</pubDate>
    <dc:creator>vanista</dc:creator>
    <dc:date>2008-07-10T14:21:12Z</dc:date>
    <item>
      <title>high context switching when multi threading VC1 encoder</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/high-context-switching-when-multi-threading-VC1-encoder/m-p/860628#M7706</link>
      <description>I have an issue with the VC1 encoder from IPP sample code. I don't think the issue is directly related to this codec though.&lt;BR /&gt;&lt;BR /&gt;If  in a same process I run a number of encoding threads that exceeds the number of CPU cores on the host, the number of contex switches jumps over 1 million per second (compared to 3000 per second in normal maximum load conditions) and the CPU usage suffers from 50% system overhead.&lt;BR /&gt;&lt;BR /&gt;I'm using IPP v5.3.1.062&lt;BR /&gt;&lt;BR /&gt;I was able to isolate some parts of the code which trigger the c-switch bomb, for one I identified the ippAddC function to be in cause.&lt;BR /&gt;&lt;BR /&gt;From what the doc says this function is thread optimized, so I wonder if there could be a conflict between this and linux kernel thread handling&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Jul 2008 02:20:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/high-context-switching-when-multi-threading-VC1-encoder/m-p/860628#M7706</guid>
      <dc:creator>vanista</dc:creator>
      <dc:date>2008-07-09T02:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: high context switching when multi threading VC1 encoder</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/high-context-switching-when-multi-threading-VC1-encoder/m-p/860629#M7707</link>
      <description>As additionnal info, it's exactly two unique function calls in intra mb encoding which trigger the problem (&lt;B&gt;ippiSubC_16s_C1IRSfs&lt;/B&gt; and &lt;B&gt;ippiAddC_16s_C1IRSfs&lt;/B&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;umc_vc1_enc_picture_sm.cpp:1362 &lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt; //only intra blocks:&lt;BR /&gt;&lt;BR /&gt; for (blk = 0; blk&amp;lt;6; blk++)&lt;BR /&gt;&lt;BR /&gt; {&lt;BR /&gt;&lt;BR /&gt; roiSize.height = 8;&lt;BR /&gt;&lt;BR /&gt; roiSize.width = 8;&lt;BR /&gt;&lt;BR /&gt;IPP_STAT_START_TIME(m_IppStat-&amp;gt;IppStartTime);&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;FONT color="#ff0000"&gt;_own_Diff8x8C_16s(128, pCurMBData-&amp;gt;m_pBlock[blk], pCurMBData-&amp;gt;m_uiBlockStep[blk], roiSize, 0);&lt;/FONT&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;IPP_STAT_END_TIME(m_IppStat-&amp;gt;IppStartTime, m_IppStat-&amp;gt;IppEndTime, m_IppStat-&amp;gt;IppTotalTime);&lt;BR /&gt;&lt;BR /&gt;STATISTICS_START_TIME(m_TStat-&amp;gt;FwdQT_StartTime);&lt;BR /&gt;&lt;BR /&gt; IntraTransformQuantACFunction(pCurMBData-&amp;gt;m_pBlock[blk], pCurMBData-&amp;gt;m_uiBlockStep[blk],&lt;BR /&gt;&lt;BR /&gt; DCQuant, doubleQuant);&lt;BR /&gt;&lt;BR /&gt;STATISTICS_END_TIME(m_TStat-&amp;gt;FwdQT_StartTime, m_TStat-&amp;gt;FwdQT_EndTime, m_TStat-&amp;gt;FwdQT_TotalTime);&lt;BR /&gt;&lt;BR /&gt; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;umc_vc1_enc_picture_sm.cpp:1449&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt; for (blk=0;blk&amp;lt;6; blk++)&lt;BR /&gt;&lt;BR /&gt; {&lt;BR /&gt;&lt;BR /&gt;STATISTICS_START_TIME(m_TStat-&amp;gt;InvQT_StartTime);&lt;BR /&gt;&lt;BR /&gt; IntraInvTransformQuantACFunction(pCurMBData-&amp;gt;m_pBlock[blk],pCurMBData-&amp;gt;m_uiBlockStep[blk],&lt;BR /&gt;&lt;BR /&gt; TempBlock.m_pBlock[blk],TempBlock.m_uiBlockStep[blk],&lt;BR /&gt;&lt;BR /&gt; DCQuant, doubleQuant);&lt;BR /&gt;&lt;BR /&gt;STATISTICS_END_TIME(m_TStat-&amp;gt;InvQT_StartTime, m_TStat-&amp;gt;InvQT_EndTime, m_TStat-&amp;gt;InvQT_TotalTime);&lt;BR /&gt;&lt;BR /&gt;IPP_STAT_START_TIME(m_IppStat-&amp;gt;IppStartTime);&lt;BR /&gt;&lt;BR /&gt;
 &lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#ff0000" face="Courier New"&gt;_own_Add8x8C_16s(128, TempBlock.m_pBlock[blk],TempBlock.m_uiBlockStep[blk],roiSize,0);&lt;/FONT&gt;&lt;/B&gt;&lt;FONT face="Courier New"&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;IPP_STAT_END_TIME(m_IppStat-&amp;gt;IppStartTime, m_IppStat-&amp;gt;IppEndTime, m_IppStat-&amp;gt;IppTotalTime);&lt;BR /&gt;&lt;BR /&gt; }&lt;/FONT&gt;&lt;/PRE&gt;&lt;BR /&gt;Meanwhile, I've fixed my issue by writing custom unoptimized replacement function for those two cases.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Jul 2008 14:21:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/high-context-switching-when-multi-threading-VC1-encoder/m-p/860629#M7707</guid>
      <dc:creator>vanista</dc:creator>
      <dc:date>2008-07-10T14:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: high context switching when multi threading VC1 encoder</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/high-context-switching-when-multi-threading-VC1-encoder/m-p/860630#M7708</link>
      <description>Hello vanista,&lt;BR /&gt;&lt;BR /&gt;How are you linking with Intel IPP libraries? Internal threading within IPP functions (ippAddC ) are only enabled when you link with IPP dynamic library or threaded static libraries. If you are using static library, it will include none threaded functions.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Aug 2008 07:40:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/high-context-switching-when-multi-threading-VC1-encoder/m-p/860630#M7708</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2008-08-06T07:40:53Z</dc:date>
    </item>
  </channel>
</rss>

