<?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: Sensor-based JPEG encoding on i.MX6UL in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1595754#M201266</link>
    <description>&lt;P&gt;Another piece of wisdom/research: the newest kernel sources from &lt;A href="https://github.com/torvalds/linux" target="_blank"&gt;https://github.com/torvalds/linux&lt;/A&gt; have redone this driver, it's now called drivers/media/platform/nxp/imx7-media-csi.c. It's been significantly redone; I will try to run tests with the latest kernel (6.1.10).&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 16:37:00 GMT</pubDate>
    <dc:creator>kosma_moczek</dc:creator>
    <dc:date>2023-02-08T16:37:00Z</dc:date>
    <item>
      <title>Sensor-based JPEG encoding on i.MX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1594854#M201170</link>
      <description>&lt;P&gt;I'd like to use the OV5640's built-in JPEG encoder on a small cheap i.MX6ULL board. However, I'm struggling to find a way to configure the CSI peripheral for receiving variable-length compressed JPEG data - it seems it only supports fixed-size raw frames. Has anyone successfully used sensor-based compression with i.MX6UL or other i.MX chips?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 15:40:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1594854#M201170</guid>
      <dc:creator>kosma_moczek</dc:creator>
      <dc:date>2023-02-07T15:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sensor-based JPEG encoding on i.MX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1595228#M201207</link>
      <description>&lt;P&gt;what format do you want to set in the ov5640? what do you mean variable-length compressed JPEG data ?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 05:03:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1595228#M201207</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2023-02-08T05:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sensor-based JPEG encoding on i.MX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1595640#M201255</link>
      <description>&lt;P&gt;To elaborate a little bit:&lt;/P&gt;&lt;P&gt;1. OV5640 has an internal JPEG encoder and it can output the data over DVP/MIPI in different ways (see attachment). Some modes output a fixed size frame with "emulated" lines, others output a single line, and depending on the mode the frame can be padded with dummy data to make it appear fixed size.&lt;/P&gt;&lt;P&gt;2. Looking at IMX6ULLRM, it seems that the End of Frame Interrupt can only be generated based on the pixel/byte count:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kosma_moczek_0-1675864469582.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/210136i7BB767DB51E18AEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kosma_moczek_0-1675864469582.png" alt="kosma_moczek_0-1675864469582.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Based on this, I think the only way to receive JPEG data from the sensor is to use one of the "emulated" modes where the sensor sends something that looks like a normal, fixed-size frame (RGB888 or Bayer), and then unpack the data in software? Am I correct? Can I program the emulated frame size on the sensor, and then set the same frame size on the CPU?&lt;/P&gt;&lt;P&gt;Another reason I asked is because I would appreciate code examples - looking at the kernel sources (mxc_v4l2_capture.c from Variscite sources) it seems that the MXC V4L2 driver doesn't support JPEG natively, so I suspect some custom driver work might be needed?&lt;/P&gt;&lt;LI-CODE lang="c"&gt;static inline int valid_mode(u32 palette)
{
        return ((palette == V4L2_PIX_FMT_RGB565) ||
                (palette == V4L2_PIX_FMT_BGR24) ||
                (palette == V4L2_PIX_FMT_RGB24) ||
                (palette == V4L2_PIX_FMT_BGR32) ||
                (palette == V4L2_PIX_FMT_RGB32) ||
                (palette == V4L2_PIX_FMT_YUV422P) ||
                (palette == V4L2_PIX_FMT_UYVY) ||
                (palette == V4L2_PIX_FMT_YUYV) ||
                (palette == V4L2_PIX_FMT_YUV420) ||
                (palette == V4L2_PIX_FMT_YVU420) ||
                (palette == V4L2_PIX_FMT_NV12));
}&lt;/LI-CODE&gt;&lt;P&gt;Notably missing from the list is V4L2_PIX_FMT_JPEG.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 14:03:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1595640#M201255</guid>
      <dc:creator>kosma_moczek</dc:creator>
      <dc:date>2023-02-08T14:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sensor-based JPEG encoding on i.MX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1595754#M201266</link>
      <description>&lt;P&gt;Another piece of wisdom/research: the newest kernel sources from &lt;A href="https://github.com/torvalds/linux" target="_blank"&gt;https://github.com/torvalds/linux&lt;/A&gt; have redone this driver, it's now called drivers/media/platform/nxp/imx7-media-csi.c. It's been significantly redone; I will try to run tests with the latest kernel (6.1.10).&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 16:37:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1595754#M201266</guid>
      <dc:creator>kosma_moczek</dc:creator>
      <dc:date>2023-02-08T16:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sensor-based JPEG encoding on i.MX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1596186#M201290</link>
      <description>&lt;P&gt;yes, you are correct, for csi supported format on imx6ul, you can refer to the Table 19-3. CSI input data format of reference manual, and current CSI couldn't support JPEC data, maybe you need convert them to csi supported format&lt;/P&gt;
&lt;P&gt;you also can check driver&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/mxc/capture/mx6s_capture.c?h=imx_5.4.24_2.1.0" target="_blank"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/mxc/capture/mx6s_capture.c?h=imx_5.4.24_2.1.0&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 04:24:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Sensor-based-JPEG-encoding-on-i-MX6UL/m-p/1596186#M201290</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2023-02-09T04:24:49Z</dc:date>
    </item>
  </channel>
</rss>

