<?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: H264 VPU IPU FB - fastest path? in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/H264-VPU-IPU-FB-fastest-path/m-p/459651#M15434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for quick answer but my problem is not how to do rotation (it can be done in VPU, IPU or FB), but how can i speed up 1080p movie player (h264 different sizes input, 1080p rotated FB output).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i have single thread application in c++ that is running in IMX6 Quad environment and data flow is as follows:&lt;/P&gt;&lt;P&gt;1. VPU initialization - codec, buffers etc.&lt;/P&gt;&lt;P&gt;2. IPU initialization - prepaer ipu_task structures&lt;/P&gt;&lt;P&gt;3. UDP listener - listen incoming packets (h264 frames)&lt;/P&gt;&lt;P&gt;4. Main loop:&lt;/P&gt;&lt;P&gt;a) receive UDP data with h264 frame (or few packets that are join in one h264 frame)&lt;/P&gt;&lt;P&gt;b) vpu_DecUpdateBitstreamBuffer() with h264 frame&lt;/P&gt;&lt;P&gt;c) vpu_DecUpdateBitstreamBuffer() with NULL to flush decoder&lt;/P&gt;&lt;P&gt;d) DecParam set to {0}&lt;/P&gt;&lt;P&gt;e) vpu_DecStartOneFrame()&lt;/P&gt;&lt;P&gt; f) vpu_DecGetOutputInfo()&lt;/P&gt;&lt;P&gt; g) if (!DecOutputInfo.decodingSuccess or DecOutputInfo.indexFrameDisplay &amp;lt; 0) then skip to (a)&lt;/P&gt;&lt;P&gt; h) put decoded frame physical address to ipu tasks&lt;/P&gt;&lt;P&gt; i) run 4 ipu tasks sequentially that resize frame to 1080p with output directly to framebuffer with yoffset that is not visible now (double buffer)&lt;/P&gt;&lt;P&gt; j) switch framebuffer yoffset&lt;/P&gt;&lt;P&gt;5. UDP, IPU, VPU deinitialization&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if it can be done with better performance because now i cant even play 1920x768@30 (data incoming faster then decoding+mosaic+switch time).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2016 17:15:38 GMT</pubDate>
    <dc:creator>damiansurma</dc:creator>
    <dc:date>2016-05-31T17:15:38Z</dc:date>
    <item>
      <title>H264 VPU IPU FB - fastest path?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/H264-VPU-IPU-FB-fastest-path/m-p/459649#M15432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got H.264 movie that i need to resize and play on linux framebuffer (i.mx6 quad). For now i am using vpu to decode and rotate 180 deg. Rotate buffer is an input to 4 ipu tasks that copy the image directly to FB (fbfix.smem_start).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Decode 720p and display rotated 1080p:&lt;/P&gt;&lt;P&gt;1. VPU - decode 2-5 ms, rotate 2-5 ms -&amp;gt; 4-10ms&lt;/P&gt;&lt;P&gt;2. IPU task 1 - resize - 8-10 ms&lt;/P&gt;&lt;P&gt;3. IPU task 2 - resize - 8-10 ms&lt;/P&gt;&lt;P&gt;4. IPU task 3 - resize - 8-10 ms&lt;/P&gt;&lt;P&gt;5. IPU task 4 - resize - 8-10 ms&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see it takes max 50ms for one frame. For normal movies 25 fps its to high value. Is it my calculation correct? How can i check ipu clock frequency? How to achieve smooth 30fps mp4 rotated and resized to 1080p?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 22:33:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/H264-VPU-IPU-FB-fastest-path/m-p/459649#M15432</guid>
      <dc:creator>damiansurma</dc:creator>
      <dc:date>2016-05-27T22:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: H264 VPU IPU FB - fastest path?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/H264-VPU-IPU-FB-fastest-path/m-p/459650#M15433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt;&amp;nbsp; Below are some comments regarding rotation :&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt;The framebuffer can be rotate in 180 degree using &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt;$ echo 1 &amp;gt; /sys/class/graphic/fb0/rotate&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt;Using Gstreamer (depends on Linux release):&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt;$ gst-launch uri=file://SOME_VIDEO video-sink="mfw_v4lsink rotate=180"&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt; Also, i.MX6 GPU (2D) supports rotation. You may try to use Option "Rotate" of X11 &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt;(in xorg.conf file) or xrand. In order to use hardware accelerated features by X11 it is &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt;needed to add corresponding NXP GPU modules to system. Please refer to documentation &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="tm5 a______"&gt;&lt;SPAN class="tm6"&gt;of NXP BSP regarding GPU support.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 02:25:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/H264-VPU-IPU-FB-fastest-path/m-p/459650#M15433</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2016-05-31T02:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: H264 VPU IPU FB - fastest path?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/H264-VPU-IPU-FB-fastest-path/m-p/459651#M15434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for quick answer but my problem is not how to do rotation (it can be done in VPU, IPU or FB), but how can i speed up 1080p movie player (h264 different sizes input, 1080p rotated FB output).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i have single thread application in c++ that is running in IMX6 Quad environment and data flow is as follows:&lt;/P&gt;&lt;P&gt;1. VPU initialization - codec, buffers etc.&lt;/P&gt;&lt;P&gt;2. IPU initialization - prepaer ipu_task structures&lt;/P&gt;&lt;P&gt;3. UDP listener - listen incoming packets (h264 frames)&lt;/P&gt;&lt;P&gt;4. Main loop:&lt;/P&gt;&lt;P&gt;a) receive UDP data with h264 frame (or few packets that are join in one h264 frame)&lt;/P&gt;&lt;P&gt;b) vpu_DecUpdateBitstreamBuffer() with h264 frame&lt;/P&gt;&lt;P&gt;c) vpu_DecUpdateBitstreamBuffer() with NULL to flush decoder&lt;/P&gt;&lt;P&gt;d) DecParam set to {0}&lt;/P&gt;&lt;P&gt;e) vpu_DecStartOneFrame()&lt;/P&gt;&lt;P&gt; f) vpu_DecGetOutputInfo()&lt;/P&gt;&lt;P&gt; g) if (!DecOutputInfo.decodingSuccess or DecOutputInfo.indexFrameDisplay &amp;lt; 0) then skip to (a)&lt;/P&gt;&lt;P&gt; h) put decoded frame physical address to ipu tasks&lt;/P&gt;&lt;P&gt; i) run 4 ipu tasks sequentially that resize frame to 1080p with output directly to framebuffer with yoffset that is not visible now (double buffer)&lt;/P&gt;&lt;P&gt; j) switch framebuffer yoffset&lt;/P&gt;&lt;P&gt;5. UDP, IPU, VPU deinitialization&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if it can be done with better performance because now i cant even play 1920x768@30 (data incoming faster then decoding+mosaic+switch time).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 17:15:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/H264-VPU-IPU-FB-fastest-path/m-p/459651#M15434</guid>
      <dc:creator>damiansurma</dc:creator>
      <dc:date>2016-05-31T17:15:38Z</dc:date>
    </item>
  </channel>
</rss>

