Revision 26f548bb

View differences:

libavcodec/aacdec.c
1750 1750
        ac->dsp.vector_fmul_reverse(in + 1024 + 448, in + 1024 + 448, swindow, 128);
1751 1751
        memset(in + 1024 + 576, 0, 448 * sizeof(float));
1752 1752
    }
1753
    ff_mdct_calc(&ac->mdct_ltp, out, in);
1753
    ac->mdct_ltp.mdct_calc(&ac->mdct_ltp, out, in);
1754 1754
}
1755 1755

  
1756 1756
/**
......
1839 1839
    // imdct
1840 1840
    if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
1841 1841
        for (i = 0; i < 1024; i += 128)
1842
            ff_imdct_half(&ac->mdct_small, buf + i, in + i);
1842
            ac->mdct_small.imdct_half(&ac->mdct_small, buf + i, in + i);
1843 1843
    } else
1844
        ff_imdct_half(&ac->mdct, buf, in);
1844
        ac->mdct.imdct_half(&ac->mdct, buf, in);
1845 1845

  
1846 1846
    /* window overlapping
1847 1847
     * NOTE: To simplify the overlapping code, all 'meaningless' short to long
libavcodec/aacenc.c
250 250
            for (i = 0; i < 1024; i++)
251 251
                sce->saved[i] = audio[i * chans];
252 252
        }
253
        ff_mdct_calc(&s->mdct1024, sce->coeffs, output);
253
        s->mdct1024.mdct_calc(&s->mdct1024, sce->coeffs, output);
254 254
    } else {
255 255
        for (k = 0; k < 1024; k += 128) {
256 256
            for (i = 448 + k; i < 448 + k + 256; i++)
......
259 259
                                         : audio[(i-1024)*chans];
260 260
            s->dsp.vector_fmul        (output,     output, k ?  swindow : pwindow, 128);
261 261
            s->dsp.vector_fmul_reverse(output+128, output+128, swindow, 128);
262
            ff_mdct_calc(&s->mdct128, sce->coeffs + k, output);
262
            s->mdct128.mdct_calc(&s->mdct128, sce->coeffs + k, output);
263 263
        }
264 264
        for (i = 0; i < 1024; i++)
265 265
            sce->saved[i] = audio[i * chans];
libavcodec/aacsbr.c
1155 1155
        }
1156 1156
        z[64+63] = z[32];
1157 1157

  
1158
        ff_imdct_half(mdct, z, z+64);
1158
        mdct->imdct_half(mdct, z, z+64);
1159 1159
        for (k = 0; k < 32; k++) {
1160 1160
            W[1][i][k][0] = -z[63-k];
1161 1161
            W[1][i][k][1] = z[k];
......
1190 1190
                X[0][i][   n] = -X[0][i][n];
1191 1191
                X[0][i][32+n] =  X[1][i][31-n];
1192 1192
            }
1193
            ff_imdct_half(mdct, mdct_buf[0], X[0][i]);
1193
            mdct->imdct_half(mdct, mdct_buf[0], X[0][i]);
1194 1194
            for (n = 0; n < 32; n++) {
1195 1195
                v[     n] =  mdct_buf[0][63 - 2*n];
1196 1196
                v[63 - n] = -mdct_buf[0][62 - 2*n];
......
1199 1199
            for (n = 1; n < 64; n+=2) {
1200 1200
                X[1][i][n] = -X[1][i][n];
1201 1201
            }
1202
            ff_imdct_half(mdct, mdct_buf[0], X[0][i]);
1203
            ff_imdct_half(mdct, mdct_buf[1], X[1][i]);
1202
            mdct->imdct_half(mdct, mdct_buf[0], X[0][i]);
1203
            mdct->imdct_half(mdct, mdct_buf[1], X[1][i]);
1204 1204
            for (n = 0; n < 64; n++) {
1205 1205
                v[      n] = -mdct_buf[0][63 -   n] + mdct_buf[1][  n    ];
1206 1206
                v[127 - n] =  mdct_buf[0][63 -   n] + mdct_buf[1][  n    ];
libavcodec/ac3dec.c
628 628
            float *x = s->tmp_output+128;
629 629
            for(i=0; i<128; i++)
630 630
                x[i] = s->transform_coeffs[ch][2*i];
631
            ff_imdct_half(&s->imdct_256, s->tmp_output, x);
631
            s->imdct_256.imdct_half(&s->imdct_256, s->tmp_output, x);
632 632
            s->dsp.vector_fmul_window(s->output[ch-1], s->delay[ch-1], s->tmp_output, s->window, 128);
633 633
            for(i=0; i<128; i++)
634 634
                x[i] = s->transform_coeffs[ch][2*i+1];
635
            ff_imdct_half(&s->imdct_256, s->delay[ch-1], x);
635
            s->imdct_256.imdct_half(&s->imdct_256, s->delay[ch-1], x);
636 636
        } else {
637
            ff_imdct_half(&s->imdct_512, s->tmp_output, s->transform_coeffs[ch]);
637
            s->imdct_512.imdct_half(&s->imdct_512, s->tmp_output, s->transform_coeffs[ch]);
638 638
            s->dsp.vector_fmul_window(s->output[ch-1], s->delay[ch-1], s->tmp_output, s->window, 128);
639 639
            memcpy(s->delay[ch-1], s->tmp_output+128, 128*sizeof(float));
640 640
        }
libavcodec/ac3enc_float.c
74 74
 */
