aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-05-22 22:51:46 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-05-22 22:51:46 +0000
commitecfe3929da6f5e53ca4d51e215b0c3597d2183cb (patch)
treeed579feb7bbed4976283c4a66ee63a0f4b2e428a /ffmpeg.c
parent62c58bcc6555890f7dc6d8df467a6a90a93a7e01 (diff)
downloadffmpeg-ecfe3929da6f5e53ca4d51e215b0c3597d2183cb.tar.gz
Remove duplicated RGB_TO_[YUV] macros, use those included in
libavcodec/colorspace.h. Originally committed as revision 18901 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 5f407c96cc..f2c1e79329 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -36,6 +36,7 @@
#include "libswscale/swscale.h"
#include "libavcodec/opt.h"
#include "libavcodec/audioconvert.h"
+#include "libavcodec/colorspace.h"
#include "libavutil/fifo.h"
#include "libavutil/avstring.h"
#include "libavformat/os_support.h"
@@ -2456,23 +2457,6 @@ static void opt_frame_size(const char *arg)
}
}
-
-#define SCALEBITS 10
-#define ONE_HALF (1 << (SCALEBITS - 1))
-#define FIX(x) ((int) ((x) * (1<<SCALEBITS) + 0.5))
-
-#define RGB_TO_Y(r, g, b) \
-((FIX(0.29900) * (r) + FIX(0.58700) * (g) + \
- FIX(0.11400) * (b) + ONE_HALF) >> SCALEBITS)
-
-#define RGB_TO_U(r1, g1, b1, shift)\
-(((- FIX(0.16874) * r1 - FIX(0.33126) * g1 + \
- FIX(0.50000) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128)
-
-#define RGB_TO_V(r1, g1, b1, shift)\
-(((FIX(0.50000) * r1 - FIX(0.41869) * g1 - \
- FIX(0.08131) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128)
-
static void opt_pad_color(const char *arg) {
/* Input is expected to be six hex digits similar to
how colors are expressed in html tags (but without the #) */