Dear Sir,
I can display camera RAW8 (640x480) on i.MX8MM normally.
(by "gst-launch-1.0 -v v4l2src device=/dev/video0 ! bayer2rgb ! autovideosink")
But, when I display RAW10 (640x480), the image will be very noisy.
(Please see the attached file to display raw10 black-white color-bar)
The warnning message (by --gst-debug-level=3) is below:
--------------------------------------------------------------------------------------------------
0:00:00.525927500 3957 0x2fcb84a0 WARN v4l2bufferpool gstv4l2bufferpool.c:794:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:01.029631125 3957 0x2fcb84a0 WARN waylandsink wlwindow.c:174:gst_wl_window_new_internal: init surface_state fail, fallback to scale=1 fullscreen (1920x1048)
0:00:01.031814500 3957 0x2fcb8940 WARN v4l2src gstv4l2src.c:692:gst_v4l2src_query:<v4l2src0> Can't give latency since framerate isn't fixated !
--------------------------------------------------------------------------------------------------
I found the following discussion of "Support Camera RAW10" in NXP Community:
-- Camera Support For RAW10 Format
-- Ov5640 camera RAW10 format on i.MX8MM
-- Confirmed support for RAW12 through 4-lane CSI-2 sensor on i.MX8M?
Currently, I modify "mx6s_capture.c" as below:
(a).
static struct mx6s_fmt formats[] = {
.......................................
{
.name = "RAWRGB10 (SBGGR10)",
.fourcc = V4L2_PIX_FMT_SBGGR10,
.pixelformat = V4L2_PIX_FMT_SBGGR10,
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,
.bpp = 2,
}
}
(b).
witch (csi_dev->fmt->pixelformat) {
.................................................
case V4L2_PIX_FMT_SBGGR10:
width = pix->width * 2;
break;
.................................................
}
(c).
cr1 = csi_read(csi_dev, CSI_CSICR1);
cr1 &= ~BIT_GCLK_MODE;
cr1 |= BIT_PIXEL_BIT;
csi_write(csi_dev, cr1, CSI_CSICR1);
(d).
switch (csi_dev->fmt->pixelformat) {
...........................................
PIX_FMT_SBGGR10:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;
break;
............................................
}
Does anyone can help us ? Our Question:
1). Have any configuration I need to modify to support RAW10 ?
2). For RAW10 data arranged(i.e. 16-bit with actual data in the 10 high bits), does any code/configuration we need to modify ?
Many thanks for your help.
Sincerely,
TC.Chou