<?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>i.MX ProcessorsのトピックRe: VPU Decoding after a seek into the video</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/VPU-Decoding-after-a-seek-into-the-video/m-p/150739#M1060</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are seeing after you seek are delta frames referencing frames before the key frame that were never given to the VPU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a few options, wait for an IDR frame which is not guaranteed in many content.&lt;/P&gt;&lt;P&gt;After the seek point, do not display b until a 2nd I or P frame is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Close and reopen VPU as this clears out reference of delta frames not given&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my experience closing and opening the VPU seems to solve almost all the problems for these type seek situations.&amp;nbsp; Memory does not have to be freed or cleared on this reset case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2012 20:24:30 GMT</pubDate>
    <dc:creator>LaurenPost</dc:creator>
    <dc:date>2012-11-01T20:24:30Z</dc:date>
    <item>
      <title>VPU Decoding after a seek into the video</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/VPU-Decoding-after-a-seek-into-the-video/m-p/150738#M1059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developping a video recorder/player application on an Imx53 board. I use VPU's codec mpeg4 to decode the video frames (from a video file). FFmpeg allow to use the AVI container for video storage.&lt;/P&gt;&lt;P&gt;When exclusive playback video, the decoding is correct. The problem occurs when I do a forward (or rewind) in the video :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Playing video, start decoding&lt;/SPAN&gt; :&lt;/P&gt;&lt;P&gt;1. Fill vpu buffer with encoded mpeg4 frames&lt;/P&gt;&lt;P&gt;2. Start one frame decoding : vpu_DecStartOneFrame()&lt;/P&gt;&lt;P&gt;3. Wait for completion decoding : while( vpu_IsBusy() !=0) { fill_vpu_buffer(); vpu_WaitForInt(); }&lt;/P&gt;&lt;P&gt;4. Catch up the result : vpu_DecGetOutputInfo() and vpu_DecClrDispFlag()&lt;/P&gt;&lt;P&gt;5. Display the decoded frame and return to step 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;When seek into the video, begin the seek process after step 5 (playing)&lt;/SPAN&gt; :&lt;/P&gt;&lt;P&gt;6. Flush the VPU input buffer : vpu_DecBitBufferFlush()&lt;/P&gt;&lt;P&gt;7. Seek into the video (to a IKeyFrame)&lt;/P&gt;&lt;P&gt;8. Fill vpu buffer with encoded mpeg4 frames : the first one is a IKey frame.&lt;/P&gt;&lt;P&gt;9. return to step 2 (playing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;After the seek process, the first decoded frame is dirty &lt;/STRONG&gt;&lt;SPAN lang="en"&gt;&lt;STRONG&gt;&lt;SPAN class="hps"&gt;although&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;it&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is a&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;SPAN class="hps"&gt;&lt;STRONG&gt;keyframe&lt;/STRONG&gt;. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang="en"&gt;Why &lt;SPAN class="hps"&gt;these results&lt;/SPAN&gt; ?&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;Thanks, best regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 08:19:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/VPU-Decoding-after-a-seek-into-the-video/m-p/150738#M1059</guid>
      <dc:creator>ronssehervé</dc:creator>
      <dc:date>2012-10-25T08:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: VPU Decoding after a seek into the video</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/VPU-Decoding-after-a-seek-into-the-video/m-p/150739#M1060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are seeing after you seek are delta frames referencing frames before the key frame that were never given to the VPU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a few options, wait for an IDR frame which is not guaranteed in many content.&lt;/P&gt;&lt;P&gt;After the seek point, do not display b until a 2nd I or P frame is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Close and reopen VPU as this clears out reference of delta frames not given&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my experience closing and opening the VPU seems to solve almost all the problems for these type seek situations.&amp;nbsp; Memory does not have to be freed or cleared on this reset case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 20:24:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/VPU-Decoding-after-a-seek-into-the-video/m-p/150739#M1060</guid>
      <dc:creator>LaurenPost</dc:creator>
      <dc:date>2012-11-01T20:24:30Z</dc:date>
    </item>
  </channel>
</rss>

