51static const int TAB04[] = { 22725, 21407, 19266, 16384, 12873, 8867, 4520 };
52static const int TAB17[] = { 31521, 29692, 26722, 22725, 17855, 12299, 6270 };
53static const int TAB26[] = { 29692, 27969, 25172, 21407, 16819, 11585, 5906 };
54static const int TAB35[] = { 26722, 25172, 22654, 19266, 15137, 10426, 5315 };
58 const unsigned c1 =
tab[0];
59 const unsigned c2 =
tab[1];
60 const unsigned c3 =
tab[2];
61 const unsigned c4 =
tab[3];
62 const unsigned c5 =
tab[4];
63 const unsigned c6 =
tab[5];
64 const unsigned c7 =
tab[6];
66 const int right = in[5] | in[6] | in[7];
67 const int left = in[1] | in[2] | in[3];
68 if (!(right | in[4])) {
69 const int k = c4 * in[0] +
rnd;
71 const unsigned a0 = k +
c2 * in[2];
72 const unsigned a1 = k + c6 * in[2];
73 const unsigned a2 = k - c6 * in[2];
74 const unsigned a3 = k -
c2 * in[2];
76 const int b0 =
c1 * in[1] + c3 * in[3];
77 const int b1 = c3 * in[1] - c7 * in[3];
78 const int b2 = c5 * in[1] -
c1 * in[3];
79 const int b3 = c7 * in[1] - c5 * in[3];
103 }
else if (!(
left | right)) {
116 const unsigned int k = c4 * in[0] +
rnd;
117 const unsigned int a0 = k +
c2 * in[2] + c4 * in[4] + c6 * in[6];
118 const unsigned int a1 = k + c6 * in[2] - c4 * in[4] -
c2 * in[6];
119 const unsigned int a2 = k - c6 * in[2] - c4 * in[4] +
c2 * in[6];
120 const unsigned int a3 = k -
c2 * in[2] + c4 * in[4] - c6 * in[6];
122 const unsigned int b0 =
c1 * in[1] + c3 * in[3] + c5 * in[5] + c7 * in[7];
123 const unsigned int b1 = c3 * in[1] - c7 * in[3] -
c1 * in[5] - c5 * in[7];
124 const unsigned int b2 = c5 * in[1] -
c1 * in[3] + c7 * in[5] + c3 * in[7];
125 const unsigned int b3 = c7 * in[1] - c5 * in[3] + c3 * in[5] -
c1 * in[7];
144#define MULT(c, x, n) ((unsigned)((int)((c) * (unsigned)(x)) >> (n)))
148#define BUTTERFLY(a, b, tmp) \
153#define LOAD_BUTTERFLY(m1, m2, a, b, tmp, s) \
154 (m1) = (s)[(a)] + (s)[(b)]; \
155 (m2) = (s)[(a)] - (s)[(b)]
159 int mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7, spill;
163 mm4 = (int) in[7 * 8];
164 mm5 = (int) in[5 * 8];
165 mm6 = (int) in[3 * 8];
166 mm7 = (int) in[1 * 8];
185 mm1 = (int) in[2 * 8];
186 mm2 = (int) in[6 * 8];
194 in[8 * 0] = (int16_t) (mm0 >>
COL_SHIFT);
195 in[8 * 7] = (int16_t) (mm7 >>
COL_SHIFT);
197 in[8 * 3] = (int16_t) (mm3 >>
COL_SHIFT);
198 in[8 * 4] = (int16_t) (mm4 >>
COL_SHIFT);
202 in[8 * 1] = (int16_t) (mm1 >>
COL_SHIFT);
203 in[8 * 6] = (int16_t) (mm6 >>
COL_SHIFT);
205 in[8 * 2] = (int16_t) (mm2 >>
COL_SHIFT);
206 in[8 * 5] = (int16_t) (mm5 >>
COL_SHIFT);
211 int mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7, spill;
215 mm0 = (int) in[1 * 8];
216 mm2 = (int) in[3 * 8];
232 mm0 = mm1 = (int) in[0 * 8];
233 mm3 = (int) in[2 * 8];
238 in[8 * 0] = (int16_t) (mm0 >>
COL_SHIFT);
239 in[8 * 7] = (int16_t) (mm7 >>
COL_SHIFT);
241 in[8 * 3] = (int16_t) (mm3 >>
COL_SHIFT);
242 in[8 * 4] = (int16_t) (mm4 >>
COL_SHIFT);
246 in[8 * 1] = (int16_t) (mm1 >>
COL_SHIFT);
247 in[8 * 6] = (int16_t) (mm6 >>
COL_SHIFT);
249 in[8 * 2] = (int16_t) (mm2 >>
COL_SHIFT);
250 in[8 * 5] = (int16_t) (mm5 >>
COL_SHIFT);
255 int mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7, spill;
259 mm7 = (int) in[1 * 8];
269 mm0 = mm1 = (int) in[0 * 8];
270 mm3 = (int) in[2 * 8];
275 in[8 * 0] = (int16_t) (mm0 >>
COL_SHIFT);
276 in[8 * 7] = (int16_t) (mm7 >>
COL_SHIFT);
278 in[8 * 3] = (int16_t) (mm3 >>
COL_SHIFT);
279 in[8 * 4] = (int16_t) (mm4 >>
COL_SHIFT);
283 in[8 * 1] = (int16_t) (mm1 >>
COL_SHIFT);
284 in[8 * 6] = (int16_t) (mm6 >>
COL_SHIFT);
286 in[8 * 2] = (int16_t) (mm2 >>
COL_SHIFT);
287 in[8 * 5] = (int16_t) (mm5 >>
COL_SHIFT);
309 for (
i = 0;
i < 8;
i++)
311 }
else if (rows & 0x08) {
312 for (
i = 0;
i < 8;
i++)
315 for (
i = 0;
i < 8;
i++)
339#if ARCH_X86 && HAVE_X86ASM
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
#define i(width, name, range_min, range_max)
void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels, ptrdiff_t line_size)
void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels, ptrdiff_t line_size)
Macro definitions for various function/variable attributes.
static const struct twinvq_data tab
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)
#define BUTTERFLY(a, b, tmp)
static void idct_col_3(short *const in)
static void idct_col_4(short *const in)
void ff_xvid_idct(int16_t *const in)
static int idct_row(short *in, const int *const tab, int rnd)
static void xvid_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
static void idct_col_8(short *const in)
#define LOAD_BUTTERFLY(m1, m2, a, b, tmp, s)
static void xvid_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
av_cold void ff_xvid_idct_init(IDCTDSPContext *c)
av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c)
av_cold void ff_xvid_idct_init_mips(IDCTDSPContext *c)