75 75
static void mdct512(AC3MDCTContext *mdct, float *out, float *in)
76 76
{
77
    ff_mdct_calc(&mdct->fft, out, in);
77
    mdct->fft.mdct_calc(&mdct->fft, out, in);
78 78
}
79 79

  
80 80

  
libavcodec/atrac1.c
99 99
        for (i = 0; i < transf_size / 2; i++)
100 100
            FFSWAP(float, spec[i], spec[transf_size - 1 - i]);
101 101
    }
102
    ff_imdct_half(mdct_context, out, spec);
102
    mdct_context->imdct_half(mdct_context, out, spec);
103 103
}
104 104

  
105 105

  
libavcodec/atrac3.c
146 146
        /**
147 147
        * Reverse the odd bands before IMDCT, this is an effect of the QMF transform
148 148
        * or it gives better compression to do it this way.
149
        * FIXME: It should be possible to handle this in ff_imdct_calc
149
        * FIXME: It should be possible to handle this in imdct_calc
150 150
        * for that to happen a modification of the prerotation step of
151 151
        * all SIMD code and C code is needed.
152 152
        * Or fix the functions before so they generate a pre reversed spectrum.
......
156 156
            FFSWAP(float, pInput[i], pInput[255-i]);
157 157
    }
158 158

  
159
    ff_imdct_calc(&q->mdct_ctx,pOutput,pInput);
159
    q->mdct_ctx.imdct_calc(&q->mdct_ctx,pOutput,pInput);
160 160

  
161 161
    /* Perform windowing on the output. */
162 162
    dsp.vector_fmul(pOutput, pOutput, mdct_window, 512);
libavcodec/avfft.c
101 101

  
102 102
void av_rdft_calc(RDFTContext *s, FFTSample *data)
103 103
{
104
    ff_rdft_calc(s, data);
104
    s->rdft_calc(s, data);
105 105
}
106 106

  
107 107
void av_rdft_end(RDFTContext *s)
......
128 128

  
129 129
void av_dct_calc(DCTContext *s, FFTSample *data)
130 130
{
131
    ff_dct_calc(s, data);
131
    s->dct_calc(s, data);
132 132
}
133 133

  
134 134
void av_dct_end(DCTContext *s)
libavcodec/binkaudio.c
223 223

  
224 224
        if (CONFIG_BINKAUDIO_DCT_DECODER && use_dct) {
225 225
            coeffs[0] /= 0.5;
226
            ff_dct_calc (&s->trans.dct,  coeffs);
226
            s->trans.dct.dct_calc(&s->trans.dct,  coeffs);
227 227
            s->dsp.vector_fmul_scalar(coeffs, coeffs, s->frame_len / 2, s->frame_len);
228 228
        }
