[MPlayer-dev-eng] [PATCH] postproc RGB test bug in 1.0pre1

David S. Miller davem at redhat.com
Tue Sep 2 20:02:43 CEST 2003


The test for rgb vs. bgr ordering here seems to be reversed.
On by 32bpp BGR framebuffer, mpeg2 frames were displayed with red
and green reversed because of this bug.

Patch is against 1.0pre1, I guess most people test with the MMX
routines :-)

--- postproc/yuv2rgb.c.~1~	2003-05-01 12:14:27.000000000 -0700
+++ postproc/yuv2rgb.c	2003-09-02 10:42:15.000000000 -0700
@@ -643,7 +643,7 @@
 int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation)
 {  
     const int bpp= c->dstFormat&0xFF;
-    const int isRgb= (c->dstFormat>>24) != 'R';
+    const int isRgb= (c->dstFormat>>24) == 'R';
     int i;
     uint8_t table_Y[1024];
     uint32_t *table_32 = 0;




More information about the MPlayer-dev-eng mailing list