videoscale: fix RGB15 masks

This commit is contained in:
Wim Taymans 2013-09-10 16:03:08 +02:00
parent d7c02f389f
commit d365b68517

View file

@ -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)