229 229
        else if (CONFIG_BINKAUDIO_RDFT_DECODER)
230
            ff_rdft_calc(&s->trans.rdft, coeffs);
230
            s->trans.rdft.rdft_calc(&s->trans.rdft, coeffs);
231 231
    }
232 232

  
233 233
    s->fmt_conv.float_to_int16_interleave(out, (const float **)s->coeffs_ptr,
libavcodec/cook.c
753 753
    int i;
754 754

  
755 755
    /* Inverse modified discrete cosine transform */
756
    ff_imdct_calc(&q->mdct_ctx, q->mono_mdct_output, inbuffer);
756
    q->mdct_ctx.imdct_calc(&q->mdct_ctx, q->mono_mdct_output, inbuffer);
757 757

  
758 758
    q->imlt_window (q, buffer1, gains_ptr, previous_buffer);
759 759

  
libavcodec/dct.c
59 59
    }
60 60

  
61 61
    data[n/2] *= 2;
62
    ff_rdft_calc(&ctx->rdft, data);
62
    ctx->rdft.rdft_calc(&ctx->rdft, data);
63 63

  
64 64
    data[0] *= 0.5f;
65 65

  
......
93 93
        data[n - i] = tmp1 + s;
94 94
    }
95 95

  
96
    ff_rdft_calc(&ctx->rdft, data);
96
    ctx->rdft.rdft_calc(&ctx->rdft, data);
97 97
    data[n] = data[1];
98 98
    data[1] = next;
99 99

  
......
121 121

  
122 122
    data[1] = 2 * next;
123 123

  
124
    ff_rdft_calc(&ctx->rdft, data);
124
    ctx->rdft.rdft_calc(&ctx->rdft, data);
125 125

  
126 126
    for (i = 0; i < n / 2; i++) {
127 127
        float tmp1 = data[i        ] * inv_n;
......
152 152
        data[n-i-1] = tmp1 - s;
153 153
    }
154 154

  
155
    ff_rdft_calc(&ctx->rdft, data);
155
    ctx->rdft.rdft_calc(&ctx->rdft, data);
156 156

  
157 157
    next = data[1] * 0.5;
158 158
    data[1] *= -1;
......
176 176
    ctx->dct32(data, data);
