Revision 4f54a3b8 libavcodec/fft.c

View differences:

libavcodec/fft.c
87 87
#endif
88 88

  
89 89
    /* compute constant table for HAVE_SSE version */
90
        if (shuffle) {
91
            int np, nblocks, np2, l;
92
            FFTComplex *q;
90
    if (shuffle) {
91
        int np, nblocks, np2, l;
92
        FFTComplex *q;
93 93

  
94
            np = 1 << nbits;
95
            nblocks = np >> 3;
96
            np2 = np >> 1;
97
            s->exptab1 = av_malloc(np * 2 * sizeof(FFTComplex));
98
            if (!s->exptab1)
99
                goto fail;
100
            q = s->exptab1;
101
            do {
102
                for(l = 0; l < np2; l += 2 * nblocks) {
103
                    *q++ = s->exptab[l];
104
                    *q++ = s->exptab[l + nblocks];
94
        np = 1 << nbits;
95
        nblocks = np >> 3;
96
        np2 = np >> 1;
97
        s->exptab1 = av_malloc(np * 2 * sizeof(FFTComplex));
98
        if (!s->exptab1)
99
            goto fail;
100
        q = s->exptab1;
101
        do {
102
            for(l = 0; l < np2; l += 2 * nblocks) {
103
                *q++ = s->exptab[l];
104
                *q++ = s->exptab[l + nblocks];
105 105

  
106
                    q->re = -s->exptab[l].im;
107
                    q->im = s->exptab[l].re;
108
                    q++;
109
                    q->re = -s->exptab[l + nblocks].im;
110
                    q->im = s->exptab[l + nblocks].re;
111
                    q++;
112
                }
113
                nblocks = nblocks >> 1;
114
            } while (nblocks != 0);
115
            av_freep(&s->exptab);
116
        }
106
                q->re = -s->exptab[l].im;
107
                q->im = s->exptab[l].re;
108
                q++;
109
                q->re = -s->exptab[l + nblocks].im;
110
                q->im = s->exptab[l + nblocks].re;
111
                q++;
112
            }
113
            nblocks = nblocks >> 1;
114
        } while (nblocks != 0);
115
        av_freep(&s->exptab);
116
    }
117 117

  
118 118
    /* compute bit reverse table */
119 119

  

Also available in: Unified diff