Revision 99fac080 libavcodec/ac3enc.c

View differences:

libavcodec/ac3enc.c
64 64

  
65 65
static int16_t costab[64];
66 66
static int16_t sintab[64];
67
static int16_t fft_rev[512];
68 67
static int16_t xcos1[128];
69 68
static int16_t xsin1[128];
70 69

  
......
103 102
        costab[i] = fix15(cos(alpha));
104 103
        sintab[i] = fix15(sin(alpha));
105 104
    }
106

  
107
    for(i=0;i<n;i++) {
108
        m=0;
109
        for(j=0;j<ln;j++) {
110
            m |= ((i >> j) & 1) << (ln-j-1);
111
        }
112
        fft_rev[i]=m;
113
    }
114 105
}
115 106

  
116 107
/* butter fly op */
......
148 139

  
149 140
    /* reverse */
150 141
    for(j=0;j<np;j++) {
151
        int k;
152
        k = fft_rev[j];
142
        int k = ff_reverse[j] >> (8 - ln);
153 143
        if (k < j)
154 144
            FFSWAP(IComplex, z[k], z[j]);
155 145
    }

Also available in: Unified diff