changeset 11691:30c8b8be44e1

correct C init tables
author alex
date Sat, 27 Dec 2003 19:54:59 +0000
parents 860bc06f32ca
children b74652c13660
files postproc/yuv2rgb.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/postproc/yuv2rgb.c	Sat Dec 27 19:45:54 2003 +0000
+++ b/postproc/yuv2rgb.c	Sat Dec 27 19:54:59 2003 +0000
@@ -642,8 +642,8 @@
 
 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 = IMGFMT_IS_RGB(c->dstFormat);
+    const int bpp = isRgb?IMGFMT_RGB_DEPTH(c->dstFormat):IMGFMT_BGR_DEPTH(c->dstFormat);
     int i;
     uint8_t table_Y[1024];
     uint32_t *table_32 = 0;