Revision 687671f0 libavcodec/ac3.c

View differences:

libavcodec/ac3.c
173 173
}
174 174

  
175 175
void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end,
176
                               int snr_offset, int floor, uint8_t *bap)
176
                               int snr_offset, int floor,
177
                               const uint8_t *bap_tab, uint8_t *bap)
177 178
{
178 179
    int i, j, k, end1, v, address;
179 180

  
......
190 191
        end1 = FFMIN(band_start_tab[j] + ff_ac3_critical_band_size_tab[j], end);
191 192
        for (k = i; k < end1; k++) {
192 193
            address = av_clip((psd[i] - v) >> 5, 0, 63);
193
            bap[i] = ff_ac3_bap_tab[address];
194
            bap[i] = bap_tab[address];
194 195
            i++;
195 196
        }
196 197
    } while (end > band_start_tab[j++]);
......
215 216
                               dba_mode, dba_nsegs, dba_offsets, dba_lengths, dba_values,
216 217
                               mask);
217 218

  
218
    ff_ac3_bit_alloc_calc_bap(mask, psd, start, end, snr_offset, s->floor, bap);
219
    ff_ac3_bit_alloc_calc_bap(mask, psd, start, end, snr_offset, s->floor,
220
                              ff_ac3_bap_tab, bap);
219 221
}
220 222

  
221 223
/**

Also available in: Unified diff