Revision 84cb4bc6 libavcodec/ac3.c

View differences:

libavcodec/ac3.c
268 268
av_cold void ac3_common_init(void)
269 269
{
270 270
#if !CONFIG_HARDCODED_TABLES
271
    int i, k, l;
272 271
    /* compute bndtab and masktab from bandsz */
273
    k = 0;
274
    l = 0;
275
    for (i = 0; i < 50; i++) {
276
        band_start_tab[i] = k;
277
        l = k + ff_ac3_critical_band_size_tab[i];
278
        while (k < l)
279
            bin_to_band_tab[k++] = i;
272
    int bin = 0, band;
273
    for (band = 0; band < 50; band++) {
274
        int band_end = bin + ff_ac3_critical_band_size_tab[band];
275
        band_start_tab[band] = bin;
276
        while (bin < band_end)
277
            bin_to_band_tab[bin++] = band;
280 278
    }
281
    band_start_tab[50] = k;
279
    band_start_tab[50] = bin;
282 280
#endif /* !CONFIG_HARDCODED_TABLES */
283 281
}

Also available in: Unified diff