diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-05-23 23:32:29 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-05-23 23:32:29 +0000 |
commit | a7e6312b1e5e852edb62a094e94cfae06f01391b (patch) | |
tree | fca93a21089e4bee3dfe3df58ad2e380927a2552 | |
parent | 77bc343a40cca59c35adbe59dfabb0d45c19b169 (diff) | |
download | ffmpeg-a7e6312b1e5e852edb62a094e94cfae06f01391b.tar.gz |
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
-rw-r--r-- | ffplay.c | 19 |
1 files changed, 1 insertions, 18 deletions
@@ -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) + 0.5)) - -#define RGB_TO_Y_CCIR(r, g, b) \ -((FIX(0.29900*219.0/255.0) * (r) + FIX(0.58700*219.0/255.0) * (g) + \ - FIX(0.11400*219.0/255.0) * (b) + (ONE_HALF + (16 << SCALEBITS))) >> 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)) |