summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-11 13:06:14 +0100
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-11 13:06:14 +0100
commit222cbd6fd0bec2c2e4566a251729f1329e031a22 (patch)
treed788833d126a894b444e222123600d5d4cb01ec1 /v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
parent24ef92f0974bf26cf8ca949b7ae21286cbca3fd3 (diff)
downloadmediapointer-dvb-s2-222cbd6fd0bec2c2e4566a251729f1329e031a22.tar.gz
mediapointer-dvb-s2-222cbd6fd0bec2c2e4566a251729f1329e031a22.tar.bz2
libv4l: Add software cropping from CIF to VGA modes (fix skype)
From: Hans de Goede <hdegoede@redhat.com> * Add support for software cropping from 352x288 -> 320x240 / 176x144 -> 160x120, so that apps which will only work with vga resolutions like 320x240 (Skype!) will work with cams/drivers which do not support cropping CIF resolutions to VGA resolutions in hardware. This makes all 2.6.27 gspca supported cams, except for the pac7302 which only does 640x480 (and skype wants 320x240), work with skype * The v4lconvert_convert function was becoming a bit of a mess, so split the functionailiy into seperate v4lconvert_convert_pixfmt, v4lconvert_rotate and v4lconvert_crop functions, and make v4lconvert_convert a frontend to these Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h')
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
index 0c4eff6ce..99ffdec20 100644
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
@@ -71,7 +71,8 @@
"v4l-convert: error " __VA_ARGS__)
/* Card flags */
-#define V4LCONVERT_UPSIDE_DOWN 0x01
+#define V4LCONVERT_ROTATE_90 0x01
+#define V4LCONVERT_ROTATE_180 0x02
/* Pixformat flags */
#define V4LCONVERT_COMPRESSED 0x01
@@ -151,16 +152,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_rotate90_rgbbgr24(const unsigned char *src, unsigned char *dst,
- int destwidth, int destheight);
+void v4lconvert_rotate(unsigned char *src, unsigned char *dest,
+ int width, int height, unsigned int pix_fmt, int rotate);
-void v4lconvert_rotate90_yuv420(const unsigned char *src, unsigned char *dst,
- int destwidth, int destheight);
-
-void v4lconvert_rotate180_rgbbgr24(const unsigned char *src, unsigned char *dst,
- int width, int height);
-
-void v4lconvert_rotate180_yuv420(const unsigned char *src, unsigned char *dst,
- int width, int height);
+void v4lconvert_crop(unsigned char *src, unsigned char *dest,
+ const struct v4l2_format *src_fmt, const struct v4l2_format *dest_fmt);
#endif