33 #define RENAME(n) n##_float
42 #define MACS(rt, ra, rb) rt+=(ra)*(rb)
43 #define MULS(ra, rb) ((ra)*(rb))
44 #define MULH3(x, y, s) ((s)*(y)*(x))
45 #define MLSS(rt, ra, rb) rt-=(ra)*(rb)
46 #define MULLx(x, y, s) ((y)*(x))
47 #define FIXHR(x) ((float)(x))
48 #define FIXR(x) ((float)(x))
49 #define SHR(a,b) ((a)*(1.0f/(1<<(b))))
53 #define RENAME(n) n##_fixed
54 #define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15)
64 # define MULS(ra, rb) MUL64(ra, rb)
65 # define MACS(rt, ra, rb) MAC64(rt, ra, rb)
66 # define MLSS(rt, ra, rb) MLS64(rt, ra, rb)
67 # define MULH3(x, y, s) MULH((s)*(x), y)
68 # define MULLx(x, y, s) MULL((int)(x),(y),s)
69 # define SHR(a,b) (((int)(a))>>(b))
70 # define FIXR(a) ((int)((a) * FRAC_ONE + 0.5))
71 # define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5))
82 #define SUM8(op, sum, w, p) \
84 op(sum, (w)[0 * 64], (p)[0 * 64]); \
85 op(sum, (w)[1 * 64], (p)[1 * 64]); \
86 op(sum, (w)[2 * 64], (p)[2 * 64]); \
87 op(sum, (w)[3 * 64], (p)[3 * 64]); \
88 op(sum, (w)[4 * 64], (p)[4 * 64]); \
89 op(sum, (w)[5 * 64], (p)[5 * 64]); \
90 op(sum, (w)[6 * 64], (p)[6 * 64]); \
91 op(sum, (w)[7 * 64], (p)[7 * 64]); \
94 #define SUM8P2(sum1, op1, sum2, op2, w1, w2, p) \
98 op1(sum1, (w1)[0 * 64], tmp);\
99 op2(sum2, (w2)[0 * 64], tmp);\
101 op1(sum1, (w1)[1 * 64], tmp);\
102 op2(sum2, (w2)[1 * 64], tmp);\
104 op1(sum1, (w1)[2 * 64], tmp);\
105 op2(sum2, (w2)[2 * 64], tmp);\
107 op1(sum1, (w1)[3 * 64], tmp);\
108 op2(sum2, (w2)[3 * 64], tmp);\
110 op1(sum1, (w1)[4 * 64], tmp);\
111 op2(sum2, (w2)[4 * 64], tmp);\
113 op1(sum1, (w1)[5 * 64], tmp);\
114 op2(sum2, (w2)[5 * 64], tmp);\
116 op1(sum1, (w1)[6 * 64], tmp);\
117 op2(sum2, (w2)[6 * 64], tmp);\
119 op1(sum1, (w1)[7 * 64], tmp);\
120 op2(sum2, (w2)[7 * 64], tmp);\
137 memcpy(synth_buf + 512, synth_buf, 32 *
sizeof(*synth_buf));
139 samples2 =
samples + 31 * incr;
156 p = synth_buf + 16 + j;
158 p = synth_buf + 48 - j;
179 int *synth_buf_offset,
187 offset = *synth_buf_offset;
188 synth_buf = synth_buf_ptr +
offset;
190 s->RENAME(
dct32)(synth_buf, sb_samples);
194 *synth_buf_offset =
offset;
218 for(j=0; j < 16; j++)
222 for(j=0; j < 16; j++)
238 #define C1 FIXHR(0.98480775301220805936/2)
239 #define C2 FIXHR(0.93969262078590838405/2)
240 #define C3 FIXHR(0.86602540378443864676/2)
241 #define C4 FIXHR(0.76604444311897803520/2)
242 #define C5 FIXHR(0.64278760968653932632/2)
243 #define C6 FIXHR(0.5/2)
244 #define C7 FIXHR(0.34202014332566873304/2)
245 #define C8 FIXHR(0.17364817766693034885/2)
249 FIXR(0.50190991877167369479),
250 FIXR(0.51763809020504152469),
251 FIXR(0.55168895948124587824),
252 FIXR(0.61038729438072803416),
253 FIXR(0.70710678118654752439),
254 FIXR(0.87172339781054900991),
255 FIXR(1.18310079157624925896),
256 FIXR(1.93185165257813657349),
257 FIXR(5.73685662283492756461),
262 FIXHR(0.50190991877167369479/2),
263 FIXHR(0.51763809020504152469/2),
264 FIXHR(0.55168895948124587824/2),
265 FIXHR(0.61038729438072803416/2),
266 FIXHR(0.70710678118654752439/2),
267 FIXHR(0.87172339781054900991/2),
268 FIXHR(1.18310079157624925896/4),
269 FIXHR(1.93185165257813657349/4),
280 for (
i = 17;
i >= 1;
i--)
282 for (
i = 17;
i >= 3;
i -= 2)
285 for (j = 0; j < 2; j++) {
289 t2 = in1[2*4] + in1[2*8] - in1[2*2];
291 t3 = in1[2*0] +
SHR(in1[2*6],1);
292 t1 = in1[2*0] - in1[2*6];
293 tmp1[ 6] = t1 -
SHR(t2,1);
296 t0 =
MULH3(in1[2*2] + in1[2*4] ,
C2, 2);
297 t1 =
MULH3(in1[2*4] - in1[2*8] , -2*
C8, 1);
298 t2 =
MULH3(in1[2*2] + in1[2*8] , -
C4, 2);
300 tmp1[10] = t3 - t0 - t2;
301 tmp1[ 2] = t3 + t0 + t1;
302 tmp1[14] = t3 + t2 - t1;
304 tmp1[ 4] =
MULH3(in1[2*5] + in1[2*7] - in1[2*1], -
C3, 2);
305 t2 =
MULH3(in1[2*1] + in1[2*5],
C1, 2);
306 t3 =
MULH3(in1[2*5] - in1[2*7], -2*
C7, 1);
309 t1 =
MULH3(in1[2*1] + in1[2*7], -
C5, 2);
311 tmp1[ 0] = t2 + t3 + t0;
312 tmp1[12] = t2 + t1 - t0;
313 tmp1[ 8] = t3 - t1 - t0;
317 for (j = 0; j < 4; j++) {
355 int count,
int switch_point,
int block_type)
358 for (j=0 ; j < count; j++) {
362 int win_idx = (switch_point && j < 2) ? 0 : block_type;
368 buf += ((j&3) != 3 ? 1 : (72-3));