summaryrefslogtreecommitdiff
path: root/libavcodec/ac3.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-09-27 06:13:01 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-09-27 06:13:01 +0000
commit444ce49a7aea920b0d9ed16cab16f3a86b6a6672 (patch)
treecd5dcfefa90fd388e9de0993c03d8297085a7205 /libavcodec/ac3.c
parent4e745ea83eee0010c0e2f228f47d1394ed1e2170 (diff)
Cosmetics: Rename some variables to be more descriptive of their use.
Originally committed as revision 20049 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3.c')
-rw-r--r--libavcodec/ac3.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c
index f0f9e04f6f..72312c7ed2 100644
--- a/libavcodec/ac3.c
+++ b/libavcodec/ac3.c
@@ -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,
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 */
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,
return;
}
- i = start;
- j = bin_to_band_tab[start];
+ bin = start;
+ band = bin_to_band_tab[start];
do {
- int v = (FFMAX(mask[j] - snr_offset - floor, 0) & 0x1FE0) + floor;
- int end1 = FFMIN(band_start_tab[j] + ff_ac3_critical_band_size_tab[j], end);
- for (; i < end1; i++) {
- int address = av_clip((psd[i] - v) >> 5, 0, 63);
- bap[i] = bap_tab[address];
+ int m = (FFMAX(mask[band] - snr_offset - floor, 0) & 0x1FE0) + floor;
+ int band_end = FFMIN(band_start_tab[band] + ff_ac3_critical_band_size_tab[band], end);
+ for (; bin < band_end; bin++) {
+ int address = av_clip((psd[bin] - m) >> 5, 0, 63);
+ 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