diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2008-06-07 22:29:54 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2008-06-07 22:29:54 +0000 |
commit | 687671f03b3df1376479c7a2f880b5fc5634772e (patch) | |
tree | d476556494e88bb610f8359f6c02adc2b94dc42c /libavcodec/ac3.c | |
parent | 30cc3ac20e1e6cd434bc776932b0897d8a999b0e (diff) | |
download | ffmpeg-687671f03b3df1376479c7a2f880b5fc5634772e.tar.gz |
pass bap table to ff_ac3_bit_alloc_calc_bap()
Originally committed as revision 13694 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3.c')
-rw-r--r-- | libavcodec/ac3.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c index 132ea0f8b5..6b18930ca1 100644 --- a/libavcodec/ac3.c +++ b/libavcodec/ac3.c @@ -173,7 +173,8 @@ void ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd, } void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end, - int snr_offset, int floor, uint8_t *bap) + int snr_offset, int floor, + const uint8_t *bap_tab, uint8_t *bap) { int i, j, k, end1, v, address; @@ -190,7 +191,7 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end, end1 = FFMIN(band_start_tab[j] + ff_ac3_critical_band_size_tab[j], end); for (k = i; k < end1; k++) { address = av_clip((psd[i] - v) >> 5, 0, 63); - bap[i] = ff_ac3_bap_tab[address]; + bap[i] = bap_tab[address]; i++; } } while (end > band_start_tab[j++]); @@ -215,7 +216,8 @@ void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap, dba_mode, dba_nsegs, dba_offsets, dba_lengths, dba_values, mask); - ff_ac3_bit_alloc_calc_bap(mask, psd, start, end, snr_offset, s->floor, bap); + ff_ac3_bit_alloc_calc_bap(mask, psd, start, end, snr_offset, s->floor, + ff_ac3_bap_tab, bap); } /** |