Commit 444ce49a authored by Justin Ruggles's avatar Justin Ruggles

Cosmetics: Rename some variables to be more descriptive of their use.

Originally committed as revision 20049 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 4e745ea8
...@@ -216,7 +216,7 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end, ...@@ -216,7 +216,7 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end,
int snr_offset, int floor, int snr_offset, int floor,
const uint8_t *bap_tab, uint8_t *bap) const uint8_t *bap_tab, uint8_t *bap)
{ {
int i, j; int bin, band;
/* special case, if snr offset is -960, set all bap's to zero */ /* special case, if snr offset is -960, set all bap's to zero */
if (snr_offset == -960) { if (snr_offset == -960) {
...@@ -224,16 +224,16 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end, ...@@ -224,16 +224,16 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end,
return; return;
} }
i = start; bin = start;
j = bin_to_band_tab[start]; band = bin_to_band_tab[start];
do { do {
int v = (FFMAX(mask[j] - snr_offset - floor, 0) & 0x1FE0) + floor; int m = (FFMAX(mask[band] - snr_offset - floor, 0) & 0x1FE0) + floor;
int end1 = FFMIN(band_start_tab[j] + ff_ac3_critical_band_size_tab[j], end); int band_end = FFMIN(band_start_tab[band] + ff_ac3_critical_band_size_tab[band], end);
for (; i < end1; i++) { for (; bin < band_end; bin++) {
int address = av_clip((psd[i] - v) >> 5, 0, 63); int address = av_clip((psd[bin] - m) >> 5, 0, 63);
bap[i] = bap_tab[address]; bap[bin] = bap_tab[address];
} }
} while (end > band_start_tab[j++]); } while (end > band_start_tab[band++]);
} }
/* AC-3 bit allocation. The algorithm is the one described in the AC-3 /* AC-3 bit allocation. The algorithm is the one described in the AC-3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment