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
This commit is contained in:
Justin Ruggles 2009-09-27 04:46:56 +00:00
parent a7e7417c41
commit 89e6317b5b
1 changed files with 11 additions and 11 deletions

View File

@ -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, void ff_ac3_bit_alloc_calc_psd(int8_t *exp, int start, int end, int16_t *psd,
int16_t *band_psd) int16_t *band_psd)
{ {
int bin, j, k; int bin, band;
/* exponent mapping to PSD */ /* exponent mapping to PSD */
for(bin=start;bin<end;bin++) { for(bin=start;bin<end;bin++) {
@ -106,19 +106,19 @@ void ff_ac3_bit_alloc_calc_psd(int8_t *exp, int start, int end, int16_t *psd,
} }
/* PSD integration */ /* PSD integration */
j=start; bin = start;
k=bin_to_band_tab[start]; band = bin_to_band_tab[start];
do { do {
int v = psd[j++]; int v = psd[bin++];
int end1 = FFMIN(band_start_tab[k+1], end); int band_end = FFMIN(band_start_tab[band+1], end);
for (; j < end1; j++) { for (; bin < band_end; bin++) {
/* logadd */ /* logadd */
int adr = FFMIN(FFABS(v - psd[j]) >> 1, 255); int adr = FFMIN(FFABS(v - psd[bin]) >> 1, 255);
v = FFMAX(v, psd[j]) + ff_ac3_log_add_tab[adr]; v = FFMAX(v, psd[bin]) + ff_ac3_log_add_tab[adr];
} }
band_psd[k]=v; band_psd[band] = v;
k++; band++;
} while (end > band_start_tab[k]); } while (end > band_start_tab[band]);
} }
int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd, int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,