mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
v4l2object: recognize and distinguish all bayer arrangements
Up to now, v4l2src recognized only "bggr" amongst the bayer arrangements. Recognize now also the "rggb", "gbrg" and "grbg" arrangements. https://bugzilla.gnome.org/show_bug.cgi?id=742363
This commit is contained in:
parent
e57bc43862
commit
61a5e5af95
1 changed files with 14 additions and 1 deletions
|
@ -117,6 +117,9 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = {
|
||||||
|
|
||||||
/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
|
/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
|
||||||
{V4L2_PIX_FMT_SBGGR8, TRUE, GST_V4L2_CODEC},
|
{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},
|
||||||
|
|
||||||
/* compressed formats */
|
/* compressed formats */
|
||||||
{V4L2_PIX_FMT_MJPEG, FALSE, GST_V4L2_CODEC},
|
{V4L2_PIX_FMT_MJPEG, FALSE, GST_V4L2_CODEC},
|
||||||
|
@ -945,6 +948,9 @@ gst_v4l2_object_format_get_rank (const struct v4l2_fmtdesc *fmt)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case V4L2_PIX_FMT_SBGGR8:
|
case V4L2_PIX_FMT_SBGGR8:
|
||||||
|
case V4L2_PIX_FMT_SGBRG8:
|
||||||
|
case V4L2_PIX_FMT_SGRBG8:
|
||||||
|
case V4L2_PIX_FMT_SRGGB8:
|
||||||
rank = BAYER_BASE_RANK;
|
rank = BAYER_BASE_RANK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1263,7 +1269,14 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc)
|
||||||
case V4L2_PIX_FMT_WNVA: /* Winnov hw compres */
|
case V4L2_PIX_FMT_WNVA: /* Winnov hw compres */
|
||||||
break;
|
break;
|
||||||
case V4L2_PIX_FMT_SBGGR8:
|
case V4L2_PIX_FMT_SBGGR8:
|
||||||
structure = gst_structure_new_empty ("video/x-bayer");
|
case V4L2_PIX_FMT_SGBRG8:
|
||||||
|
case V4L2_PIX_FMT_SGRBG8:
|
||||||
|
case V4L2_PIX_FMT_SRGGB8:
|
||||||
|
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);
|
||||||
break;
|
break;
|
||||||
case V4L2_PIX_FMT_SN9C10X:
|
case V4L2_PIX_FMT_SN9C10X:
|
||||||
structure = gst_structure_new_empty ("video/x-sonix");
|
structure = gst_structure_new_empty ("video/x-sonix");
|
||||||
|
|
Loading…
Reference in a new issue