177 177
}
178 178

  
179
void ff_dct_calc(DCTContext *s, FFTSample *data)
180
{
181
    s->dct_calc(s, data);
182
}
183

  
184 179
av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
185 180
{
186 181
    int n = 1 << nbits;
libavcodec/fft-test.c
327 327
    case TRANSFORM_MDCT:
328 328
        if (do_inverse) {
329 329
            imdct_ref((float *)tab_ref, (float *)tab1, fft_nbits);
330
            ff_imdct_calc(m, tab2, (float *)tab1);
330
            m->imdct_calc(m, tab2, (float *)tab1);
331 331
            err = check_diff((float *)tab_ref, tab2, fft_size, scale);
332 332
        } else {
333 333
            mdct_ref((float *)tab_ref, (float *)tab1, fft_nbits);
334 334

  
335
            ff_mdct_calc(m, tab2, (float *)tab1);
335
            m->mdct_calc(m, tab2, (float *)tab1);
336 336

  
337 337
            err = check_diff((float *)tab_ref, tab2, fft_size / 2, scale);
338 338
        }
339 339
        break;
340 340
    case TRANSFORM_FFT:
341 341
        memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
342
        ff_fft_permute(s, tab);
343
        ff_fft_calc(s, tab);
342
        s->fft_permute(s, tab);
343
        s->fft_calc(s, tab);
344 344

  
345 345
        fft_ref(tab_ref, tab1, fft_nbits);
346 346
        err = check_diff((float *)tab_ref, (float *)tab, fft_size * 2, 1.0);
......
357 357
            memcpy(tab2, tab1, fft_size * sizeof(FFTSample));
358 358
            tab2[1] = tab1[fft_size_2].re;
359 359

  
360
            ff_rdft_calc(r, tab2);
360
            r->rdft_calc(r, tab2);
361 361
            fft_ref(tab_ref, tab1, fft_nbits);
362 362
            for (i = 0; i < fft_size; i++) {
363 363
                tab[i].re = tab2[i];
......
369 369
                tab2[i]    = tab1[i].re;
370 370
                tab1[i].im = 0;
371 371
            }
372
            ff_rdft_calc(r, tab2);
372
            r->rdft_calc(r, tab2);
373 373
            fft_ref(tab_ref, tab1, fft_nbits);
374 374
            tab_ref[0].im = tab_ref[fft_size_2].re;
375 375
            err = check_diff((float *)tab_ref, (float *)tab2, fft_size, 1.0);
......
377 377
        break;
378 378
    case TRANSFORM_DCT:
379 379
        memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
380
        ff_dct_calc(d, tab);
380
        d->dct_calc(d, tab);
381 381
        if (do_inverse) {
382 382
            idct_ref(tab_ref, tab1, fft_nbits);
383 383
        } else {
......
402 402
                switch (transform) {
403 403
                case TRANSFORM_MDCT:
404 404
                    if (do_inverse) {
405
                        ff_imdct_calc(m, (float *)tab, (float *)tab1);
405
                        m->imdct_calc(m, (float *)tab, (float *)tab1);
406 406
                    } else {
407
                        ff_mdct_calc(m, (float *)tab, (float *)tab1);
407
                        m->mdct_calc(m, (float *)tab, (float *)tab1);
408 408
                    }
409 409
                    break;
410 410
                case TRANSFORM_FFT:
411 411
                    memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
412
                    ff_fft_calc(s, tab);
412
                    s->fft_calc(s, tab);
413 413
                    break;
414 414
                case TRANSFORM_RDFT:
415 415
                    memcpy(tab2, tab1, fft_size * sizeof(FFTSample));
416
                    ff_rdft_calc(r, tab2);
416
                    r->rdft_calc(r, tab2);
417 417
                    break;
418 418
                case TRANSFORM_DCT:
419 419
                    memcpy(tab2, tab1, fft_size * sizeof(FFTSample));
420
                    ff_dct_calc(d, tab2);
420
                    d->dct_calc(d, tab2);
421 421
                    break;
422 422
                }
423 423
            }
libavcodec/fft.h
39 39
    /* pre/post rotation tables */
40 40
    FFTSample *tcos;
41 41
    FFTSample *tsin;
42
    /**
43
     * Do the permutation needed BEFORE calling fft_calc().
44
     */
42 45
    void (*fft_permute)(struct FFTContext *s, FFTComplex *z);
46
    /**
47
     * Do a complex FFT with the parameters defined in ff_fft_init(). The
48
     * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
49
     */
43 50
    void (*fft_calc)(struct FFTContext *s, FFTComplex *z);
44 51
    void (*imdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
45 52
    void (*imdct_half)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
......
115 122
void ff_fft_init_arm(FFTContext *s);
116 123
void ff_dct_init_mmx(DCTContext *s);
117 124

  
118
/**
119
 * Do the permutation needed BEFORE calling ff_fft_calc().
120
 */
121
static inline void ff_fft_permute(FFTContext *s, FFTComplex *z)
122
{
123
    s->fft_permute(s, z);
124
}
125
/**
126
 * Do a complex FFT with the parameters defined in ff_fft_init(). The
127
 * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
128
 */
129
static inline void ff_fft_calc(FFTContext *s, FFTComplex *z)
130
{
131
    s->fft_calc(s, z);
132
}
133 125
void ff_fft_end(FFTContext *s);
134 126

  
135
/* MDCT computation */
136

  
137
static inline void ff_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input)
138
{
139
    s->imdct_calc(s, output, input);
140
}
141
static inline void ff_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input)
142
{
143
    s->imdct_half(s, output, input);
144
}
145

  
146
static inline void ff_mdct_calc(FFTContext *s, FFTSample *output,
147
                                const FFTSample *input)
