From fd1a54135c2d7959bf7b78cada95ee9152eedf41 Mon Sep 17 00:00:00 2001 From: "hans@localhost.localdomain" Date: Wed, 3 Sep 2008 11:36:18 +0200 Subject: libv4l: Add suport for YUYV and YVYU packed pixel formats From: Jean-Francois Moine libv4l: Add suport for YUYV and YVYU packed pixel formats Priority: normal Signed-off-by: Jean-Francois Moine Signed-off-by: Hans de Goede --- .../lib/libv4l/libv4lconvert/libv4lconvert-priv.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h index 915c33283..efe78bb85 100644 --- a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -59,6 +59,10 @@ #define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R','G','G','B') #endif +#ifndef V4L2_PIX_FMT_YVYU +#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') +#endif + #define V4LCONVERT_ERROR_MSG_SIZE 256 #define V4LCONVERT_ERR(...) \ @@ -87,6 +91,24 @@ void v4lconvert_yuv420_to_rgb24(const unsigned char *src, unsigned char *dst, void v4lconvert_yuv420_to_bgr24(const unsigned char *src, unsigned char *dst, int width, int height); +void v4lconvert_yuyv_to_rgb24(const unsigned char *src, unsigned char *dst, + int width, int height); + +void v4lconvert_yuyv_to_bgr24(const unsigned char *src, unsigned char *dst, + int width, int height); + +void v4lconvert_yuyv_to_yuv420(const unsigned char *src, unsigned char *dst, + int width, int height); + +void v4lconvert_yvyu_to_rgb24(const unsigned char *src, unsigned char *dst, + int width, int height); + +void v4lconvert_yvyu_to_bgr24(const unsigned char *src, unsigned char *dst, + int width, int height); + +void v4lconvert_yvyu_to_yuv420(const unsigned char *src, unsigned char *dst, + int width, int height); + void v4lconvert_swap_rgb(const unsigned char *src, unsigned char *dst, int width, int height); -- cgit v1.2.3 From d00cfd7d61d0a9cf2b38a816bfd5478f3342a0e4 Mon Sep 17 00:00:00 2001 From: "hans@localhost.localdomain" Date: Wed, 3 Sep 2008 14:24:30 +0200 Subject: libv4l: Prefer compressed pixformats for resolutions > 176x144 From: Hans de Goede libv4l: Prefer compressed pixformats for resolutions > 176x144 Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h index efe78bb85..a2086e6fd 100644 --- a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -69,8 +69,12 @@ snprintf(data->error_msg, V4LCONVERT_ERROR_MSG_SIZE, \ "v4l-convert: error " __VA_ARGS__) +/* Card flags */ #define V4LCONVERT_UPSIDE_DOWN 0x01 +/* Pixformat flags */ +#define V4LCONVERT_COMPRESSED 0x01 + struct v4lconvert_data { int fd; int flags; /* bitfield */ @@ -85,6 +89,11 @@ struct v4lconvert_flags_info { int flags; }; +struct v4lconvert_pixfmt { + unsigned int fmt; + int flags; +}; + void v4lconvert_yuv420_to_rgb24(const unsigned char *src, unsigned char *dst, int width, int height); -- cgit v1.2.3 From 37365f711151fceee2bbc87ef7836c5f08b7c1f1 Mon Sep 17 00:00:00 2001 From: "hans@localhost.localdomain" Date: Mon, 15 Sep 2008 13:48:21 +0200 Subject: libv4l: 0.5.0 release From: Hans de Goede * Add support for enumerating framesizes and frameintervals of emulated formats when the driver supports it for the real format * Make sure the video device always gets opened RW even if the application asks for RO * Add Genius E-Messenger 112 (093a:2476) to list of cams which have their sensor upside down Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h index a2086e6fd..0c4eff6ce 100644 --- a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -64,6 +64,7 @@ #endif #define V4LCONVERT_ERROR_MSG_SIZE 256 +#define V4LCONVERT_MAX_FRAMESIZES 16 #define V4LCONVERT_ERR(...) \ snprintf(data->error_msg, V4LCONVERT_ERROR_MSG_SIZE, \ @@ -82,6 +83,8 @@ struct v4lconvert_data { unsigned int no_formats; char error_msg[V4LCONVERT_ERROR_MSG_SIZE]; struct jdec_private *jdec; + struct v4l2_frmsizeenum framesizes[V4LCONVERT_MAX_FRAMESIZES]; + unsigned int no_framesizes; }; struct v4lconvert_flags_info { -- cgit v1.2.3