Mercurial > libavcodec.hg
changeset 10290:73ce2d78ca89 libavcodec
Move some variable declarations to inside of loops.
author | jbr |
---|---|
date | Sun, 27 Sep 2009 06:10:36 +0000 |
parents | fbb6d09eb237 |
children | 40736a5ed681 |
files | ac3.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ac3.c Sun Sep 27 06:01:32 2009 +0000 +++ b/ac3.c Sun Sep 27 06:10:36 2009 +0000 @@ -216,7 +216,7 @@ 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 @@ 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++]);