summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-05-23 23:32:29 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-05-23 23:32:29 +0000
commita7e6312b1e5e852edb62a094e94cfae06f01391b (patch)
treefca93a21089e4bee3dfe3df58ad2e380927a2552 /ffplay.c
parent77bc343a40cca59c35adbe59dfabb0d45c19b169 (diff)
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
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c19
1 files changed, 1 insertions, 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) + 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))