summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4lconvert/flip.c
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-04-14 09:51:35 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-04-14 09:51:35 +0200
commit10a09b9ec6e08fb95c36f26d7f69834b0387386b (patch)
treef135d19a9f7d69205f17cb2b22efc9623ef01e6e /v4l2-apps/libv4l/libv4lconvert/flip.c
parentb1352a9018aeac6722d2e8d606f9c0ea140e0abd (diff)
downloadmediapointer-dvb-s2-10a09b9ec6e08fb95c36f26d7f69834b0387386b.tar.gz
mediapointer-dvb-s2-10a09b9ec6e08fb95c36f26d7f69834b0387386b.tar.bz2
libv4l: Enable whitebalancing algorithm based on USB id's
From: Hans de Goede <hdegoede@redhat.com> * Determine wether or not to do whitebalance and/or normalize at all based on USB-ID's. * Add rotate90 hack to flags based on usb-id. Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert/flip.c')
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/flip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/flip.c b/v4l2-apps/libv4l/libv4lconvert/flip.c
index 9835f045c..cc9526493 100644
--- a/v4l2-apps/libv4l/libv4lconvert/flip.c
+++ b/v4l2-apps/libv4l/libv4lconvert/flip.c
@@ -20,6 +20,7 @@
*/
+#include <string.h>
#include "libv4lconvert-priv.h"
static void v4lconvert_rotate180_rgbbgr24(const unsigned char *src,
@@ -134,7 +135,7 @@ void v4lconvert_flip(unsigned char *src, unsigned char *dest,
{
/* FIXME implement separate vflipping and hflipping, for now we always
rotate 180 when vflip is selected! */
- if (flags & V4LCONVERT_VFLIP) {
+ if (flags & V4LCONTROL_VFLIPPED) {
switch (fmt->fmt.pix.pixelformat) {
case V4L2_PIX_FMT_RGB24:
case V4L2_PIX_FMT_BGR24:
@@ -148,4 +149,6 @@ void v4lconvert_flip(unsigned char *src, unsigned char *dest,
break;
}
}
+ else /* FIXME and do nothing when only HFLIP is selected */
+ memcpy(dest, src, fmt->fmt.pix.sizeimage);
}