*/
#define BITSTREAM_READER_LE
-#include "libavutil/audioconvert.h"
-#include "libavutil/lzo.h"
+#include "libavutil/channel_layout.h"
+#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
/**
* Bitexact implementation of sqrt(val/2).
*/
-static int16_t square_root(int val)
+static int16_t square_root(unsigned val)
{
+ av_assert2(!(val & 0x80000000));
+
return (ff_sqrt(val << 1) >> 1) & (~1);
}
scale = normalize_bits(temp1, 31);
for (i = 0; i < 5; i++)
- energy[i] = av_clipl_int32(energy[i] << scale) >> 16;
+ energy[i] = (energy[i] << scale) >> 16;
if (fwd_lag && !back_lag) { /* Case 1 */
comp_ppf_gains(fwd_lag, ppf, cur_rate, energy[0], energy[1],