]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3dsp.c
nvenc: drop the hard dependency on CUDA
[ffmpeg] / libavcodec / ac3dsp.c
index e792bcfce5ff7aa09aa7824f29b7240ff4cc95fa..38c35b187ae5a3e565268b34e37c32b8eb83e5a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * AC-3 DSP utils
+ * AC-3 DSP functions
  * Copyright (c) 2011 Justin Ruggles
  *
  * This file is part of Libav.
@@ -19,7 +19,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "libavutil/avassert.h"
 #include "avcodec.h"
 #include "ac3.h"
 #include "ac3dsp.h"
@@ -125,7 +124,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);