]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Simplify AC-3 critical band end calculation (correctly this time).
authorjbr <jbr@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 3 Nov 2009 03:26:26 +0000 (03:26 +0000)
committerjbr <jbr@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 3 Nov 2009 03:26:26 +0000 (03:26 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20438 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/ac3.c

index 72312c7ed2208b4d42a67d3cc09cb45c94c8765f..20b339741c24eb595c60ff08a6f712fcbeb64c3e 100644 (file)
@@ -228,7 +228,7 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end,
     band = bin_to_band_tab[start];
     do {
         int m = (FFMAX(mask[band] - snr_offset - floor, 0) & 0x1FE0) + floor;
-        int band_end = FFMIN(band_start_tab[band] + ff_ac3_critical_band_size_tab[band], end);
+        int band_end = FFMIN(band_start_tab[band+1], end);
         for (; bin < band_end; bin++) {
             int address = av_clip((psd[bin] - m) >> 5, 0, 63);
             bap[bin] = bap_tab[address];