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 || BIT_DEPTH == 16
65# if BIT_DEPTH == 10 || BIT_DEPTH == 16
78# if IN_IDCT_DEPTH != 32
79#error "The 16-bit iDCT needs 32-bit intermediates"
84# elif defined(EXTRA_SHIFT)
88# elif IN_IDCT_DEPTH == 32
112#define MUL(a, b) ((int)((SUINT)(a) * (b)))
113#define MAC(a, b, c) ((a) += (SUINT)(b) * (c))
117#error "Unsupported bitdepth"
122static inline void FUNC(idctRowCondDC_extrashift)(int16_t *row,
int extra_shift)
130#if IN_IDCT_DEPTH == 16
132#define ROW0_MASK (0xffffULL << 48 * HAVE_BIGENDIAN)
136 temp = (row[0] * (1 << (
DC_SHIFT - extra_shift))) & 0xffff;
141 temp +=
temp * ((uint64_t) 1 << 32);
153 temp = (row[0] * (1 << (
DC_SHIFT - extra_shift))) & 0xffff;
180 MAC(
b1, -
W7, row[3]);
182 MAC(
b2, -
W1, row[3]);
184 MAC(
b3, -
W5, row[3]);
186#if IN_IDCT_DEPTH == 32
199 MAC(
b1, -
W1, row[5]);
200 MAC(
b1, -
W5, row[7]);
206 MAC(
b3, -
W1, row[7]);
219#define IDCT_COLS do { \
220 a0 = (SUINT)W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); \
225 a0 += (SUINT) W2*col[8*2]; \
226 a1 += (SUINT) W6*col[8*2]; \
227 a2 += (SUINT)-W6*col[8*2]; \
228 a3 += (SUINT)-W2*col[8*2]; \
230 b0 = MUL(W1, col[8*1]); \
231 b1 = MUL(W3, col[8*1]); \
232 b2 = MUL(W5, col[8*1]); \
233 b3 = MUL(W7, col[8*1]); \
235 MAC(b0, W3, col[8*3]); \
236 MAC(b1, -W7, col[8*3]); \
237 MAC(b2, -W1, col[8*3]); \
238 MAC(b3, -W5, col[8*3]); \
241 a0 += (SUINT) W4*col[8*4]; \
242 a1 += (SUINT)-W4*col[8*4]; \
243 a2 += (SUINT)-W4*col[8*4]; \
244 a3 += (SUINT) W4*col[8*4]; \
248 MAC(b0, W5, col[8*5]); \
249 MAC(b1, -W1, col[8*5]); \
250 MAC(b2, W7, col[8*5]); \
251 MAC(b3, W3, col[8*5]); \
255 a0 += (SUINT) W6*col[8*6]; \
256 a1 += (SUINT)-W2*col[8*6]; \
257 a2 += (SUINT) W2*col[8*6]; \
258 a3 += (SUINT)-W6*col[8*6]; \
262 MAC(b0, W7, col[8*7]); \
263 MAC(b1, -W5, col[8*7]); \
264 MAC(b2, W3, col[8*7]); \
265 MAC(b3, -W1, col[8*7]); \
270static inline void FUNC(idctSparseCol_extrashift)(int16_t *col)
345 line_size /=
sizeof(
pixel);
347 for (
i = 0;
i < 8;
i++)
350 for (
i = 0;
i < 8;
i++)
354#if IN_IDCT_DEPTH == 16
355void FUNC6(ff_simple_idct_add)(uint8_t *dest_, ptrdiff_t line_size, int16_t *
block)
360 line_size /=
sizeof(
pixel);
362 for (
i = 0;
i < 8;
i++)
365 for (
i = 0;
i < 8;
i++)
373 for (
i = 0;
i < 8;
i++)
376 for (
i = 0;
i < 8;
i++)
#define i(width, name, range_min, range_max)
void FUNC6 ff_simple_idct_put(uint8_t *dest_, ptrdiff_t line_size, int16_t *block_)
static void FUNC6 idctRowCondDC(idctin *row, int extra_shift)
static void FUNC6 idctSparseColAdd(pixel *dest, ptrdiff_t line_size, idctin *col)
static void FUNC6 idctSparseColPut(pixel *dest, ptrdiff_t line_size, idctin *col)
static void FUNC6 idctSparseCol(idctin *col)
static double b1(void *priv, double x, double y)
static double a0(void *priv, double x, double y)
static double b2(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 b0(void *priv, double x, double y)
static double a2(void *priv, double x, double y)
static double a1(void *priv, double x, double y)