diff options
author | hans@localhost.localdomain <hans@localhost.localdomain> | 2008-08-07 19:34:10 +0200 |
---|---|---|
committer | hans@localhost.localdomain <hans@localhost.localdomain> | 2008-08-07 19:34:10 +0200 |
commit | a63e58c8101caacfc5f82b66de79e794adf0ca3a (patch) | |
tree | eb3169564733ab43c9bef40c22596adafef820a7 /v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h | |
parent | cfbd2d6622d7a75929f34972ca407acb4437d3d2 (diff) | |
download | mediapointer-dvb-s2-a63e58c8101caacfc5f82b66de79e794adf0ca3a.tar.gz mediapointer-dvb-s2-a63e58c8101caacfc5f82b66de79e794adf0ca3a.tar.bz2 |
libv4l: add support for fixing upside down images to libv4lconvert
From: Hans de Goede <j.w.r.degoede@hhs.nl>
Add support to libv4lconvert to flipping the image for upside down mounted
sensors, libv4lconvert will do this automatically if the webcam sets a
flag in its query_fmt reply indicating that this is necessary, this fixes
the upside down image on Philips SPC200NC images
Priority: normal
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h')
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h index bdf847186..7d8fcc568 100644 --- a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -55,6 +55,10 @@ #define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R','G','G','B') #endif +#ifndef V4L2_FMT_FLAG_UPSIDEDOWN +#define V4L2_FMT_FLAG_UPSIDEDOWN 0x0002 +#endif + #define V4LCONVERT_ERROR_MSG_SIZE 256 #define V4LCONVERT_ERR(...) \ @@ -65,6 +69,7 @@ struct v4lconvert_data { int fd; int supported_src_formats; /* bitfield */ + int format_needs_flip; /* bitfield */ unsigned int no_formats; char error_msg[V4LCONVERT_ERROR_MSG_SIZE]; struct jdec_private *jdec; @@ -107,4 +112,10 @@ void v4lconvert_bayer_to_bgr24(const unsigned char *bayer, void v4lconvert_bayer_to_yuv420(const unsigned char *bayer, unsigned char *yuv, int width, int height, unsigned int pixfmt); +void v4lconvert_flip_rgbbgr24(const unsigned char *src, unsigned char *dst, + int width, int height); + +void v4lconvert_flip_yuv420(const unsigned char *src, unsigned char *dst, + int width, int height); + #endif |