From 2cc1e944209c3eccf7ff91ce2a7f5294dde68dd5 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Fri, 3 Jul 2009 10:59:47 +0200 Subject: libv4l: add support for RGB565 format From: Mauro Carvalho Chehab Currently, em28xx driver outputs webcams only at RGB565 format. However, several webcam applications don't support this format. In order to properly work with those applications, a RGB565 handler should be added at libv4l. Tested with Silvercrest 1.3 mpix with v4l2grab (V4L2, with native libv4l support) and two LD_PRELOAD applications: camorama (V4L1 API) and skype (using compat32). Priority: normal Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h index 2cf8f6ba4..d8a09c24a 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -184,6 +184,15 @@ void v4lconvert_swap_rgb(const unsigned char *src, unsigned char *dst, void v4lconvert_swap_uv(const unsigned char *src, unsigned char *dst, const struct v4l2_format *src_fmt); +void v4lconvert_rgb565_to_rgb24(const unsigned char *src, unsigned char *dest, + int width, int height); + +void v4lconvert_rgb565_to_bgr24(const unsigned char *src, unsigned char *dest, + int width, int height); + +void v4lconvert_rgb565_to_yuv420(const unsigned char *src, unsigned char *dest, + const struct v4l2_format *src_fmt, int yvu); + void v4lconvert_spca501_to_yuv420(const unsigned char *src, unsigned char *dst, int width, int height, int yvu); -- cgit v1.2.3 From 63e4f194ca8471bdaf2c9442dece27410fb07cc9 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Thu, 9 Jul 2009 14:12:00 +0200 Subject: libv4l: Improved pac207 decompression code From: Hans de Goede Improved pac207 decompression code to also support higher compression modes of the pac207, which enables us to use higher framerates. Many many thanks to Bertrik Sikken for figuring the decompression out! Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h index d8a09c24a..4e3456bee 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -211,7 +211,8 @@ void v4lconvert_decode_spca561(const unsigned char *src, unsigned char *dst, void v4lconvert_decode_sn9c10x(const unsigned char *src, unsigned char *dst, int width, int height); -void v4lconvert_decode_pac207(const unsigned char *src, unsigned char *dst, +int v4lconvert_decode_pac207(struct v4lconvert_data *data, + const unsigned char *inp, int src_size, unsigned char *outp, int width, int height); void v4lconvert_decode_mr97310a(const unsigned char *src, unsigned char *dst, -- cgit v1.2.3 From faf2479d2dfa16ad1c7a316f0443df4fa6f9c3c8 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Wed, 5 Aug 2009 12:28:07 +0200 Subject: libv4l: update my email address From: Hans de Goede libv4l: update my email address Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h index 4e3456bee..a61a2eeb7 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -1,5 +1,5 @@ /* -# (C) 2008 Hans de Goede +# (C) 2008 Hans de Goede # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by -- cgit v1.2.3 From 78119829e59604c3996a9af01c254dc1f8026962 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Fri, 14 Aug 2009 09:57:02 +0200 Subject: libv4l: Do not hide JPG / MJPG pixfmt from applications From: Hans de Goede Some applications want to use jpg format if possible, so do not hide it from the apps (do not assume it always needs conversion) Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h index a61a2eeb7..f10f3f607 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -108,6 +108,7 @@ /* Pixformat flags */ #define V4LCONVERT_COMPRESSED 0x01 /* Compressed format */ #define V4LCONVERT_NEEDS_CONVERSION 0x02 /* Apps likely wont know this */ +#define V4LCONVERT_COMPRESSED_AND_NEEDS_CONVERSION 0x03 struct v4lconvert_data { int fd; -- cgit v1.2.3 From f51afe7738282b8d0789cf9b9e02ed1f4ba3bb05 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Tue, 25 Aug 2009 10:42:25 +0200 Subject: libv4l: support decompressing sn9c2028 compressed bayer From: Theodore Kilgore libv4l: support decompressing sn9c2028 compressed bayer Priority: normal Signed-off-by: Theodore Kilgore Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h index f10f3f607..05549e6b5 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -52,6 +52,10 @@ #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M','3','1','0') #endif +#ifndef V4L2_PIX_FMT_SN9C2028 +#define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') +#endif + #ifndef V4L2_PIX_FMT_SQ905C #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') #endif @@ -219,6 +223,9 @@ int v4lconvert_decode_pac207(struct v4lconvert_data *data, void v4lconvert_decode_mr97310a(const unsigned char *src, unsigned char *dst, int width, int height); +void v4lconvert_decode_sn9c2028(const unsigned char *src, unsigned char *dst, + int width, int height); + void v4lconvert_decode_sq905c(const unsigned char *src, unsigned char *dst, int width, int height); -- cgit v1.2.3 From c0cfb90f8b7c4b713c734cb7b19b3bc834f516c3 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Mon, 31 Aug 2009 16:40:33 +0200 Subject: libv4l: Report V4L2_FMT_FLAG_EMULATED in v4l2_fmtdesc flags for emulated formats From: Hans de Goede libv4l: Report V4L2_FMT_FLAG_EMULATED in v4l2_fmtdesc flags for emulated formats Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h index 05549e6b5..f16d05d02 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -96,6 +96,10 @@ #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ #endif +#ifndef V4L2_FMT_FLAG_EMULATED +#define V4L2_FMT_FLAG_EMULATED 0x0002 +#endif + #define ARRAY_SIZE(x) ((int)sizeof(x)/(int)sizeof((x)[0])) #define V4LCONVERT_ERROR_MSG_SIZE 256 -- cgit v1.2.3