From c392464d3809e3840f5c762f598d8b13eb36c1b5 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 27 Dec 2003 19:54:59 +0000 Subject: correct C init tables git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11692 b3059339-0415-0410-9bf9-f77b7e298cf2 --- postproc/yuv2rgb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postproc/yuv2rgb.c b/postproc/yuv2rgb.c index 24295d014d..a35977975c 100644 --- a/postproc/yuv2rgb.c +++ b/postproc/yuv2rgb.c @@ -642,8 +642,8 @@ static int div_round (int dividend, int divisor) 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; -- cgit v1.2.3