Mercurial > libavcodec.hg
comparison ac3.c @ 10283:a4b3121d4299 libavcodec
Simplify by combining increment with array access.
author | jbr |
---|---|
date | Sun, 27 Sep 2009 04:47:38 +0000 |
parents | 934cd92921df |
children | 38e05838efc0 |
comparison
equal
deleted
inserted
replaced
10282:934cd92921df | 10283:a4b3121d4299 |
---|---|
114 for (; bin < band_end; bin++) { | 114 for (; bin < band_end; bin++) { |
115 /* logadd */ | 115 /* logadd */ |
116 int adr = FFMIN(FFABS(v - psd[bin]) >> 1, 255); | 116 int adr = FFMIN(FFABS(v - psd[bin]) >> 1, 255); |
117 v = FFMAX(v, psd[bin]) + ff_ac3_log_add_tab[adr]; | 117 v = FFMAX(v, psd[bin]) + ff_ac3_log_add_tab[adr]; |
118 } | 118 } |
119 band_psd[band] = v; | 119 band_psd[band++] = v; |
120 band++; | |
121 } while (end > band_start_tab[band]); | 120 } while (end > band_start_tab[band]); |
122 } | 121 } |
123 | 122 |
124 int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd, | 123 int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd, |
125 int start, int end, int fast_gain, int is_lfe, | 124 int start, int end, int fast_gain, int is_lfe, |