Hi Palani,
We had tested with R24.2 and other camera sensor. We just ran the test with the camera that comes in the Jetson board and it seems that the problem is that default kernel configuration in the input is for RAW10 and v4l2src doesn’t have support for RAW10 but RAW8. The patch below was created by one of our engineers (JJ) and would add support for it. With this pipeline:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-bayer,format=rggb,width=2592,height=1944' ! bayer2rgb ! nveglglessink
You will see that the image is captured and displayed, however, the colors look wrong, we believe it is because the bayer2rgb works with RAW8 and not with RAW10.
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst/bayer/gstbayer2rgb.c
So options are:
a) Add support to the kernel to use RAW8 and use everything on RAW8
b) Convert the RAW10 images to other format that could be displayed properly, maybe extend bayer2rgb?
We have a patch for a) however, it needs to be tested since it was used in other customer project. Hope this helps.
Index: gst_1.9.1/gst-plugins-good-1.9.1/sys/v4l2/gstv4l2object.c
===================================================================
--- gst_1.9.1.orig/gst-plugins-good-1.9.1/sys/v4l2/gstv4l2object.c 2016-10-11 16:07:17.427961922 -0600
+++ gst_1.9.1/gst-plugins-good-1.9.1/sys/v4l2/gstv4l2object.c 2016-10-11 16:08:29.099961393 -0600
@@ -160,10 +160,10 @@
{V4L2_PIX_FMT_NV42, TRUE, GST_V4L2_RAW},
/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
- {V4L2_PIX_FMT_SBGGR8, TRUE, GST_V4L2_CODEC},
- {V4L2_PIX_FMT_SGBRG8, TRUE, GST_V4L2_CODEC},
- {V4L2_PIX_FMT_SGRBG8, TRUE, GST_V4L2_CODEC},
- {V4L2_PIX_FMT_SRGGB8, TRUE, GST_V4L2_CODEC},
+ {V4L2_PIX_FMT_SBGGR10, TRUE, GST_V4L2_CODEC},
+ {V4L2_PIX_FMT_SGBRG10, TRUE, GST_V4L2_CODEC},
+ {V4L2_PIX_FMT_SGRBG10, TRUE, GST_V4L2_CODEC},
+ {V4L2_PIX_FMT_SRGGB10, TRUE, GST_V4L2_CODEC},
/* compressed formats */
{V4L2_PIX_FMT_MJPEG, FALSE, GST_V4L2_CODEC},
@@ -1072,10 +1072,10 @@
rank = 0;
break;
- case V4L2_PIX_FMT_SBGGR8:
- case V4L2_PIX_FMT_SGBRG8:
- case V4L2_PIX_FMT_SGRBG8:
- case V4L2_PIX_FMT_SRGGB8:
+ case V4L2_PIX_FMT_SBGGR10:
+ case V4L2_PIX_FMT_SGBRG10:
+ case V4L2_PIX_FMT_SGRBG10:
+ case V4L2_PIX_FMT_SRGGB10:
rank = BAYER_BASE_RANK;
break;
@@ -1461,15 +1461,15 @@
break;
case V4L2_PIX_FMT_WNVA: /* Winnov hw compres */
break;
- case V4L2_PIX_FMT_SBGGR8:
- case V4L2_PIX_FMT_SGBRG8:
- case V4L2_PIX_FMT_SGRBG8:
- case V4L2_PIX_FMT_SRGGB8:
+ case V4L2_PIX_FMT_SBGGR10:
+ case V4L2_PIX_FMT_SGBRG10:
+ case V4L2_PIX_FMT_SGRBG10:
+ case V4L2_PIX_FMT_SRGGB10:
structure = gst_structure_new ("video/x-bayer", "format", G_TYPE_STRING,
- fourcc == V4L2_PIX_FMT_SBGGR8 ? "bggr" :
- fourcc == V4L2_PIX_FMT_SGBRG8 ? "gbrg" :
- fourcc == V4L2_PIX_FMT_SGRBG8 ? "grbg" :
- /* fourcc == V4L2_PIX_FMT_SRGGB8 ? */ "rggb", NULL);
+ fourcc == V4L2_PIX_FMT_SBGGR10 ? "bggr" :
+ fourcc == V4L2_PIX_FMT_SGBRG10 ? "gbrg" :
+ fourcc == V4L2_PIX_FMT_SGRBG10 ? "grbg" :
+ fourcc == V4L2_PIX_FMT_SRGGB10 ? "rggb" : "rggb" , NULL);
break;
case V4L2_PIX_FMT_SN9C10X:
structure = gst_structure_new_empty ("video/x-sonix");
@@ -1769,13 +1769,13 @@
const gchar *format = gst_structure_get_string (structure, "format");
if (format) {
if (!g_ascii_strcasecmp (format, "bggr"))
- fourcc = V4L2_PIX_FMT_SBGGR8;
+ fourcc = V4L2_PIX_FMT_SBGGR10;
else if (!g_ascii_strcasecmp (format, "gbrg"))
- fourcc = V4L2_PIX_FMT_SGBRG8;
+ fourcc = V4L2_PIX_FMT_SGBRG10;
else if (!g_ascii_strcasecmp (format, "grbg"))
- fourcc = V4L2_PIX_FMT_SGRBG8;
+ fourcc = V4L2_PIX_FMT_SGRBG10;
else if (!g_ascii_strcasecmp (format, "rggb"))
- fourcc = V4L2_PIX_FMT_SRGGB8;
+ fourcc = V4L2_PIX_FMT_SRGGB10;
}
} else if (g_str_equal (mimetype, "video/x-sonix")) {
fourcc = V4L2_PIX_FMT_SN9C10X;
Here are some instructions to rebuild gstreamer: