Mercurial > libavcodec.hg
comparison ac3.c @ 10289:fbb6d09eb237 libavcodec
Remove unneeded variable.
| author | jbr |
|---|---|
| date | Sun, 27 Sep 2009 06:01:32 +0000 |
| parents | 518b07f1d61a |
| children | 73ce2d78ca89 |
comparison
equal
deleted
inserted
replaced
| 10288:518b07f1d61a | 10289:fbb6d09eb237 |
|---|---|
| 214 | 214 |
| 215 void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end, | 215 void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end, |
| 216 int snr_offset, int floor, | 216 int snr_offset, int floor, |
| 217 const uint8_t *bap_tab, uint8_t *bap) | 217 const uint8_t *bap_tab, uint8_t *bap) |
| 218 { | 218 { |
| 219 int i, j, k, end1, v, address; | 219 int i, j, end1, v, address; |
| 220 | 220 |
| 221 /* special case, if snr offset is -960, set all bap's to zero */ | 221 /* special case, if snr offset is -960, set all bap's to zero */ |
| 222 if (snr_offset == -960) { | 222 if (snr_offset == -960) { |
| 223 memset(bap, 0, 256); | 223 memset(bap, 0, 256); |
| 224 return; | 224 return; |
| 227 i = start; | 227 i = start; |
| 228 j = bin_to_band_tab[start]; | 228 j = bin_to_band_tab[start]; |
| 229 do { | 229 do { |
| 230 v = (FFMAX(mask[j] - snr_offset - floor, 0) & 0x1FE0) + floor; | 230 v = (FFMAX(mask[j] - snr_offset - floor, 0) & 0x1FE0) + floor; |
| 231 end1 = FFMIN(band_start_tab[j] + ff_ac3_critical_band_size_tab[j], end); | 231 end1 = FFMIN(band_start_tab[j] + ff_ac3_critical_band_size_tab[j], end); |
| 232 for (k = i; k < end1; k++) { | 232 for (; i < end1; i++) { |
| 233 address = av_clip((psd[i] - v) >> 5, 0, 63); | 233 address = av_clip((psd[i] - v) >> 5, 0, 63); |
| 234 bap[i] = bap_tab[address]; | 234 bap[i] = bap_tab[address]; |
| 235 i++; | |
| 236 } | 235 } |
| 237 } while (end > band_start_tab[j++]); | 236 } while (end > band_start_tab[j++]); |
| 238 } | 237 } |
| 239 | 238 |
| 240 /* AC-3 bit allocation. The algorithm is the one described in the AC-3 | 239 /* AC-3 bit allocation. The algorithm is the one described in the AC-3 |
