<?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 How to avoid aliasing artifacts using X11/GLES2 to display interlaced YUYV camera output? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-avoid-aliasing-artifacts-using-X11-GLES2-to-display/m-p/372194#M53216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement where I need to display camera capture (interlaced YUYV) using v4l2 capture/X11/GLES2.0. I am able to write a test application which captures via v4l2 capture apis and using X11/GLES able to show it. However the displayed image doesn't look smooth, instead I am seeing jaggy (saw kind)/aliasing artifacts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some more information:&lt;/P&gt;&lt;P&gt;- Camera outputs CVBS NTSC format. here it is interlaced YUYV&lt;/P&gt;&lt;P&gt;- I am using glTexDirectVIV() extension with GL_VIV_YUY2 input format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached bmp image with artifacts here.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="artifact.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51245iA30E8EF8413D1F5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="artifact.bmp" alt="artifact.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I try imx-test/mxc_4l2_tvin.out test with "-m 2 or -m 0" option, camera capture image is coming correctly (smooth). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;./mxc_v4l2_tvin.out -ow 800 -oh 480 -f YUYV -m&amp;nbsp; (Result: aliasing kind artifacts)&lt;/P&gt;&lt;P&gt;./mxc_v4l2_tvin.out -ow 800 -oh 480 -f YUYV -m 0 (Result: Good)&lt;/P&gt;&lt;P&gt;./mxc_v4l2_tvin.out -ow 800 -oh 480 -f YUYV -m 1 (Result: aliasing kind artifacts)&lt;/P&gt;&lt;P&gt;./mxc_v4l2_tvin.out -ow 800 -oh 480 -f YUYV -m 2 (Result: Good)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the source of mxc_v4l2_tvin.c, it seems following code makes camera capture to come correctly on display. Which in turn sets required value to VDI Control register (i.e. IPU_VDI_C) when v4l2 output path is getting used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "output_buf.field =&amp;nbsp; V4L2_FIELD_INTERLACED_BT;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I captured the VDI Control register value and tried to set it using devmem before running my application as follows but it didn't help.&lt;/P&gt;&lt;P&gt;i.e. &lt;/P&gt;&lt;P&gt;#devmem 0x2668004 32 0x42083332&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone give some ideas/inputs/suggestions to avoid artifacts using X11/GLES2.0?&lt;/P&gt;&lt;P&gt;Is there anyway to use the IPU VDI functionality as above (i.e. mxc_v4l2_tvin) with the output/display pipeline with X11/GLES2.0/EGL/FB?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking you all in advance and waiting for replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2015 09:43:14 GMT</pubDate>
    <dc:creator>vikaspatil</dc:creator>
    <dc:date>2015-03-10T09:43:14Z</dc:date>
    <item>
      <title>How to avoid aliasing artifacts using X11/GLES2 to display interlaced YUYV camera output?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-avoid-aliasing-artifacts-using-X11-GLES2-to-display/m-p/372194#M53216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement where I need to display camera capture (interlaced YUYV) using v4l2 capture/X11/GLES2.0. I am able to write a test application which captures via v4l2 capture apis and using X11/GLES able to show it. However the displayed image doesn't look smooth, instead I am seeing jaggy (saw kind)/aliasing artifacts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some more information:&lt;/P&gt;&lt;P&gt;- Camera outputs CVBS NTSC format. here it is interlaced YUYV&lt;/P&gt;&lt;P&gt;- I am using glTexDirectVIV() extension with GL_VIV_YUY2 input format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached bmp image with artifacts here.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="artifact.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51245iA30E8EF8413D1F5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="artifact.bmp" alt="artifact.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I try imx-test/mxc_4l2_tvin.out test with "-m 2 or -m 0" option, camera capture image is coming correctly (smooth). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;./mxc_v4l2_tvin.out -ow 800 -oh 480 -f YUYV -m&amp;nbsp; (Result: aliasing kind artifacts)&lt;/P&gt;&lt;P&gt;./mxc_v4l2_tvin.out -ow 800 -oh 480 -f YUYV -m 0 (Result: Good)&lt;/P&gt;&lt;P&gt;./mxc_v4l2_tvin.out -ow 800 -oh 480 -f YUYV -m 1 (Result: aliasing kind artifacts)&lt;/P&gt;&lt;P&gt;./mxc_v4l2_tvin.out -ow 800 -oh 480 -f YUYV -m 2 (Result: Good)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the source of mxc_v4l2_tvin.c, it seems following code makes camera capture to come correctly on display. Which in turn sets required value to VDI Control register (i.e. IPU_VDI_C) when v4l2 output path is getting used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; "output_buf.field =&amp;nbsp; V4L2_FIELD_INTERLACED_BT;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I captured the VDI Control register value and tried to set it using devmem before running my application as follows but it didn't help.&lt;/P&gt;&lt;P&gt;i.e. &lt;/P&gt;&lt;P&gt;#devmem 0x2668004 32 0x42083332&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone give some ideas/inputs/suggestions to avoid artifacts using X11/GLES2.0?&lt;/P&gt;&lt;P&gt;Is there anyway to use the IPU VDI functionality as above (i.e. mxc_v4l2_tvin) with the output/display pipeline with X11/GLES2.0/EGL/FB?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking you all in advance and waiting for replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 09:43:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-avoid-aliasing-artifacts-using-X11-GLES2-to-display/m-p/372194#M53216</guid>
      <dc:creator>vikaspatil</dc:creator>
      <dc:date>2015-03-10T09:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid aliasing artifacts using X11/GLES2 to display interlaced YUYV camera output?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-avoid-aliasing-artifacts-using-X11-GLES2-to-display/m-p/372195#M53217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FAE feedback our i.MX6X+intersil68xx source codes and test applicaiton to customer, but customer said if enable the VDI, will have green screen, disable it is ok.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; customer use the ADV7180 but we use the intersil. need AE's comments.&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;John.li&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2015 06:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-avoid-aliasing-artifacts-using-X11-GLES2-to-display/m-p/372195#M53217</guid>
      <dc:creator>Johnli</dc:creator>
      <dc:date>2015-03-12T06:15:48Z</dc:date>
    </item>
  </channel>
</rss>

