From a7e6312b1e5e852edb62a094e94cfae06f01391b Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 23 May 2009 23:32:29 +0000 Subject: [PATCH] Remove duplicated RGB_TO_[YUV]_CCIR macros, directly use those defined in libavcodec/colorspace.h. Originally committed as revision 18922 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffplay.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/ffplay.c b/ffplay.c index de2bf98811..5f88a46caa 100644 --- a/ffplay.c +++ b/ffplay.c @@ -27,6 +27,7 @@ #include "libavdevice/avdevice.h" #include "libswscale/swscale.h" #include "libavcodec/audioconvert.h" +#include "libavcodec/colorspace.h" #include "libavcodec/opt.h" #include "cmdutils.h" @@ -387,24 +388,6 @@ void fill_border(VideoState *s, int x, int y, int w, int h, int color) } #endif - - -#define SCALEBITS 10 -#define ONE_HALF (1 << (SCALEBITS - 1)) -#define FIX(x) ((int) ((x) * (1<> SCALEBITS) - -#define RGB_TO_U_CCIR(r1, g1, b1, shift)\ -(((- FIX(0.16874*224.0/255.0) * r1 - FIX(0.33126*224.0/255.0) * g1 + \ - FIX(0.50000*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128) - -#define RGB_TO_V_CCIR(r1, g1, b1, shift)\ -(((FIX(0.50000*224.0/255.0) * r1 - FIX(0.41869*224.0/255.0) * g1 - \ - FIX(0.08131*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128) - #define ALPHA_BLEND(a, oldp, newp, s)\ ((((oldp << s) * (255 - (a))) + (newp * (a))) / (255 << s))