summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-13 12:57:33 +0100
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-13 12:57:33 +0100
commitf689c3bd615386cf4c5238d1b4de1aaf4b58ce69 (patch)
tree9d8889b5ae1944cb42bf6796e1a4c824615e5e8d /v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
parent5fad5d7ae948226cd5908eddd69977a1bfebb6ed (diff)
downloadmediapointer-dvb-s2-f689c3bd615386cf4c5238d1b4de1aaf4b58ce69.tar.gz
mediapointer-dvb-s2-f689c3bd615386cf4c5238d1b4de1aaf4b58ce69.tar.bz2
libv4l: add hm12 support for the cx2341x MPEG encoder devices.
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c')
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
index 1ba7f45d7..1204e8ef2 100644
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
@@ -55,6 +55,7 @@ static const struct v4lconvert_pixfmt supported_src_pixfmts[] = {
{ V4L2_PIX_FMT_SPCA501, 0 },
{ V4L2_PIX_FMT_SPCA505, 0 },
{ V4L2_PIX_FMT_SPCA508, 0 },
+ { V4L2_PIX_FMT_HM12, 0 },
{ V4L2_PIX_FMT_MJPEG, V4LCONVERT_COMPRESSED },
{ V4L2_PIX_FMT_JPEG, V4LCONVERT_COMPRESSED },
{ V4L2_PIX_FMT_SPCA561, V4LCONVERT_COMPRESSED },
@@ -604,6 +605,24 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
break;
}
+ /* Conexant cx2341x raw video macroblock format */
+ case V4L2_PIX_FMT_HM12:
+ switch (dest_pix_fmt) {
+ case V4L2_PIX_FMT_RGB24:
+ v4lconvert_hm12_to_rgb24(src, dest, width, height);
+ break;
+ case V4L2_PIX_FMT_BGR24:
+ v4lconvert_hm12_to_bgr24(src, dest, width, height);
+ break;
+ case V4L2_PIX_FMT_YUV420:
+ v4lconvert_hm12_to_yuv420(src, dest, width, height, 0);
+ break;
+ case V4L2_PIX_FMT_YVU420:
+ v4lconvert_hm12_to_yuv420(src, dest, width, height, 1);
+ break;
+ }
+ break;
+
/* compressed bayer formats */
case V4L2_PIX_FMT_SPCA561:
case V4L2_PIX_FMT_SN9C10X: