<?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: Camera sensor hi846 MIPI CSI for IMX8MM: Image issue in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2104621#M237625</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/237575"&gt;@shixuanlin-ddcx&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing very well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can your camera output YUV (UYVY/NV12)?&amp;nbsp;If yes, you can skip Bayer decode and go straight to display.&lt;/P&gt;
&lt;P&gt;Please try the below to see the available formats:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;v4l2-ctl --list-formats-ext -d /dev/video0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you can try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;gst-launch-1.0 v4l2src device=/dev/video0 ! \
  video/x-raw,width=1280,height=720,format=NV12 ! \
  queue ! waylandsink sync=false&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should improve because&amp;nbsp;bayer2rgb and videoconvert are CPU-bound and not hardware-accelerated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this information can helps to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Salas.&lt;/P&gt;</description>
    <pubDate>Mon, 26 May 2025 20:46:03 GMT</pubDate>
    <dc:creator>Manuel_Salas</dc:creator>
    <dc:date>2025-05-26T20:46:03Z</dc:date>
    <item>
      <title>Camera sensor hi846 MIPI CSI for IMX8MM: Image issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2101602#M237458</link>
      <description>&lt;P&gt;Dear NXP Support Team,&lt;/P&gt;&lt;P&gt;I am writing to seek urgent assistance regarding critical issues I am experiencing with an i.MX8MM platform running kernel version 5.15. The problems involve video capture and real-time display using GStreamer pipelines with a Hi846 camera module, and I would greatly appreciate your expertise in resolving them.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Hardware and Software Setup:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Platform: i.MX8MM&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Kernel: 5.15&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Camera: Hi846 with minimum resolution of 1280x720&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Successful Data Capture:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;I can capture raw data using the following command:&amp;nbsp;&lt;STRONG&gt;v4l2-ctl -d /dev/video0 --set-fmt-video width=1280,height=720,pixelformat=BA10 --stream-mmap --stream-count=10 --stream-to=test.raw&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;I can also capture a single PNG image with this GStreamer command:&amp;nbsp;&lt;STRONG&gt;gst-launch-1.0 -vvv v4l2src device=/dev/video0 num-buffers=1 ! "video/x-bayer,width=1280,height=720,framerate=(fraction)15/1,format=(string)grbg" ! bayer2rgb ! pngenc ! filesink location=test.png&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Real-Time Display Issues:&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;However, when attempting real-time display with the following pipeline:&amp;nbsp;&lt;STRONG&gt;gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-bayer,format=grbg,width=1280,height=720,framerate=15/1 ! queue ! bayer2rgb ! videoconvert ! videoscale ! video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1 ! glimagesink&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I encounter significant lag and the following warning:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WARNING: from element /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink: A lot of buffers are being dropped.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Additional debug info:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;../git/libs/gst/base/gstbasesink.c(3143): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;There may be a timestamping problem, or this computer is too slow.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The display is choppy, indicating performance issues.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;High CPU Usage:&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;During the real-time display attempt, CPU usage spikes to nearly 100%, as shown in the top output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shixuanlinddcx_3-1747828657870.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/338979i51528613D4AEFA6E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shixuanlinddcx_3-1747828657870.png" alt="shixuanlinddcx_3-1747828657870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have tried adding queue elements and adjusting frame rates, but the issue persists&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Request for Assistance&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This high CPU usage and frame dropping are severely impacting real-time performance, which is critical for my application. I suspect the issue may be related to inefficient buffer handling, lack of hardware acceleration, or a configuration mismatch with the i.MX8MM’s GPU/VPU capabilities. Could you please:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Provide guidance on optimizing the GStreamer pipeline to leverage hardware acceleration ?&lt;/LI&gt;&lt;LI&gt;Suggest kernel or driver patches to improve DMA buffer handling or reduce CPU load?&lt;/LI&gt;&lt;LI&gt;Recommend debugging steps to identify the exact bottleneck (e.g., enabling specific GStreamer debug levels or kernel logs)?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I am available to provide additional logs, such as &lt;SPAN&gt;GST_DEBUG=3&lt;/SPAN&gt; output or kernel traces, upon request. This is an urgent matter, and your prompt support would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you for your attention to this issue.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 12:05:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2101602#M237458</guid>
      <dc:creator>shixuanlin-ddcx</dc:creator>
      <dc:date>2025-05-21T12:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Camera sensor hi846 MIPI CSI for IMX8MM: Image issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2104621#M237625</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/237575"&gt;@shixuanlin-ddcx&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing very well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can your camera output YUV (UYVY/NV12)?&amp;nbsp;If yes, you can skip Bayer decode and go straight to display.&lt;/P&gt;
