aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-09-27 06:10:36 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-09-27 06:10:36 +0000
commit4e745ea83eee0010c0e2f228f47d1394ed1e2170 (patch)
tree9bda474c93f5d5d7dfbb29f0476180a51de52892
parent3538a2e47a96ddccc42f06d4b53ecc04b434b9a7 (diff)
downloadffmpeg-4e745ea83eee0010c0e2f228f47d1394ed1e2170.tar.gz
Move some variable declarations to inside of loops.
Originally committed as revision 20048 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c
index ff69c63349..f0f9e04f6f 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, end1, v, address;
+ int i, j;
/* special case, if snr offset is -960, set all bap's to zero */
if (snr_offset == -960) {
@@ -227,10 +227,10 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end,
i = start;
j = bin_to_band_tab[start];
do {
- v = (FFMAX(mask[j] - snr_offset - floor, 0) & 0x1FE0) + floor;
- end1 = FFMIN(band_start_tab[j] + ff_ac3_critical_band_size_tab[j], end);
+ 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++) {
- address = av_clip((psd[i] - v) >> 5, 0, 63);
+ int address = av_clip((psd[i] - v) >> 5, 0, 63);
bap[i] = bap_tab[address];
}
} while (end > band_start_tab[j++]);