148
{
149
    s->mdct_calc(s, output, input);
150
}
151

  
152 127
/**
153 128
 * Maximum window size for ff_kbd_window_init.
154 129
 */
......
213 188

  
214 189
void ff_rdft_init_arm(RDFTContext *s);
215 190

  
216
static av_always_inline void ff_rdft_calc(RDFTContext *s, FFTSample *data)
217
{
218
    s->rdft_calc(s, data);
219
}
220

  
221 191
/* Discrete Cosine Transform */
222 192

  
223 193
struct DCTContext {
......
239 209
 * @note the first element of the input of DST-I is ignored
240 210
 */
241 211
int  ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type);
242
void ff_dct_calc(DCTContext *s, FFTSample *data);
243 212
void ff_dct_end (DCTContext *s);
244 213

  
245 214
#endif /* AVCODEC_FFT_H */
libavcodec/imc.c
564 564
    }
565 565

  
566 566
    /* FFT */
567
    ff_fft_permute(&q->fft, q->samples);
568
    ff_fft_calc (&q->fft, q->samples);
567
    q->fft.fft_permute(&q->fft, q->samples);
568
    q->fft.fft_calc   (&q->fft, q->samples);
569 569

  
570 570
    /* postrotation, window and reorder */
571 571
    for(i = 0; i < COEFFS/2; i++){
libavcodec/mdct.c
146 146
        in1 += 2;
147 147
        in2 -= 2;
148 148
    }
149
    ff_fft_calc(s, z);
149
    s->fft_calc(s, z);
150 150

  
151 151
    /* post rotation + reordering */
152 152
    for(k = 0; k < n8; k++) {
......
213 213
        CMUL(x[j].re, x[j].im, re, im, -tcos[n8 + i], tsin[n8 + i]);
214 214
    }
215 215

  
216
    ff_fft_calc(s, x);
216
    s->fft_calc(s, x);
217 217

  
218 218
    /* post rotation */
219 219
    for(i=0;i<n8;i++) {
libavcodec/nellymoserdec.c
121 121
        memset(&aptr[NELLY_FILL_LEN], 0,
122 122
               (NELLY_BUF_LEN - NELLY_FILL_LEN) * sizeof(float));
123 123

  
124
        ff_imdct_calc(&s->imdct_ctx, s->imdct_out, aptr);
124
        s->imdct_ctx.imdct_calc(&s->imdct_ctx, s->imdct_out, aptr);
125 125
        /* XXX: overlapping and windowing should be part of a more
126 126
           generic imdct function */
127 127
        overlap_and_window(s, s->state, aptr, s->imdct_out);
libavcodec/nellymoserenc.c
116 116
    s->dsp.vector_fmul(s->in_buff, s->buf[s->bufsel], ff_sine_128, NELLY_BUF_LEN);
117 117
    s->dsp.vector_fmul_reverse(s->in_buff + NELLY_BUF_LEN, s->buf[s->bufsel] + NELLY_BUF_LEN, ff_sine_128,
118 118
                               NELLY_BUF_LEN);
119
    ff_mdct_calc(&s->mdct_ctx, s->mdct_out, s->in_buff);
119
    s->mdct_ctx.mdct_calc(&s->mdct_ctx, s->mdct_out, s->in_buff);
120 120

  
121 121
    s->dsp.vector_fmul(s->buf[s->bufsel] + NELLY_BUF_LEN, s->buf[s->bufsel] + NELLY_BUF_LEN,
122 122
                       ff_sine_128, NELLY_BUF_LEN);
123 123
    s->dsp.vector_fmul_reverse(s->buf[s->bufsel] + 2 * NELLY_BUF_LEN, s->buf[1 - s->bufsel], ff_sine_128,
124 124
                               NELLY_BUF_LEN);
125
    ff_mdct_calc(&s->mdct_ctx, s->mdct_out + NELLY_BUF_LEN, s->buf[s->bufsel] + NELLY_BUF_LEN);
125
    s->mdct_ctx.mdct_calc(&s->mdct_ctx, s->mdct_out + NELLY_BUF_LEN, s->buf[s->bufsel] + NELLY_BUF_LEN);
126 126
}
127 127

  
128 128
static av_cold int encode_init(AVCodecContext *avctx)
libavcodec/qdm2.c
1588 1588
    int i;
