summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Stadler <rene.stadler@collabora.co.uk>2012-08-18 00:32:00 +0200
committerRené Stadler <rene.stadler@collabora.co.uk>2012-08-18 00:32:00 +0200
commita3800913b3ec1ef4d3aad7f5b31829a4fd9ba120 (patch)
tree8c6da76b2bef14979357f86b7b52323df681893a
parentb7a1d76fbb9567b9dca802d066fbb89f080b69e0 (diff)
v4l2: fix BGR32 masks
According to http://v4l2spec.bytesex.org/spec/r2492.htm
-rw-r--r--sys/v4l2/gstv4l2object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 91c0b3793..53fcd0073 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -1230,9 +1230,9 @@ gst_v4l2_object_v4l2fourcc_to_structure (guint32 fourcc)
case V4L2_PIX_FMT_BGR32:
bpp = depth = 32;
endianness = G_BIG_ENDIAN;
- r_mask = 0x000000ff;
- g_mask = 0x0000ff00;
- b_mask = 0x00ff0000;
+ r_mask = 0x0000ff00;
+ g_mask = 0x00ff0000;
+ b_mask = 0xff000000;
break;
default:
g_assert_not_reached ();
@@ -1515,7 +1515,7 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
fourcc = (r_mask == 0xFF) ? V4L2_PIX_FMT_BGR24 : V4L2_PIX_FMT_RGB24;
break;
case 32:
- fourcc = (r_mask == 0xFF) ? V4L2_PIX_FMT_BGR32 : V4L2_PIX_FMT_RGB32;
+ fourcc = (r_mask == 0xFF00) ? V4L2_PIX_FMT_BGR32 : V4L2_PIX_FMT_RGB32;
break;
}
} else if (strcmp (mimetype, "video/x-dv") == 0) {