|
|
@@ -66,19 +66,26 @@ |
|
|
|
|
|
|
|
#elif BIT_DEPTH == 10 || BIT_DEPTH == 12 |
|
|
|
|
|
|
|
#if BIT_DEPTH == 10 |
|
|
|
#define W1 (22725*4) // 90901 |
|
|
|
#define W2 (21407*4) // 85627 |
|
|
|
#define W3 (19265*4) // 77062 |
|
|
|
#define W4 (16384*4) // 65535 |
|
|
|
#define W5 (12873*4) // 51491 |
|
|
|
#define W6 ( 8867*4) // 35468 |
|
|
|
#define W7 ( 4520*4) // 18081 |
|
|
|
|
|
|
|
#define ROW_SHIFT 15 |
|
|
|
#define COL_SHIFT 20 |
|
|
|
#define DC_SHIFT 1 |
|
|
|
#else |
|
|
|
# if BIT_DEPTH == 10 |
|
|
|
#define W1 22725 // 90901 |
|
|
|
#define W2 21407 // 85627 |
|
|
|
#define W3 19265 // 77062 |
|
|
|
#define W4 16384 // 65535 |
|
|
|
#define W5 12873 // 51491 |
|
|
|
#define W6 8867 // 35468 |
|
|
|
#define W7 4520 // 18081 |
|
|
|
|
|
|
|
# ifdef EXTRA_SHIFT |
|
|
|
#define ROW_SHIFT 13 |
|
|
|
#define COL_SHIFT 18 |
|
|
|
#define DC_SHIFT 1 |
|
|
|
# else |
|
|
|
#define ROW_SHIFT 12 |
|
|
|
#define COL_SHIFT 19 |
|
|
|
#define DC_SHIFT 2 |
|
|
|
# endif |
|
|
|
|
|
|
|
# else |
|
|
|
#define W1 45451 |
|
|
|
#define W2 42813 |
|
|
|
#define W3 38531 |
|
|
@@ -90,7 +97,7 @@ |
|
|
|
#define ROW_SHIFT 16 |
|
|
|
#define COL_SHIFT 17 |
|
|
|
#define DC_SHIFT -1 |
|
|
|
#endif |
|
|
|
# endif |
|
|
|
|
|
|
|
#define MUL(a, b) ((a) * (b)) |
|
|
|
#define MAC(a, b, c) ((a) += (b) * (c)) |
|
|
@@ -101,7 +108,11 @@ |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef EXTRA_SHIFT |
|
|
|
static inline void FUNC(idctRowCondDC_extrashift)(int16_t *row, int extra_shift) |
|
|
|
#else |
|
|
|
static inline void FUNC(idctRowCondDC)(int16_t *row, int extra_shift) |
|
|
|
#endif |
|
|
|
{ |
|
|
|
int a0, a1, a2, a3, b0, b1, b2, b3; |
|
|
|
|
|
|
@@ -236,6 +247,9 @@ static inline void FUNC(idctRowCondDC)(int16_t *row, int extra_shift) |
|
|
|
} \ |
|
|
|
} while (0) |
|
|
|
|
|
|
|
#ifdef EXTRA_SHIFT |
|
|
|
static inline void FUNC(idctSparseCol_extrashift)(int16_t *col) |
|
|
|
#else |
|
|
|
static inline void FUNC(idctSparseColPut)(pixel *dest, int line_size, |
|
|
|
int16_t *col) |
|
|
|
{ |
|
|
@@ -285,6 +299,7 @@ static inline void FUNC(idctSparseColAdd)(pixel *dest, int line_size, |
|
|
|
} |
|
|
|
|
|
|
|
static inline void FUNC(idctSparseCol)(int16_t *col) |
|
|
|
#endif |
|
|
|
{ |
|
|
|
int a0, a1, a2, a3, b0, b1, b2, b3; |
|
|
|
|
|
|
@@ -300,6 +315,7 @@ static inline void FUNC(idctSparseCol)(int16_t *col) |
|
|
|
col[56] = ((a0 - b0) >> COL_SHIFT); |
|
|
|
} |
|
|
|
|
|
|
|
#ifndef EXTRA_SHIFT |
|
|
|
void FUNC(ff_simple_idct_put)(uint8_t *dest_, int line_size, int16_t *block) |
|
|
|
{ |
|
|
|
pixel *dest = (pixel *)dest_; |
|
|
@@ -338,3 +354,4 @@ void FUNC(ff_simple_idct)(int16_t *block) |
|
|
|
for (i = 0; i < 8; i++) |
|
|
|
FUNC(idctSparseCol)(block + i); |
|
|
|
} |
|
|
|
#endif |