Mercurial > libavcodec.hg
diff imgconvert.c @ 1282:8988af3ae1e8 libavcodec
Warning and compatibility fixes.
author | mellum |
---|---|
date | Sat, 24 May 2003 18:48:30 +0000 |
parents | 5d2376294fbf |
children | cfc80b3a4ada |
line wrap: on
line diff
--- a/imgconvert.c Fri May 23 18:04:34 2003 +0000 +++ b/imgconvert.c Sat May 24 18:48:30 2003 +0000 @@ -747,14 +747,13 @@ cm[(((y) - 128) * FIX(127.0/112.0) + (ONE_HALF + (128 << SCALEBITS))) >> SCALEBITS] /* NOTE: the clamp is really necessary! */ -#define C_JPEG_TO_CCIR(y)\ -({\ - int __y;\ - __y = ((((y) - 128) * FIX(112.0/127.0) + (ONE_HALF + (128 << SCALEBITS))) >> SCALEBITS);\ - if (__y < 16)\ - __y = 16;\ - __y;\ -}) +static inline int C_JPEG_TO_CCIR(int y) { + y = (((y - 128) * FIX(112.0/127.0) + (ONE_HALF + (128 << SCALEBITS))) >> SCALEBITS); + if (y < 16) + y = 16; + return y; +} + #define RGB_TO_Y(r, g, b) \ ((FIX(0.29900) * (r) + FIX(0.58700) * (g) + \ @@ -1608,8 +1607,6 @@ void *ptr; size = avpicture_get_size(pix_fmt, width, height); - if (size < 0) - goto fail; ptr = av_malloc(size); if (!ptr) goto fail;