diff options
author | Falk Hüffner <mellum@users.sourceforge.net> | 2003-05-24 18:48:30 +0000 |
---|---|---|
committer | Falk Hüffner <mellum@users.sourceforge.net> | 2003-05-24 18:48:30 +0000 |
commit | 4cfbf61bf173e303e253d95717d5038c8c8c529c (patch) | |
tree | 329da6e4dd478648a38326868adf19d0758aeb5c /libavcodec/imgconvert.c | |
parent | f184683552090cc9d38a7b1c8d27bb348a2ef7b4 (diff) | |
download | ffmpeg-4cfbf61bf173e303e253d95717d5038c8c8c529c.tar.gz |
Warning and compatibility fixes.
Originally committed as revision 1902 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/imgconvert.c')
-rw-r--r-- | libavcodec/imgconvert.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index a19f1d3ed0..6a36c85589 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -747,14 +747,13 @@ static void yuv422p_to_yuv422(AVPicture *dst, AVPicture *src, 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 @@ static int avpicture_alloc(AVPicture *picture, void *ptr; size = avpicture_get_size(pix_fmt, width, height); - if (size < 0) - goto fail; ptr = av_malloc(size); if (!ptr) goto fail; |