&lt;P&gt;Please try the below to see the available formats:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;v4l2-ctl --list-formats-ext -d /dev/video0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you can try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;gst-launch-1.0 v4l2src device=/dev/video0 ! \
  video/x-raw,width=1280,height=720,format=NV12 ! \
  queue ! waylandsink sync=false&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should improve because&amp;nbsp;bayer2rgb and videoconvert are CPU-bound and not hardware-accelerated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this information can helps to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Salas.&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 20:46:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2104621#M237625</guid>
      <dc:creator>Manuel_Salas</dc:creator>
      <dc:date>2025-05-26T20:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Camera sensor hi846 MIPI CSI for IMX8MM: Image issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2105623#M237701</link>
      <description>&lt;P&gt;Dear NXP Support Team,&lt;/P&gt;&lt;P&gt;Thank you for your prompt response and helpful suggestions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have checked the available formats for my camera (HI846) using the command you provided:v4l2-ctl --list-formats-ext -d /dev/video0：&lt;/P&gt;&lt;P&gt;The output shows that my camera only supports the Bayer format, specifically 'BA10' (10-bit Bayer GRGR/BGBG), with the following resolutions:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;mx6s_captuere.c: mbus_code 300a&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ioctl: VIDIOC_ENUM_FMT&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Type: Video Capture&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[0]: 'BA10' (10-bit Bayer GRGR/BGBG)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Size: Discrete 3264x2448&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Size: Discrete 640x480&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Size: Discrete 1280x720&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Size: Discrete 1632x1224&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Since the camera does not support YUV formats like UYVY or NV12, I am unable to skip the Bayer decoding step as suggested.&lt;/P&gt;&lt;P&gt;Given that &lt;SPAN&gt;bayer2rgb&lt;/SPAN&gt; and &lt;SPAN&gt;videoconvert&lt;/SPAN&gt; are CPU-bound and not hardware-accelerated, could this be the primary reason for the performance issues I am experiencing? Additionally, I would like to confirm if the Bayer decoding process might be contributing to any potential issues. Also, since &lt;SPAN&gt;/dev/media0&lt;/SPAN&gt; has not been generated, could its creation have any impact on the current behavior?&lt;/P&gt;&lt;P&gt;I would greatly appreciate your insights on these matters and any further suggestions to improve performance with the Bayer format.&lt;/P&gt;&lt;P&gt;Looking forward to your reply.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 01:10:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2105623#M237701</guid>
      <dc:creator>shixuanlin-ddcx</dc:creator>
      <dc:date>2025-05-28T01:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Camera sensor hi846 MIPI CSI for IMX8MM: Image issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2106442#M237738</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/237575"&gt;@shixuanlin-ddcx&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bayer2rgb and videoconvert elements in your GStreamer pipeline put a heavy load on the CPU because they aren't designed to use hardware acceleration. As a result, they consume a lot of processing power, which leads to high CPU usage (around 100%) and causes dropped frames during real-time preview.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try to reduce resolution:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;gst-launch-1.0 v4l2src device=/dev/video0 ! \
  video/x-bayer,format=grbg,width=1280,height=720,framerate=15/1 ! \
  bayer2rgb ! \
  videoscale method=1 ! \
  video/x-raw,width=640,height=360 ! \
  videoconvert ! \
  autovideosink&lt;/LI-CODE&gt;
&lt;P&gt;Or:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;gst-launch-1.0 v4l2src device=/dev/video0 ! \
  video/x-bayer,format=grbg,width=1280,height=720,framerate=15/1 ! \
  bayer2rgb ! \
  videoscale method=1 ! \
  video/x-raw,width=640,height=360 ! \
  videoconvert ! \
  waylandsink sync=false&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Salas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 16:52:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2106442#M237738</guid>
      <dc:creator>Manuel_Salas</dc:creator>
      <dc:date>2025-05-28T16:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Camera sensor hi846 MIPI CSI for IMX8MM: Image issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2106651#M237750</link>
      <description>&lt;P&gt;Thank you very much for your reply. The command you provided is very effective and no more frame drops.&lt;/P&gt;&lt;PRE&gt;gst-launch-1.0 v4l2src device=/dev/video0 ! \
  video/x-bayer,format=grbg,width=1280,height=720,framerate=15/1 ! \
  bayer2rgb ! \
  videoscale method=1 ! \
  video/x-raw,width=640,height=360 ! \
  videoconvert ! \
  waylandsink sync=false&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 02:07:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Camera-sensor-hi846-MIPI-CSI-for-IMX8MM-Image-issue/m-p/2106651#M237750</guid>
      <dc:creator>shixuanlin-ddcx</dc:creator>
      <dc:date>2025-05-29T02:07:18Z</dc:date>
    </item>
  </channel>
</rss>

