diff options
author | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-03-11 13:26:09 +0100 |
---|---|---|
committer | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-03-11 13:26:09 +0100 |
commit | dfc2a74d9ccd7ccf6115a1484ce142468866b296 (patch) | |
tree | 79cda30e4a8fcc60c42e8c691ad2c57e07756b51 /v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c | |
parent | ee232e3e24844fa93b83949e34e6a2cc60f8cdfc (diff) | |
download | mediapointer-dvb-s2-dfc2a74d9ccd7ccf6115a1484ce142468866b296.tar.gz mediapointer-dvb-s2-dfc2a74d9ccd7ccf6115a1484ce142468866b296.tar.bz2 |
libv4l: add sn9c20x-i420 decoder
From: Vasily Khoruzhick <anarsoul@gmail.com>
Recent sn9c20x driver written by microdia project
(http://groups.goolge.com/group/microdia) introduce new output format -
sn9c20x-i420. This format is actually scrambled yuv420, so it's very easy and
fast to convert it to yuv420. This patch adds sn9c20x-i420 decoder to the
libv4l-0.5.7
This decoder is much faster than jpeg one (sn9c20x supports JPEG too):
sn9c20x-i420 decoder eats only 10% of 1GHz CPU at 640x480x25fps vs 40% of
1GHz CPU in jpeg at same frame size/rate.
This format should be preffered for sn9c20x, because sn9c20x driver supports
SBGGR8 too, so it should go before SBGGR8 in supported_src_pixfmts.
Priority: normal
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c index 8cc63d47a..43c25ec94 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c @@ -47,6 +47,7 @@ static const struct v4lconvert_pixfmt supported_src_pixfmts[] = { { V4L2_PIX_FMT_YUYV, 0 }, { V4L2_PIX_FMT_YVYU, 0 }, { V4L2_PIX_FMT_UYVY, 0 }, + { V4L2_PIX_FMT_SN9C20X_I420, 0 }, { V4L2_PIX_FMT_SBGGR8, 0 }, { V4L2_PIX_FMT_SGBRG8, 0 }, { V4L2_PIX_FMT_SGRBG8, 0 }, @@ -572,10 +573,11 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, } break; - /* YUYV line by line formats */ + /* Custom cam specific YUV formats */ case V4L2_PIX_FMT_SPCA501: case V4L2_PIX_FMT_SPCA505: case V4L2_PIX_FMT_SPCA508: + case V4L2_PIX_FMT_SN9C20X_I420: { unsigned char *d; int yvu = 0; @@ -602,6 +604,9 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, case V4L2_PIX_FMT_SPCA508: v4lconvert_spca508_to_yuv420(src, d, width, height, yvu); break; + case V4L2_PIX_FMT_SN9C20X_I420: + v4lconvert_sn9c20x_to_yuv420(src, d, width, height, yvu); + break; } switch (dest_pix_fmt) { |