# HG changeset patch # User jbr # Date 1254026816 0 # Node ID 934cd92921df48f7fc4250dd412e2990bb9699bd # Parent 520c39d4b97024e0f15ef921fad0e31a26421ef6 cosmetics: Rename some variables to be more descriptive of their use. Do some pretty-printing as well. diff -r 520c39d4b970 -r 934cd92921df ac3.c --- a/ac3.c Sun Sep 27 04:41:05 2009 +0000 +++ b/ac3.c Sun Sep 27 04:46:56 2009 +0000 @@ -98,7 +98,7 @@ 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,