summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4lconvert
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-11 13:16:22 +0100
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-11 13:16:22 +0100
commitd58bea2b9caa5512cbd5136719391cc7055fe410 (patch)
tree3f28b783be70d2c1f1e1268aa5af00365cf97405 /v4l2-apps/libv4l/libv4lconvert
parentd02d1e3c9f20e691d7d3ff62275d57bfc4766e19 (diff)
downloadmediapointer-dvb-s2-d58bea2b9caa5512cbd5136719391cc7055fe410.tar.gz
mediapointer-dvb-s2-d58bea2b9caa5512cbd5136719391cc7055fe410.tar.bz2
libv4l: remove duplicate v4lconvert_yvyu_to_yuv420 function
From: Hans de Goede <hdegoede@redhat.com> Remove v4lconvert_yvyu_to_yuv420 function as its functionality is duplicate with v4lconvert_yuyv_to_yuv420 Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert')
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h3
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c6
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/rgbyuv.c39
3 files changed, 4 insertions, 44 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
index c268375c8..c8fa705f0 100644
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
@@ -129,9 +129,6 @@ void v4lconvert_yvyu_to_rgb24(const unsigned char *src, unsigned char *dst,
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, int yvu);
-
void v4lconvert_uyvy_to_rgb24(const unsigned char *src, unsigned char *dst,
int width, int height);
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
index c01286b73..776bbfe14 100644
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
@@ -711,10 +711,12 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
v4lconvert_yvyu_to_bgr24(src, dest, width, height);
break;
case V4L2_PIX_FMT_YUV420:
- v4lconvert_yvyu_to_yuv420(src, dest, width, height, 0);
+ /* Note we use yuyv_to_yuv420 not v4lconvert_yvyu_to_yuv420,
+ with the last argument reversed to make it have as we want */
+ v4lconvert_yuyv_to_yuv420(src, dest, width, height, 1);
break;
case V4L2_PIX_FMT_YVU420:
- v4lconvert_yvyu_to_yuv420(src, dest, width, height, 1);
+ v4lconvert_yuyv_to_yuv420(src, dest, width, height, 0);
break;
}
break;
diff --git a/v4l2-apps/libv4l/libv4lconvert/rgbyuv.c b/v4l2-apps/libv4l/libv4lconvert/rgbyuv.c
index ec297b1f7..00706be9d 100644
--- a/v4l2-apps/libv4l/libv4lconvert/rgbyuv.c
+++ b/v4l2-apps/libv4l/libv4lconvert/rgbyuv.c
@@ -339,45 +339,6 @@ void v4lconvert_yvyu_to_rgb24(const unsigned char *src, unsigned char *dest,
}
}
-void v4lconvert_yvyu_to_yuv420(const unsigned char *src, unsigned char *dest,
- int width, int height, int yvu)
-{
- int i, j;
- const unsigned char *src1;
- unsigned char *udest, *vdest;
-
- /* copy the Y values */
- src1 = src;
- for (i = 0; i < height; i++) {
- for (j = 0; j < width; j += 2) {
- *dest++ = src1[0];
- *dest++ = src1[2];
- src1 += 4;
- }
- }
-
- /* copy the U and V values */
- src++; /* point to V */
- src1 = src + width * 2; /* next line */
- if (yvu) {
- vdest = dest;
- udest = dest + width * height / 4;
- } else {
- udest = dest;
- vdest = dest + width * height / 4;
- }
- for (i = 0; i < height; i += 2) {
- for (j = 0; j < width; j += 2) {
- *udest++ = ((int) src[2] + src1[2]) / 2; /* U */
- *vdest++ = ((int) src[0] + src1[0]) / 2; /* V */
- src += 4;
- src1 += 4;
- }
- src = src1;
- src1 += width * 2;
- }
-}
-
void v4lconvert_uyvy_to_bgr24(const unsigned char *src, unsigned char *dest,
int width, int height)
{