sws: move RGB2YUV_SHIFT to swscale_internal.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/14/head
Michael Niedermayer 12 years ago
parent e66a10689b
commit 3662e49dde
  1. 2
      libswscale/input.c
  2. 1
      libswscale/swscale.c
  3. 1
      libswscale/swscale_internal.h

@ -36,8 +36,6 @@
#include "swscale.h" #include "swscale.h"
#include "swscale_internal.h" #include "swscale_internal.h"
#define RGB2YUV_SHIFT 15
#define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos)) #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) #define r ((origin == AV_PIX_FMT_BGR48BE || origin == AV_PIX_FMT_BGR48LE) ? b_r : r_b)

@ -385,7 +385,6 @@ static int swScale(SwsContext *c, const uint8_t *src[],
if (!usePal(c->srcFormat)) { if (!usePal(c->srcFormat)) {
pal = c->input_rgb2yuv_table; pal = c->input_rgb2yuv_table;
#define RGB2YUV_SHIFT 15
pal[BY_IDX] = ((int)(0.114 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5)); 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[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)); pal[BU_IDX] = ((int)(0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));

@ -370,6 +370,7 @@ typedef struct SwsContext {
#define RV_IDX 6 #define RV_IDX 6
#define GV_IDX 7 #define GV_IDX 7
#define BV_IDX 8 #define BV_IDX 8
#define RGB2YUV_SHIFT 15
int *dither_error[4]; int *dither_error[4];

Loading…
Cancel
Save