<?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のトピックimx6q G2D API  g2d_blit_2d: Invalid dst format 20!</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx6q-G2D-API-g2d-blit-2d-Invalid-dst-format-20/m-p/782904#M121513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;使用G2D API 将UYVY转换为NV12格式，代码如下：&lt;/P&gt;&lt;P&gt;void *handle = NULL;&lt;/P&gt;&lt;P&gt;if(g2d_open(&amp;amp;handle))&lt;BR /&gt; {&lt;BR /&gt; printf("g2d_open fail.\n");&lt;BR /&gt; return -1;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;struct g2d_surface src,dst;&lt;BR /&gt; int test_width=1920;&lt;BR /&gt; int test_height=1080;&lt;BR /&gt; struct g2d_buf *s_buf, *d_buf, *d_buf_1,*d_buf_2;&lt;/P&gt;&lt;P&gt;s_buf = g2d_alloc(test_width * test_height * 2, 0);&lt;BR /&gt; d_buf = g2d_alloc(test_width * test_height * 2/2, 0);&lt;BR /&gt; d_buf_1 = g2d_alloc(test_width * test_height * 2/2, 0);&lt;BR /&gt; d_buf_2 = g2d_alloc(test_width * test_height * 2/2, 0);&lt;/P&gt;&lt;P&gt;// memcpy(s_buf-&amp;gt;buf_vaddr,buffers[queue_buf.index].start,test_width * test_height * 2);&lt;/P&gt;&lt;P&gt;src.format = G2D_UYVY;&lt;BR /&gt; src.planes[0] = s_buf-&amp;gt;buf_paddr;&lt;BR /&gt; src.left = 0;&lt;BR /&gt; src.top = 0;&lt;BR /&gt; src.right = test_width;&lt;BR /&gt; src.bottom = test_height;&lt;BR /&gt; src.stride = test_width;&lt;BR /&gt; src.width = test_width;&lt;BR /&gt; src.height = test_height;&lt;BR /&gt; src.rot = G2D_ROTATION_0;&lt;/P&gt;&lt;P&gt;dst.format = G2D_NV12;//G2D_BGR565;//G2D_ARGB8888;&lt;BR /&gt; dst.planes[0] = d_buf-&amp;gt;buf_paddr;&lt;BR /&gt; dst.planes[1] = d_buf_1-&amp;gt;buf_paddr;&lt;BR /&gt; dst.planes[2] = d_buf_2-&amp;gt;buf_paddr;&lt;BR /&gt; dst.left = 0;&lt;BR /&gt; dst.top = 0;&lt;BR /&gt; dst.right = test_width;&lt;BR /&gt; dst.bottom = test_height;&lt;BR /&gt; dst.stride = test_width;&lt;BR /&gt; dst.width = test_width;&lt;BR /&gt; dst.height = test_height;&lt;BR /&gt; dst.rot = G2D_ROTATION_0;&lt;/P&gt;&lt;P&gt;// g2d_make_current(handle, G2D_HARDWARE_VG);&lt;BR /&gt; g2d_blit(handle, &amp;amp;src, &amp;amp;dst);&lt;BR /&gt; g2d_finish(handle);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;运行后提示&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;g2d_blit_2d: Invalid dst format 20!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;转换结果数据全为0，这个是什么原因？&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Aug 2018 06:17:34 GMT</pubDate>
    <dc:creator>fkuexl01</dc:creator>
    <dc:date>2018-08-14T06:17:34Z</dc:date>
    <item>
      <title>imx6q G2D API  g2d_blit_2d: Invalid dst format 20!</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6q-G2D-API-g2d-blit-2d-Invalid-dst-format-20/m-p/782904#M121513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;使用G2D API 将UYVY转换为NV12格式，代码如下：&lt;/P&gt;&lt;P&gt;void *handle = NULL;&lt;/P&gt;&lt;P&gt;if(g2d_open(&amp;amp;handle))&lt;BR /&gt; {&lt;BR /&gt; printf("g2d_open fail.\n");&lt;BR /&gt; return -1;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;struct g2d_surface src,dst;&lt;BR /&gt; int test_width=1920;&lt;BR /&gt; int test_height=1080;&lt;BR /&gt; struct g2d_buf *s_buf, *d_buf, *d_buf_1,*d_buf_2;&lt;/P&gt;&lt;P&gt;s_buf = g2d_alloc(test_width * test_height * 2, 0);&lt;BR /&gt; d_buf = g2d_alloc(test_width * test_height * 2/2, 0);&lt;BR /&gt; d_buf_1 = g2d_alloc(test_width * test_height * 2/2, 0);&lt;BR /&gt; d_buf_2 = g2d_alloc(test_width * test_height * 2/2, 0);&lt;/P&gt;&lt;P&gt;// memcpy(s_buf-&amp;gt;buf_vaddr,buffers[queue_buf.index].start,test_width * test_height * 2);&lt;/P&gt;&lt;P&gt;src.format = G2D_UYVY;&lt;BR /&gt; src.planes[0] = s_buf-&amp;gt;buf_paddr;&lt;BR /&gt; src.left = 0;&lt;BR /&gt; src.top = 0;&lt;BR /&gt; src.right = test_width;&lt;BR /&gt; src.bottom = test_height;&lt;BR /&gt; src.stride = test_width;&lt;BR /&gt; src.width = test_width;&lt;BR /&gt; src.height = test_height;&lt;BR /&gt; src.rot = G2D_ROTATION_0;&lt;/P&gt;&lt;P&gt;dst.format = G2D_NV12;//G2D_BGR565;//G2D_ARGB8888;&lt;BR /&gt; dst.planes[0] = d_buf-&amp;gt;buf_paddr;&lt;BR /&gt; dst.planes[1] = d_buf_1-&amp;gt;buf_paddr;&lt;BR /&gt; dst.planes[2] = d_buf_2-&amp;gt;buf_paddr;&lt;BR /&gt; dst.left = 0;&lt;BR /&gt; dst.top = 0;&lt;BR /&gt; dst.right = test_width;&lt;BR /&gt; dst.bottom = test_height;&lt;BR /&gt; dst.stride = test_width;&lt;BR /&gt; dst.width = test_width;&lt;BR /&gt; dst.height = test_height;&lt;BR /&gt; dst.rot = G2D_ROTATION_0;&lt;/P&gt;&lt;P&gt;// g2d_make_current(handle, G2D_HARDWARE_VG);&lt;BR /&gt; g2d_blit(handle, &amp;amp;src, &amp;amp;dst);&lt;BR /&gt; g2d_finish(handle);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;运行后提示&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;g2d_blit_2d: Invalid dst format 20!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;转换结果数据全为0，这个是什么原因？&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2018 06:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6q-G2D-API-g2d-blit-2d-Invalid-dst-format-20/m-p/782904#M121513</guid>
      <dc:creator>fkuexl01</dc:creator>
      <dc:date>2018-08-14T06:17:34Z</dc:date>
    </item>
  </channel>
</rss>

