<?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: [iMX8MP] How to decode a single frame within an H264 data in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2103002#M237511</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt;what kind of streaming do you need to decode?&amp;nbsp;&lt;BR /&gt;I said in my OP that my input is H264 data&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I don't think raw P frame append to the I frame is correct procedure, you also can refer to the nxp source code for reference&lt;BR /&gt;Input H264 data is set to&amp;nbsp;VpuBufferNode then passed to VPU_DecDecodeBuf().&lt;BR /&gt;If originally the H264 data has both I and P Frames before setting to&amp;nbsp;VpuBufferNode, decoding works.&lt;BR /&gt;(1st call of VPU_DecDecodeBuf() decodes I, then 2nd call decodes P)&lt;BR /&gt;&lt;BR /&gt;However, if original input H264 data only has I frame, then P frame was created separately so it has to be reflected to&amp;nbsp;VpuBufferNode, I wanted to know what to change before calling&amp;nbsp;VPU_DecDecodeBuf() for the 2nd time.&lt;BR /&gt;&lt;BR /&gt;After some trial and error, I found the following code to solve the above problem.&lt;BR /&gt;&amp;nbsp;/** Change address of input set in VpuBufferNode to the address of P-Frame */&lt;BR /&gt;m_vpuBufferNode.pVirAddr =&amp;nbsp;&amp;lt;P-Frame address&amp;gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;/** Change input data size */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;m_vpuBufferNode.nSize = &amp;lt;P-Frame size&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 May 2025 23:59:37 GMT</pubDate>
    <dc:creator>b_m</dc:creator>
    <dc:date>2025-05-22T23:59:37Z</dc:date>
    <item>
      <title>[iMX8MP] How to decode a single frame within an H264 data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2099459#M237318</link>
      <description>&lt;P&gt;Hi Community&lt;BR /&gt;&lt;BR /&gt;I am making a decoder app using &lt;A href="https://github.com/nxp-imx/imx-vpuwrap/blob/MM_04.08.03_2312_L6.6.y/vpu_wrapper.h#L460" target="_self"&gt;VPU wrapper&lt;/A&gt;. (Input: H264, Output: YUV)&lt;BR /&gt;Input H264 data is updated real time.&lt;BR /&gt;If VPU_DecDecodeBuf() has been called once to decode the I-frame,&lt;BR /&gt;then P-frame is encoded and appended to the input H264 data,&lt;BR /&gt;which parameter should I change so that the next time&amp;nbsp;VPU_DecDecodeBuf() is called&amp;nbsp;&lt;BR /&gt;it will decode the P-frame?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 04:59:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2099459#M237318</guid>
      <dc:creator>b_m</dc:creator>
      <dc:date>2025-05-19T04:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: [iMX8MP] How to decode a single frame within an H264 data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2100237#M237366</link>
      <description>&lt;P&gt;this is part of decoding flow, after decoding one frame, if still have more frames, the VPU will decode next frame before close the VPU&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joanxie_0-1747710718527.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/338585iA8D8F91ADE8391B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joanxie_0-1747710718527.png" alt="joanxie_0-1747710718527.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 03:13:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2100237#M237366</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2025-05-20T03:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: [iMX8MP] How to decode a single frame within an H264 data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2100328#M237373</link>
      <description>&lt;P&gt;Please consider this sequence&lt;BR /&gt;1.&amp;nbsp;VpuBufferNode only contains I-Frame&lt;BR /&gt;2. &lt;SPAN&gt;VPU_DecDecodeBuf() is called&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Result: I-Frame is decoded properly&lt;BR /&gt;&lt;BR /&gt;(Here comes my problem)&lt;BR /&gt;3. A P-Frame has been created separately, so I understand it has to be appended to VpuBufferNode, like this&lt;BR /&gt;&amp;nbsp; &amp;nbsp; /** Append P-Frame data at the end of I-Frame data in VpuBufferNode */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; memcpy(m_vpuBufferNode.pVirAddr + &amp;lt;I-Frame size&amp;gt;, &amp;lt;P-Frame address&amp;gt;,&amp;nbsp;&amp;lt;P-Frame size&amp;gt;);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;/** Update input data size */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; m_vpuBufferNode.nSize =&amp;nbsp;&amp;lt;I-Frame size&amp;gt; +&amp;nbsp;&amp;nbsp;&amp;lt;P-Frame size&amp;gt;;&lt;BR /&gt;4.&amp;nbsp;VPU_DecDecodeBuf() is called again and is expected to decode the P-frame added in #3&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Result: No image is decoded (output decoded data from VPU_DecGetOutputFrame is all-zero)&lt;BR /&gt;&lt;BR /&gt;My question is, is the implementation of #3 enough to update VpuBufferNode, before calling&amp;nbsp;VPU_DecDecodeBuf() again?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 05:35:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2100328#M237373</guid>
      <dc:creator>b_m</dc:creator>
      <dc:date>2025-05-20T05:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: [iMX8MP] How to decode a single frame within an H264 data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2102538#M237492</link>
      <description>&lt;P&gt;what kind of streaming do you need to decode? I don't think raw P frame append to the I frame is correct procedure, you also can refer to the nxp source code for reference&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 08:48:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2102538#M237492</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2025-05-22T08:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: [iMX8MP] How to decode a single frame within an H264 data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2103002#M237511</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt;what kind of streaming do you need to decode?&amp;nbsp;&lt;BR /&gt;I said in my OP that my input is H264 data&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I don't think raw P frame append to the I frame is correct procedure, you also can refer to the nxp source code for reference&lt;BR /&gt;Input H264 data is set to&amp;nbsp;VpuBufferNode then passed to VPU_DecDecodeBuf().&lt;BR /&gt;If originally the H264 data has both I and P Frames before setting to&amp;nbsp;VpuBufferNode, decoding works.&lt;BR /&gt;(1st call of VPU_DecDecodeBuf() decodes I, then 2nd call decodes P)&lt;BR /&gt;&lt;BR /&gt;However, if original input H264 data only has I frame, then P frame was created separately so it has to be reflected to&amp;nbsp;VpuBufferNode, I wanted to know what to change before calling&amp;nbsp;VPU_DecDecodeBuf() for the 2nd time.&lt;BR /&gt;&lt;BR /&gt;After some trial and error, I found the following code to solve the above problem.&lt;BR /&gt;&amp;nbsp;/** Change address of input set in VpuBufferNode to the address of P-Frame */&lt;BR /&gt;m_vpuBufferNode.pVirAddr =&amp;nbsp;&amp;lt;P-Frame address&amp;gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;/** Change input data size */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;m_vpuBufferNode.nSize = &amp;lt;P-Frame size&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 23:59:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-How-to-decode-a-single-frame-within-an-H264-data/m-p/2103002#M237511</guid>
      <dc:creator>b_m</dc:creator>
      <dc:date>2025-05-22T23:59:37Z</dc:date>
    </item>
  </channel>
</rss>