1589 1589
    q->fft.complex[channel][0].re *= 2.0f;
1590 1590
    q->fft.complex[channel][0].im = 0.0f;
1591
    ff_rdft_calc(&q->rdft_ctx, (FFTSample *)q->fft.complex[channel]);
1591
    q->rdft_ctx.rdft_calc(&q->rdft_ctx, (FFTSample *)q->fft.complex[channel]);
1592 1592
    /* add samples to output buffer */
1593 1593
    for (i = 0; i < ((q->fft_frame_size + 15) & ~15); i++)
1594 1594
        q->output_buffer[q->channels * i + channel] += ((float *) q->fft.complex[channel])[i] * gain;
libavcodec/rdft.c
65 65
    const FFTSample *tsin = s->tsin;
66 66

  
67 67
    if (!s->inverse) {
68
        ff_fft_permute(&s->fft, (FFTComplex*)data);
69
        ff_fft_calc(&s->fft, (FFTComplex*)data);
68
        s->fft.fft_permute(&s->fft, (FFTComplex*)data);
69
        s->fft.fft_calc(&s->fft, (FFTComplex*)data);
70 70
    }
71 71
    /* i=0 is a special case because of packing, the DC term is real, so we
72 72
       are going to throw the N/2 term (also real) in with it. */
......
91 91
    if (s->inverse) {
92 92
        data[0] *= k1;
93 93
        data[1] *= k1;
94
        ff_fft_permute(&s->fft, (FFTComplex*)data);
95
        ff_fft_calc(&s->fft, (FFTComplex*)data);
94
        s->fft.fft_permute(&s->fft, (FFTComplex*)data);
95
        s->fft.fft_calc(&s->fft, (FFTComplex*)data);
96 96
    }
97 97
}
98 98

  
libavcodec/synth_filter.c
29 29
    float *synth_buf= synth_buf_ptr + *synth_buf_offset;
30 30
    int i, j;
31 31

  
32
    ff_imdct_half(imdct, synth_buf, in);
32
    imdct->imdct_half(imdct, synth_buf, in);
