Go to the source code of this file.
Defines | |
#define | SCALEBITS 10 |
#define | ONE_HALF (1 << (SCALEBITS - 1)) |
#define | FIX(x) ((int) ((x) * (1<<SCALEBITS) + 0.5)) |
#define | YUV_TO_RGB1_CCIR(cb1, cr1) |
#define | YUV_TO_RGB2_CCIR(r, g, b, y1) |
#define | YUV_TO_RGB1(cb1, cr1) |
#define | YUV_TO_RGB2(r, g, b, y1) |
#define | Y_CCIR_TO_JPEG(y) cm[((y) * FIX(255.0/219.0) + (ONE_HALF - 16 * FIX(255.0/219.0))) >> SCALEBITS] |
#define | Y_JPEG_TO_CCIR(y) (((y) * FIX(219.0/255.0) + (ONE_HALF + (16 << SCALEBITS))) >> SCALEBITS) |
#define | C_CCIR_TO_JPEG(y) cm[(((y) - 128) * FIX(127.0/112.0) + (ONE_HALF + (128 << SCALEBITS))) >> SCALEBITS] |
#define | RGB_TO_Y(r, g, b) |
#define | RGB_TO_U(r1, g1, b1, shift) |
#define | RGB_TO_V(r1, g1, b1, shift) |
#define | RGB_TO_Y_CCIR(r, g, b) |
#define | RGB_TO_U_CCIR(r1, g1, b1, shift) |
#define | RGB_TO_V_CCIR(r1, g1, b1, shift) |
Functions | |
static int | C_JPEG_TO_CCIR (int y) |
Definition in file colorspace.h.
#define C_CCIR_TO_JPEG | ( | y | ) | cm[(((y) - 128) * FIX(127.0/112.0) + (ONE_HALF + (128 << SCALEBITS))) >> SCALEBITS] |
#define FIX | ( | x | ) | ((int) ((x) * (1<<SCALEBITS) + 0.5)) |
Definition at line 32 of file colorspace.h.
#define ONE_HALF (1 << (SCALEBITS - 1)) |
Definition at line 31 of file colorspace.h.
#define RGB_TO_U | ( | r1, | |||
g1, | |||||
b1, | |||||
shift | ) |
#define RGB_TO_U_CCIR | ( | r1, | |||
g1, | |||||
b1, | |||||
shift | ) |
#define RGB_TO_V | ( | r1, | |||
g1, | |||||
b1, | |||||
shift | ) |
#define RGB_TO_V_CCIR | ( | r1, | |||
g1, | |||||
b1, | |||||
shift | ) |
#define RGB_TO_Y | ( | r, | |||
g, | |||||
b | ) |
#define RGB_TO_Y_CCIR | ( | r, | |||
g, | |||||
b | ) |
#define SCALEBITS 10 |
Definition at line 30 of file colorspace.h.
#define Y_CCIR_TO_JPEG | ( | y | ) | cm[((y) * FIX(255.0/219.0) + (ONE_HALF - 16 * FIX(255.0/219.0))) >> SCALEBITS] |
#define Y_JPEG_TO_CCIR | ( | y | ) | (((y) * FIX(219.0/255.0) + (ONE_HALF + (16 << SCALEBITS))) >> SCALEBITS) |
#define YUV_TO_RGB1 | ( | cb1, | |||
cr1 | ) |
#define YUV_TO_RGB1_CCIR | ( | cb1, | |||
cr1 | ) |
Value:
{\ cb = (cb1) - 128;\ cr = (cr1) - 128;\ r_add = FIX(1.40200*255.0/224.0) * cr + ONE_HALF;\ g_add = - FIX(0.34414*255.0/224.0) * cb - FIX(0.71414*255.0/224.0) * cr + \ ONE_HALF;\ b_add = FIX(1.77200*255.0/224.0) * cb + ONE_HALF;\ }
Definition at line 34 of file colorspace.h.
Referenced by dvbsub_parse_clut_segment(), glue(), Process(), and yuv_a_to_rgba().
#define YUV_TO_RGB2 | ( | r, | |||
g, | |||||
b, | |||||
y1 | ) |
#define YUV_TO_RGB2_CCIR | ( | r, | |||
g, | |||||
b, | |||||
y1 | ) |
Value:
{\ y = ((y1) - 16) * FIX(255.0/219.0);\ r = cm[(y + r_add) >> SCALEBITS];\ g = cm[(y + g_add) >> SCALEBITS];\ b = cm[(y + b_add) >> SCALEBITS];\ }
Definition at line 44 of file colorspace.h.
Referenced by dvbsub_parse_clut_segment(), glue(), Process(), and yuv_a_to_rgba().
static int C_JPEG_TO_CCIR | ( | int | y | ) | [inline, static] |