From 89e6317b5b680263b260cee7ea284c930f57ef60 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 27 Sep 2009 04:46:56 +0000 Subject: [PATCH] cosmetics: Rename some variables to be more descriptive of their use. Do some pretty-printing as well. Originally committed as revision 20040 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ac3.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c index e97c396158..124859d9be 100644 --- a/libavcodec/ac3.c +++ b/libavcodec/ac3.c @@ -98,7 +98,7 @@ static inline int calc_lowcomp(int a, int b0, int b1, int bin) void ff_ac3_bit_alloc_calc_psd(int8_t *exp, int start, int end, int16_t *psd, int16_t *band_psd) { - int bin, j, k; + int bin, band; /* exponent mapping to PSD */ for(bin=start;bin> 1, 255); - v = FFMAX(v, psd[j]) + ff_ac3_log_add_tab[adr]; + int adr = FFMIN(FFABS(v - psd[bin]) >> 1, 255); + v = FFMAX(v, psd[bin]) + ff_ac3_log_add_tab[adr]; } - band_psd[k]=v; - k++; - } while (end > band_start_tab[k]); + band_psd[band] = v; + band++; + } while (end > band_start_tab[band]); } int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,