<?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のトピックVPUDEC I420 output frame structure</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/VPUDEC-I420-output-frame-structure/m-p/901272#M135978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are currently building this GStreamer pipline:&lt;/P&gt;&lt;P&gt;appsrc !&amp;nbsp;"video/x-h264, width=(int)1024, height=(int)768, framerate=(fraction)0/1, stream-format=(string)avc"&amp;nbsp;! queue max-size-time=0 ! vpudec&amp;nbsp;output-fotmat=2&amp;nbsp;!&amp;nbsp;"video/x-raw,(string)format=I420, width=(int)1024, height=(int)768"&amp;nbsp;! queue ! appsink&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the appsink CB we try to isolate the Y, U, V byte-streams and the strides.&lt;/P&gt;&lt;P&gt;According to the I420 specification, for NxM frame we should get:&lt;/P&gt;&lt;P&gt;Y - first NxM bytes&lt;/P&gt;&lt;P&gt;U - next NxM/4 bytes&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;V - last NxM/4 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for 1024x768 we should get a frame of&amp;nbsp;1179648&amp;nbsp;bytes, however we actually get a fame of&amp;nbsp;1376288&amp;nbsp;bytes, and we are unable to really get the correct Y,U,V offsets and sizes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far we understand, the format we are using (I420) is&amp;nbsp;14.1.3.1&amp;nbsp;which should be 12 bits per pixel.&lt;/P&gt;&lt;P&gt;While the frame that we get from the voudec is not so clear how many bits per pixel is used.&lt;/P&gt;&lt;P&gt;For a 1024x768 with 12 bpp we are expecting&amp;nbsp;a&amp;nbsp;1179648&amp;nbsp;bytes frame, while we get from the vpudec&amp;nbsp;1376288.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This difference make it almost impossible to correctly parse the frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please detail the vpudec's I420 output frame structure (offsets,sizes, strides)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 05 May 2019 19:31:56 GMT</pubDate>
    <dc:creator>erez1</dc:creator>
    <dc:date>2019-05-05T19:31:56Z</dc:date>
    <item>
      <title>VPUDEC I420 output frame structure</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/VPUDEC-I420-output-frame-structure/m-p/901272#M135978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are currently building this GStreamer pipline:&lt;/P&gt;&lt;P&gt;appsrc !&amp;nbsp;"video/x-h264, width=(int)1024, height=(int)768, framerate=(fraction)0/1, stream-format=(string)avc"&amp;nbsp;! queue max-size-time=0 ! vpudec&amp;nbsp;output-fotmat=2&amp;nbsp;!&amp;nbsp;"video/x-raw,(string)format=I420, width=(int)1024, height=(int)768"&amp;nbsp;! queue ! appsink&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the appsink CB we try to isolate the Y, U, V byte-streams and the strides.&lt;/P&gt;&lt;P&gt;According to the I420 specification, for NxM frame we should get:&lt;/P&gt;&lt;P&gt;Y - first NxM bytes&lt;/P&gt;&lt;P&gt;U - next NxM/4 bytes&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;V - last NxM/4 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for 1024x768 we should get a frame of&amp;nbsp;1179648&amp;nbsp;bytes, however we actually get a fame of&amp;nbsp;1376288&amp;nbsp;bytes, and we are unable to really get the correct Y,U,V offsets and sizes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far we understand, the format we are using (I420) is&amp;nbsp;14.1.3.1&amp;nbsp;which should be 12 bits per pixel.&lt;/P&gt;&lt;P&gt;While the frame that we get from the voudec is not so clear how many bits per pixel is used.&lt;/P&gt;&lt;P&gt;For a 1024x768 with 12 bpp we are expecting&amp;nbsp;a&amp;nbsp;1179648&amp;nbsp;bytes frame, while we get from the vpudec&amp;nbsp;1376288.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This difference make it almost impossible to correctly parse the frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please detail the vpudec's I420 output frame structure (offsets,sizes, strides)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 May 2019 19:31:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/VPUDEC-I420-output-frame-structure/m-p/901272#M135978</guid>
      <dc:creator>erez1</dc:creator>
      <dc:date>2019-05-05T19:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: VPUDEC I420 output frame structure</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/VPUDEC-I420-output-frame-structure/m-p/901273#M135979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls test it on the unit test first, the path is unit_tests/V4L2_VPU/mxc_v4l2_vpu_dec.out, if you don't know how to set the parameter, try to use mxc_v4l2_vpu_dec.out -help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2019 08:55:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/VPUDEC-I420-output-frame-structure/m-p/901273#M135979</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2019-05-08T08:55:12Z</dc:date>
    </item>
  </channel>
</rss>

