Commit eeb96ecd authored by stefano's avatar stefano

Remove duplicated RGB_TO_[YUV] macros, use those included in

libavcodec/colorspace.h.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18901 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6ca2cf82
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "libswscale/swscale.h" #include "libswscale/swscale.h"
#include "libavcodec/opt.h" #include "libavcodec/opt.h"
#include "libavcodec/audioconvert.h" #include "libavcodec/audioconvert.h"
#include "libavcodec/colorspace.h"
#include "libavutil/fifo.h" #include "libavutil/fifo.h"
#include "libavutil/avstring.h" #include "libavutil/avstring.h"
#include "libavformat/os_support.h" #include "libavformat/os_support.h"
...@@ -2456,23 +2457,6 @@ static void opt_frame_size(const char *arg) ...@@ -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) { static void opt_pad_color(const char *arg) {
/* Input is expected to be six hex digits similar to /* Input is expected to be six hex digits similar to
how colors are expressed in html tags (but without the #) */ how colors are expressed in html tags (but without the #) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment