<?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: P frames too large for VPU h.264</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/P-frames-too-large-for-VPU-h-264/m-p/343652#M47351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Henry,&lt;/P&gt;&lt;P&gt;Did you ever resolve this issue?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see the same phenomena that you describe above, i.e., the fact that encoded P frames are similar in size to encoded I frames instead of much smaller as one would expect plus the overall encoding efficiency is a factor of 4 to 6 lower than it should be (files are too large) AVC.&amp;nbsp; In addition (as I describe in my post), I see lots of encoding artifacts—changing encoding parameters, I can reduce the number of artifacts but I can never eliminate them.&amp;nbsp; Please see my post here: &lt;A href="https://community.nxp.com/message/499290"&gt;i.MX6 VPU H.264 Encoder Quality Issues&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a hunch that the problem is related to how my code feeds YUV frames to the VPU and/or removes I/P frames from the VPU, i.e., the lack of proper buffer management.&amp;nbsp; If you have been able to solve this problem, could you please post your solution?&amp;nbsp; Any help would be much appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Chuck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Apr 2015 03:55:27 GMT</pubDate>
    <dc:creator>chuck1</dc:creator>
    <dc:date>2015-04-01T03:55:27Z</dc:date>
    <item>
      <title>P frames too large for VPU h.264</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/P-frames-too-large-for-VPU-h-264/m-p/343650#M47349</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&amp;nbsp; using Boundary Devices Nitrogen6x with the Yocto Linux BSP (daisy).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written code to drive the VPU using the native API (vpu_lib.h) in order to encode h.264 at 1080p. I've based my code on this: &lt;A href="https://github.com/ahmedammar/imx-testing-apps-misc/blob/master/libvpu_encode.c" title="https://github.com/ahmedammar/imx-testing-apps-misc/blob/master/libvpu_encode.c"&gt;imx-testing-apps-misc/libvpu_encode.c at master · ahmedammar/imx-testing-apps-misc · GitHub&lt;/A&gt; but also cross-checked it against how things are done in mfw_gst_vpu_encoder.c from the Gstreamer plugins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can correctly generate h.264 - the bitstream plays correctly using ffmpeg, and h264_analyze reports (as does EncOutputInfo::picType)&amp;nbsp; that the first frame is an I-frame and subsequent frames are P-frames. I can vary this appropriately by setting EncOpenParam::gopSize or by using EncParam::forceIPicture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good. However, the size of my P-frames is exactly the same as the size of I-frames - for fixed quantization the output bitrate is the same whether I use all I-frames (gopSize=1) or I and P frames (gopSize&amp;gt;1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I set CBR by putting EncOpenParam::bitrate&amp;gt;0 then I do get the bitrate that I asked for, but if I encode a static image, then the qp for each frame gets worse over time rather than better (as you'd expect) - again, consistent with each P frame actually being coded like an I frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this is not a hardware problem because when I use gstreamer I don't see the same effect - much smaller P frames than I frames for fixed qp, and qp getting better in each frame for CBR encoding of a static image. So clearly I am doing something wrong - but I have now tried just about every combination of parameter and nothing seems to change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone ever seen this effect before? For various reasons, I don't just want to give up and use gstreamer, so I need to find a way of fixing this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Henry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 12:44:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/P-frames-too-large-for-VPU-h-264/m-p/343650#M47349</guid>
      <dc:creator>henryharrison</dc:creator>
      <dc:date>2014-10-22T12:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: P frames too large for VPU h.264</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/P-frames-too-large-for-VPU-h-264/m-p/343651#M47350</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;im having the same problem with large P frames, and also some UV color artifacts.&lt;/P&gt;&lt;P&gt;did you find a solution for this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 20:51:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/P-frames-too-large-for-VPU-h-264/m-p/343651#M47350</guid>
      <dc:creator>ronjacoby</dc:creator>
      <dc:date>2015-02-04T20:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: P frames too large for VPU h.264</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/P-frames-too-large-for-VPU-h-264/m-p/343652#M47351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Henry,&lt;/P&gt;&lt;P&gt;Did you ever resolve this issue?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see the same phenomena that you describe above, i.e., the fact that encoded P frames are similar in size to encoded I frames instead of much smaller as one would expect plus the overall encoding efficiency is a factor of 4 to 6 lower than it should be (files are too large) AVC.&amp;nbsp; In addition (as I describe in my post), I see lots of encoding artifacts—changing encoding parameters, I can reduce the number of artifacts but I can never eliminate them.&amp;nbsp; Please see my post here: &lt;A href="https://community.nxp.com/message/499290"&gt;i.MX6 VPU H.264 Encoder Quality Issues&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a hunch that the problem is related to how my code feeds YUV frames to the VPU and/or removes I/P frames from the VPU, i.e., the lack of proper buffer management.&amp;nbsp; If you have been able to solve this problem, could you please post your solution?&amp;nbsp; Any help would be much appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Chuck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 03:55:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/P-frames-too-large-for-VPU-h-264/m-p/343652#M47351</guid>
      <dc:creator>chuck1</dc:creator>
      <dc:date>2015-04-01T03:55:27Z</dc:date>
    </item>
  </channel>
</rss>