33 33

  
34 34
    for (i = 0; i < 16; i++){
35 35
        float a= synth_buf2[i     ];
libavcodec/twinvq.c
608 608
static void imdct_and_window(TwinContext *tctx, enum FrameType ftype, int wtype,
609 609
                            float *in, float *prev, int ch)
610 610
{
611
    FFTContext *mdct = &tctx->mdct_ctx[ftype];
611 612
    const ModeTab *mtab = tctx->mtab;
612 613
    int bsize = mtab->size / mtab->fmode[ftype].sub;
613 614
    int size  = mtab->size;
......
640 641

  
641 642
        wsize = types_sizes[wtype_to_wsize[sub_wtype]];
642 643

  
643
        ff_imdct_half(&tctx->mdct_ctx[ftype], buf1 + bsize*j, in + bsize*j);
644
        mdct->imdct_half(mdct, buf1 + bsize*j, in + bsize*j);
644 645

  
645 646
        tctx->dsp.vector_fmul_window(out2,
646 647
                                     prev_buf + (bsize-wsize)/2,
libavcodec/vorbis_dec.c
1448 1448
static int vorbis_parse_audio_packet(vorbis_context *vc)
1449 1449
{
1450 1450
    GetBitContext *gb = &vc->gb;
1451

  
1451
    FFTContext *mdct;
1452 1452
    uint_fast8_t previous_window = vc->previous_window;
1453 1453
    uint_fast8_t mode_number;
1454 1454
    uint_fast8_t blockflag;
......
1552 1552

  
1553 1553
// Dotproduct, MDCT
1554 1554

  
1555
    mdct = &vc->mdct[blockflag];
1556

  
1555 1557
    for (j = vc->audio_channels-1;j >= 0; j--) {
1556 1558
        ch_floor_ptr = vc->channel_floors   + j           * blocksize / 2;
1557 1559
        ch_res_ptr   = vc->channel_residues + res_chan[j] * blocksize / 2;
1558 1560
        vc->dsp.vector_fmul(ch_floor_ptr, ch_floor_ptr, ch_res_ptr, blocksize / 2);
1559
        ff_imdct_half(&vc->mdct[blockflag], ch_res_ptr, ch_floor_ptr);
1561
        mdct->imdct_half(mdct, ch_res_ptr, ch_floor_ptr);
1560 1562
    }
1561 1563

  
1562 1564
// Overlap/add, save data for next overlapping  FPMATH
libavcodec/vorbis_enc.c
935 935
    }
936 936

  
937 937
    for (channel = 0; channel < venc->channels; channel++)
938
        ff_mdct_calc(&venc->mdct[0], venc->coeffs + channel * window_len,
938
        venc->mdct[0].mdct_calc(&venc->mdct[0], venc->coeffs + channel * window_len,
939 939
                     venc->samples + channel * window_len * 2);
940 940

  
941 941
    if (samples) {
libavcodec/wmadec.c
447 447
    int coef_nb_bits, total_gain;
448 448
    int nb_coefs[MAX_CHANNELS];
449 449
    float mdct_norm;
450
    FFTContext *mdct;
450 451

  
451 452
#ifdef TRACE
452 453
    tprintf(s->avctx, "***decode_block: %d:%d\n", s->frame_count - 1, s->block_num);
......
742 743
    }
743 744

  
744 745
next:
746
    mdct = &s->mdct_ctx[bsize];
747

  
745 748
    for(ch = 0; ch < s->nb_channels; ch++) {
746 749
        int n4, index;
747 750

  
748 751
        n4 = s->block_len / 2;
749 752
        if(s->channel_coded[ch]){
750
            ff_imdct_calc(&s->mdct_ctx[bsize], s->output, s->coefs[ch]);
753
            mdct->imdct_calc(mdct, s->output, s->coefs[ch]);
751 754
        }else if(!(s->ms_stereo && ch==1))
752 755
            memset(s->output, 0, sizeof(s->output));
753 756

  
libavcodec/wmaenc.c
77 77
static void apply_window_and_mdct(AVCodecContext * avctx, const signed short * audio, int len) {
78 78
    WMACodecContext *s = avctx->priv_data;
79 79
    int window_index= s->frame_len_bits - s->block_len_bits;
80
    FFTContext *mdct = &s->mdct_ctx[window_index];
80 81
    int i, j, channel;
81 82
    const float * win = s->windows[window_index];
82 83
    int window_len = 1 << s->block_len_bits;
......
89 90
            s->output[i+window_len]  = audio[j] / n * win[window_len - i - 1];
90 91
            s->frame_out[channel][i] = audio[j] / n * win[i];
91 92
        }
92
        ff_mdct_calc(&s->mdct_ctx[window_index], s->coefs[channel], s->output);
93
        mdct->mdct_calc(mdct, s->coefs[channel], s->output);
93 94
    }
94 95
}
95 96

  
libavcodec/wmaprodec.c
1222 1222
            get_bits_count(&s->gb) - s->subframe_offset);
1223 1223

  
1224 1224
    if (transmit_coeffs) {
1225
        FFTContext *mdct = &s->mdct_ctx[av_log2(subframe_len) - WMAPRO_BLOCK_MIN_BITS];
1225 1226
        /** reconstruct the per channel data */
1226 1227
        inverse_channel_transform(s);
1227 1228
        for (i = 0; i < s->channels_for_cur_subframe; i++) {
......
1246 1247
                                          quant, end - start);
1247 1248
            }
1248 1249

  
1249
            /** apply imdct (ff_imdct_half == DCTIV with reverse) */
1250
            ff_imdct_half(&s->mdct_ctx[av_log2(subframe_len) - WMAPRO_BLOCK_MIN_BITS],
1251
                          s->channel[c].coeffs, s->tmp);
1250
            /** apply imdct (imdct_half == DCTIV with reverse) */
1251
            mdct->imdct_half(mdct, s->channel[c].coeffs, s->tmp);
1252 1252
        }
1253 1253
    }
