From d365b68517797f2e049b45d4bd4410e65f34f9bc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 10 Sep 2013 16:03:08 +0200 Subject: [PATCH] videoscale: fix RGB15 masks --- gst/videoscale/vs_scanline.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gst/videoscale/vs_scanline.c b/gst/videoscale/vs_scanline.c index 91cee731c0..717819eb94 100644 --- a/gst/videoscale/vs_scanline.c +++ b/gst/videoscale/vs_scanline.c @@ -661,13 +661,12 @@ vs_scanline_merge_linear_RGB565 (uint8_t * dest_u8, uint8_t * src1_u8, /* note that src and dest are uint16_t, and thus endian dependent */ -#define RGB555_R(x) (((x)&0x7c00)>>8 | ((x)&0x7c00)>>13) -#define RGB555_G(x) (((x)&0x03e0)>>3 | ((x)&0x03e0)>>9) +#define RGB555_R(x) (((x)&0x7c00)>>7 | ((x)&0x7c00)>>12) +#define RGB555_G(x) (((x)&0x03e0)>>2 | ((x)&0x03e0)>>7) #define RGB555_B(x) (((x)&0x001f)<<3 | ((x)&0x001f)>>2) #define RGB555(r,g,b) \ - ((((r)<<7)&0x7c00) | (((g)<<3)&0x03e0) | (((b)>>3)&0x001f)) - + ((((r)<<7)&0x7c00) | (((g)<<2)&0x03e0) | (((b)>>3)&0x001f)) void vs_scanline_downsample_RGB555 (uint8_t * dest_u8, uint8_t * src_u8, int n)