<?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: failed fill VPU input buffer</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/VPU-failed-fill-VPU-input-buffer/m-p/269610#M28718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very strange, I increase VPU buffer size, but I get same error:&lt;/P&gt;&lt;P&gt;vpu_encode: 0x2c711008 (1382400) -&amp;gt; 0x2c9f3000 (2764800, phys 0x75000..&lt;/P&gt;&lt;P&gt;*** buffer overflow detected ***&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Nov 2013 08:32:12 GMT</pubDate>
    <dc:creator>BrilliantovKiri</dc:creator>
    <dc:date>2013-11-13T08:32:12Z</dc:date>
    <item>
      <title>VPU: failed fill VPU input buffer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/VPU-failed-fill-VPU-input-buffer/m-p/269609#M28717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I try write application with imx-lib without GStremamer (VPU firmware version: 1.4.41, VPU library version: 5.3.2), follow my code configure VPU input buffer:&lt;/P&gt;&lt;P&gt;static vpu_mem_desc in_frame_desc;&lt;/P&gt;&lt;P&gt;static FrameBuffer in_frame;&lt;/P&gt;&lt;P&gt;in_frame_desc.size = encop.picWidth * encop.picHeight * 3 / 2;&lt;/P&gt;&lt;P&gt;if (IOGetPhyMem(&amp;amp;in_frame_desc)) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; daemon_error("Failed obtain physical memory for input buffer");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;if (!in_frame_desc.phy_addr) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; daemon_error("Incorrect physical memory address for input buffer");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;in_frame_desc.virt_uaddr = IOGetVirtMem(&amp;amp;in_frame_desc);&lt;/P&gt;&lt;P&gt;if (in_frame_desc.virt_uaddr &amp;lt;= 0) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; daemon_error("Failed obtain virtual memory for input buffer");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;in_frame.bufY = in_frame_desc.phy_addr;&lt;/P&gt;&lt;P&gt;in_frame.bufCb = in_frame.bufY + encop.picWidth * encop.picHeight;&lt;/P&gt;&lt;P&gt;in_frame.bufCr = in_frame.bufCb + encop.picWidth * encop.picHeight / 4;&lt;/P&gt;&lt;P&gt;in_frame.strideY = encop.picWidth * encop.picHeight;&lt;/P&gt;&lt;P&gt;in_frame.strideC = encop.picWidth / 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And code for fill it:&lt;/P&gt;&lt;P&gt;//debug output&lt;/P&gt;&lt;P&gt;daemon_info("%s: %p (%u) -&amp;gt; %p (%u, phys %p)",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __func__,in, in_len, in_frame_desc.virt_uaddr, in_frame_desc.size, in_frame_desc.phy_addr);&lt;/P&gt;&lt;P&gt;if (in_len &amp;gt; in_frame_desc.size) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; daemon_error("Input buffer too big, buffer %u, available %u",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in_len, in_frame_desc.size);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;//copy buffer after CSC IPU to VPU&lt;/P&gt;&lt;P&gt;memcpy(&amp;amp;in_frame_desc.virt_uaddr, in, in_len);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunally programm exit in this point with message *** buffer overflow detected ***: encoderd terminated&lt;/P&gt;&lt;P&gt;I add debug output and not see any reason for this error:&amp;nbsp; vpu_encode: 0x2c711008 (1382400) -&amp;gt; 0x2c9f3000 (1382400, phys 0x75000000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because my matrix send data in YUV422 I have to convert it to YUV420 on ColorSpaceConvertion IPU, after this copy to VPU input buffer.&lt;/P&gt;&lt;P&gt;How should&amp;nbsp; configure and fill VPU input buffer?&lt;/P&gt;&lt;P&gt;Thank you and excuse my bad english.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;Because vpu_mem_desc.virt_uaddr is a address, I modify memcpy(&lt;STRONG&gt;(void *)&lt;/STRONG&gt;in_frame_desc.virt_uaddr, in, in_len)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Сообщение отредактировано: Kirill Brilliantov&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Nov 2013 12:59:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/VPU-failed-fill-VPU-input-buffer/m-p/269609#M28717</guid>
      <dc:creator>BrilliantovKiri</dc:creator>
      <dc:date>2013-11-11T12:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: VPU: failed fill VPU input buffer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/VPU-failed-fill-VPU-input-buffer/m-p/269610#M28718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very strange, I increase VPU buffer size, but I get same error:&lt;/P&gt;&lt;P&gt;vpu_encode: 0x2c711008 (1382400) -&amp;gt; 0x2c9f3000 (2764800, phys 0x75000..&lt;/P&gt;&lt;P&gt;*** buffer overflow detected ***&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 08:32:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/VPU-failed-fill-VPU-input-buffer/m-p/269610#M28718</guid>
      <dc:creator>BrilliantovKiri</dc:creator>
      <dc:date>2013-11-13T08:32:12Z</dc:date>
    </item>
  </channel>
</rss>