1254 1254

  
libavcodec/wmavoice.c
558 558
    int n, idx;
559 559

  
560 560
    /* Create frequency power spectrum of speech input (i.e. RDFT of LPCs) */
561
    ff_rdft_calc(&s->rdft, lpcs);
561
    s->rdft.rdft_calc(&s->rdft, lpcs);
562 562
#define log_range(var, assign) do { \
563 563
        float tmp = log10f(assign);  var = tmp; \
564 564
        max       = FFMAX(max, tmp); min = FFMIN(min, tmp); \
......
601 601
     * is a sinus input) by doing a phase shift (in theory, H(sin())=cos()).
602 602
     * Hilbert_Transform(RDFT(x)) = Laplace_Transform(x), which calculates the
603 603
     * "moment" of the LPCs in this filter. */
604
    ff_dct_calc(&s->dct, lpcs);
605
    ff_dct_calc(&s->dst, lpcs);
604
    s->dct.dct_calc(&s->dct, lpcs);
605
    s->dst.dct_calc(&s->dst, lpcs);
606 606

  
607 607
    /* Split out the coefficient indexes into phase/magnitude pairs */
608 608
    idx = 255 + av_clip(lpcs[64],               -255, 255);
......
623 623
    coeffs[1] = last_coeff;
624 624

  
625 625
    /* move into real domain */
626
    ff_rdft_calc(&s->irdft, coeffs);
626
    s->irdft.rdft_calc(&s->irdft, coeffs);
627 627

  
628 628
    /* tilt correction and normalize scale */
629 629
    memset(&coeffs[remainder], 0, sizeof(coeffs[0]) * (128 - remainder));
......
693 693
        /* apply coefficients (in frequency spectrum domain), i.e. complex
694 694
         * number multiplication */
695 695
        memset(&synth_pf[size], 0, sizeof(synth_pf[0]) * (128 - size));
696
        ff_rdft_calc(&s->rdft, synth_pf);
697
        ff_rdft_calc(&s->rdft, coeffs);
696
        s->rdft.rdft_calc(&s->rdft, synth_pf);
697
        s->rdft.rdft_calc(&s->rdft, coeffs);
698 698
        synth_pf[0] *= coeffs[0];
699 699
        synth_pf[1] *= coeffs[1];
700 700
        for (n = 1; n < 64; n++) {
......
702 702
            synth_pf[n * 2]     = v1 * coeffs[n * 2] - v2 * coeffs[n * 2 + 1];
703 703
            synth_pf[n * 2 + 1] = v2 * coeffs[n * 2] + v1 * coeffs[n * 2 + 1];
704 704
        }
705
        ff_rdft_calc(&s->irdft, synth_pf);
705
        s->irdft.rdft_calc(&s->irdft, synth_pf);
706 706
    }
707 707

  
708 708
    /* merge filter output with the history of previous runs */

Also available in: Unified diff