<?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のトピックVPU for motion estimation</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/VPU-for-motion-estimation/m-p/368304#M52452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the VPU of i.mx6 Quad to calculate the motion estimation. From the i.MX 6Dual/6Quad VPU Application Programming Interface Linux Reference Manual&lt;/P&gt;&lt;P&gt;, there is API for the VPU encoder to encode H.264 from YUV input, and this API output the motion estimation vector.&lt;/P&gt;&lt;P&gt;The motion infor struct is:&lt;/P&gt;&lt;P&gt;typedef struct {&lt;/P&gt;&lt;P&gt;int enable;&lt;/P&gt;&lt;P&gt;int type;&lt;/P&gt;&lt;P&gt;int size;&lt;/P&gt;&lt;P&gt;Uint8 *addr;&lt;/P&gt;&lt;P&gt;} EncReportInfo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can get the data out of the API, however the data is all 0x17 at the beginning, and after some 0x17 value, the rest is zeros. I changed many inputs, and the result is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is what is the format of the output buffer? (the start address is addr) The size of each motion vector is 16 bit or 8 bit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any example that calculate the motion vector using the VPU? I used the encode example from FreeScale, it disabled the motion estimation. When I enable it, i get the result that I told you above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2015 08:13:01 GMT</pubDate>
    <dc:creator>baobui</dc:creator>
    <dc:date>2015-03-09T08:13:01Z</dc:date>
    <item>
      <title>VPU for motion estimation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/VPU-for-motion-estimation/m-p/368304#M52452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the VPU of i.mx6 Quad to calculate the motion estimation. From the i.MX 6Dual/6Quad VPU Application Programming Interface Linux Reference Manual&lt;/P&gt;&lt;P&gt;, there is API for the VPU encoder to encode H.264 from YUV input, and this API output the motion estimation vector.&lt;/P&gt;&lt;P&gt;The motion infor struct is:&lt;/P&gt;&lt;P&gt;typedef struct {&lt;/P&gt;&lt;P&gt;int enable;&lt;/P&gt;&lt;P&gt;int type;&lt;/P&gt;&lt;P&gt;int size;&lt;/P&gt;&lt;P&gt;Uint8 *addr;&lt;/P&gt;&lt;P&gt;} EncReportInfo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can get the data out of the API, however the data is all 0x17 at the beginning, and after some 0x17 value, the rest is zeros. I changed many inputs, and the result is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is what is the format of the output buffer? (the start address is addr) The size of each motion vector is 16 bit or 8 bit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any example that calculate the motion vector using the VPU? I used the encode example from FreeScale, it disabled the motion estimation. When I enable it, i get the result that I told you above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 08:13:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/VPU-for-motion-estimation/m-p/368304#M52452</guid>
      <dc:creator>baobui</dc:creator>
      <dc:date>2015-03-09T08:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: VPU for motion estimation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/VPU-for-motion-estimation/m-p/368305#M52453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you use unit test, pls use the patch as below:&lt;/P&gt;&lt;P&gt;Both VPU lib and unit test must be updated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Unit test:&lt;/P&gt;&lt;P&gt;diff --git a/test/mxc_vpu_test/enc.c b/test/mxc_vpu_test/enc.c&lt;/P&gt;&lt;P&gt;index a8d4f9a..dc5e085 100644&lt;/P&gt;&lt;P&gt;--- a/test/mxc_vpu_test/enc.c&lt;/P&gt;&lt;P&gt;+++ b/test/mxc_vpu_test/enc.c&lt;/P&gt;&lt;P&gt;@@ -84,7 +84,7 @@ void SaveEncMvInfo(u8 *mvParaBuf, int size, int MbNumX, int EncNum)&lt;/P&gt;&lt;P&gt; fprintf(fpEncMvInfo, "MbAddr[%4d:For ]: Avail[0] Mv[%5d:%5d]\n", i, 0, 0);&lt;/P&gt;&lt;P&gt; } else {&lt;/P&gt;&lt;P&gt; mvX = (mvX &amp;amp; 0x7FFF) | ((mvX &amp;lt;&amp;lt; 1) &amp;amp; 0x8000);&lt;/P&gt;&lt;P&gt;- fprintf(fpEncMvInfo, "MbAddr[%4d:For ]: Avail[1] Mv[%5d:%5d]\n", i, mvX, mvY);&lt;/P&gt;&lt;P&gt;+ fprintf(fpEncMvInfo, "MbAddr[%4d:For ]: Avail[1] Mv[%5d:%5d]\n", i, (short)mvX, (short)mvY);&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; mvParaBuf += 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@@ -872,7 +872,7 @@ encoder_configure(struct encode *enc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; enc-&amp;gt;mbInfo.enable = 0;&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enc-&amp;gt;mvInfo.enable = 0;&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enc-&amp;gt;mvInfo.enable = 1;&lt;/P&gt;&lt;P&gt; enc-&amp;gt;sliceInfo.enable = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (enc-&amp;gt;mbInfo.enable) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Lib&lt;/P&gt;&lt;P&gt;diff --git a/vpu/vpu_lib.c b/vpu/vpu_lib.c&lt;/P&gt;&lt;P&gt;index 95af9ca..aed65da 100644&lt;/P&gt;&lt;P&gt;--- a/vpu/vpu_lib.c&lt;/P&gt;&lt;P&gt;+++ b/vpu/vpu_lib.c&lt;/P&gt;&lt;P&gt;@@ -2005,7 +2005,7 @@ RetCode vpu_EncGetOutputInfo(EncHandle handle, EncOutputInfo * info)&lt;/P&gt;&lt;P&gt; if (info-&amp;gt;mvInfo.addr &amp;amp;&amp;amp; info-&amp;gt;mvInfo.size) {&lt;/P&gt;&lt;P&gt; size = (info-&amp;gt;mvInfo.size + 7) / 8 * 8;&lt;/P&gt;&lt;P&gt; dst_addr = (Uint8 *)info-&amp;gt;mvInfo.addr;&lt;/P&gt;&lt;P&gt;- src_addr = (Uint8 *)(virt_addr + ADDR_MB_BASE_OFFSET);&lt;/P&gt;&lt;P&gt;+ src_addr = (Uint8 *)(virt_addr + ADDR_MV_BASE_OFFSET);&lt;/P&gt;&lt;P&gt; CopyBufferData(dst_addr, src_addr, size);&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only H.264 encoder works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 17:02:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/VPU-for-motion-estimation/m-p/368305#M52453</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2015-03-30T17:02:24Z</dc:date>
    </item>
  </channel>
</rss>

