Go to the documentation of this file.
48 #define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
49 #define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
50 #define W3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
51 #define W4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
52 #define W5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
53 #define W6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
54 #define W7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
60 #define MUL(a, b) MUL16(a, b)
61 #define MAC(a, b, c) MAC16(a, b, c)
63 #elif BIT_DEPTH == 10 || BIT_DEPTH == 12
66 #define W1 22725 // 90901
67 #define W2 21407 // 85627
68 #define W3 19265 // 77062
69 #define W4 16384 // 65535
70 #define W5 12873 // 51491
71 #define W6 8867 // 35468
72 #define W7 4520 // 18081
78 # elif IN_IDCT_DEPTH == 32
102 #define MUL(a, b) ((int)((SUINT)(a) * (b)))
103 #define MAC(a, b, c) ((a) += (SUINT)(b) * (c))
107 #error "Unsupported bitdepth"
112 static inline void FUNC(idctRowCondDC_extrashift)(int16_t *row,
int extra_shift)
120 #if IN_IDCT_DEPTH == 16
122 #define ROW0_MASK (0xffffULL << 48 * HAVE_BIGENDIAN)
126 temp = (row[0] * (1 << (
DC_SHIFT - extra_shift))) & 0xffff;
131 temp +=
temp * ((uint64_t) 1 << 32);
143 temp = (row[0] * (1 << (
DC_SHIFT - extra_shift))) & 0xffff;
170 MAC(
b1, -
W7, row[3]);
172 MAC(
b2, -
W1, row[3]);
174 MAC(
b3, -
W5, row[3]);
176 #if IN_IDCT_DEPTH == 32
189 MAC(
b1, -
W1, row[5]);
190 MAC(
b1, -
W5, row[7]);
196 MAC(
b3, -
W1, row[7]);
209 #define IDCT_COLS do { \
210 a0 = (SUINT)W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); \
215 a0 += (SUINT) W2*col[8*2]; \
216 a1 += (SUINT) W6*col[8*2]; \
217 a2 += (SUINT)-W6*col[8*2]; \
218 a3 += (SUINT)-W2*col[8*2]; \
220 b0 = MUL(W1, col[8*1]); \
221 b1 = MUL(W3, col[8*1]); \
222 b2 = MUL(W5, col[8*1]); \
223 b3 = MUL(W7, col[8*1]); \
225 MAC(b0, W3, col[8*3]); \
226 MAC(b1, -W7, col[8*3]); \
227 MAC(b2, -W1, col[8*3]); \
228 MAC(b3, -W5, col[8*3]); \
231 a0 += (SUINT) W4*col[8*4]; \
232 a1 += (SUINT)-W4*col[8*4]; \
233 a2 += (SUINT)-W4*col[8*4]; \
234 a3 += (SUINT) W4*col[8*4]; \
238 MAC(b0, W5, col[8*5]); \
239 MAC(b1, -W1, col[8*5]); \
240 MAC(b2, W7, col[8*5]); \
241 MAC(b3, W3, col[8*5]); \
245 a0 += (SUINT) W6*col[8*6]; \
246 a1 += (SUINT)-W2*col[8*6]; \
247 a2 += (SUINT) W2*col[8*6]; \
248 a3 += (SUINT)-W6*col[8*6]; \
252 MAC(b0, W7, col[8*7]); \
253 MAC(b1, -W5, col[8*7]); \
254 MAC(b2, W3, col[8*7]); \
255 MAC(b3, -W1, col[8*7]); \
260 static inline void FUNC(idctSparseCol_extrashift)(int16_t *col)
335 line_size /=
sizeof(
pixel);
337 for (
i = 0;
i < 8;
i++)
340 for (
i = 0;
i < 8;
i++)
344 #if IN_IDCT_DEPTH == 16
345 void FUNC6(ff_simple_idct_add)(uint8_t *dest_, ptrdiff_t line_size, int16_t *
block)
350 line_size /=
sizeof(
pixel);
352 for (
i = 0;
i < 8;
i++)
355 for (
i = 0;
i < 8;
i++)
363 for (
i = 0;
i < 8;
i++)
366 for (
i = 0;
i < 8;
i++)
static void FUNC6() idctSparseCol(idctin *col)
static void FUNC6() idctSparseColAdd(pixel *dest, ptrdiff_t line_size, idctin *col)
static double b1(void *priv, double x, double y)
static double a2(void *priv, double x, double y)
static double b3(void *priv, double x, double y)
static double a3(void *priv, double x, double y)
static double b2(void *priv, double x, double y)
static double a0(void *priv, double x, double y)
#define i(width, name, range_min, range_max)
static void FUNC6() idctSparseColPut(pixel *dest, ptrdiff_t line_size, idctin *col)
void FUNC6() ff_simple_idct_put(uint8_t *dest_, ptrdiff_t line_size, int16_t *block_)
The exact code depends on how similar the blocks are and how related they are to the block
static double b0(void *priv, double x, double y)
static double a1(void *priv, double x, double y)
static void FUNC6() idctRowCondDC(idctin *row, int extra_shift)