[FFmpeg-cvslog] sws: move RGB2YUV_SHIFT to swscale_internal.h

Michael Niedermayer git at videolan.org
Mon Apr 15 01:32:31 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 14 23:51:58 2013 +0200| [3662e49dde0b193244eae6b8e1ab236aeb247632] | committer: Michael Niedermayer

sws: move RGB2YUV_SHIFT to swscale_internal.h

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3662e49dde0b193244eae6b8e1ab236aeb247632
---

 libswscale/input.c            |    2 --
 libswscale/swscale.c          |    1 -
 libswscale/swscale_internal.h |    1 +
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/libswscale/input.c b/libswscale/input.c
index b682acd..5259603 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -36,8 +36,6 @@
 #include "swscale.h"
 #include "swscale_internal.h"
 
-#define RGB2YUV_SHIFT 15
-
 #define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
 
 #define r ((origin == AV_PIX_FMT_BGR48BE || origin == AV_PIX_FMT_BGR48LE) ? b_r : r_b)
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 0dcd39b..d72a8ac 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -385,7 +385,6 @@ static int swScale(SwsContext *c, const uint8_t *src[],
 
     if (!usePal(c->srcFormat)) {
         pal = c->input_rgb2yuv_table;
-#define RGB2YUV_SHIFT 15
         pal[BY_IDX] =  ((int)(0.114 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
         pal[BV_IDX] = (-(int)(0.081 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
         pal[BU_IDX] =  ((int)(0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index e801bc9..4de94a6 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -370,6 +370,7 @@ typedef struct SwsContext {
 #define RV_IDX 6
 #define GV_IDX 7
 #define BV_IDX 8
+#define RGB2YUV_SHIFT 15
 
     int *dither_error[4];
 



More information about the ffmpeg-cvslog mailing list