]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3dsp.c
dcadec: scan for extensions in a separate function
[ffmpeg] / libavcodec / ac3dsp.c
index 25bd6e3577010c0574aff4787ba59b8aaa7f9049..933550bfdcd94211ead6532e06ce2e37831375a2 100644 (file)
@@ -125,7 +125,7 @@ static void ac3_bit_alloc_calc_bap_c(int16_t *mask, int16_t *psd,
         band_end = FFMIN(band_end, end);
 
         for (; bin < band_end; bin++) {
-            int address = av_clip((psd[bin] - m) >> 5, 0, 63);
+            int address = av_clip_uintp2((psd[bin] - m) >> 5, 6);
             bap[bin] = bap_tab[address];
         }
     } while (end > band_end);