#include "libavutil/float_dsp.h"
+#include "imdct15.h"
#include "opus.h"
-#include "opus_imdct.h"
enum CeltSpread {
CELT_SPREAD_NONE,
struct CeltContext {
// constant values that do not change during context lifetime
AVCodecContext *avctx;
- CeltIMDCTContext *imdct[4];
+ IMDCT15Context *imdct[4];
AVFloatDSPContext dsp;
int output_channels;
for (j = 0; j < N; j++)
X[j] = 0.0f;
} else {
- if (lowband == NULL) {
+ if (!lowband) {
/* Noise */
for (j = 0; j < N; j++)
X[j] = (((int32_t)celt_rng(s)) >> 20);
s->remaining2 = totalbits - consumed - 1;
if (i <= s->codedbands - 1) {
int curr_balance = s->remaining / FFMIN(3, s->codedbands-i);
- b = av_clip(FFMIN(s->remaining2 + 1, s->pulses[i] + curr_balance), 0, 16383);
+ b = av_clip_uintp2(FFMIN(s->remaining2 + 1, s->pulses[i] + curr_balance), 14);
} else
b = 0;
int silence = 0;
int transient = 0;
int anticollapse = 0;
- CeltIMDCTContext *imdct;
+ IMDCT15Context *imdct;
float imdct_scale = 1.0;
if (coded_channels != 1 && coded_channels != 2) {
return;
for (i = 0; i < FF_ARRAY_ELEMS(s->imdct); i++)
- ff_celt_imdct_uninit(&s->imdct[i]);
+ ff_imdct15_uninit(&s->imdct[i]);
av_freep(ps);
}
s->output_channels = output_channels;
for (i = 0; i < FF_ARRAY_ELEMS(s->imdct); i++) {
- ret = ff_celt_imdct_init(&s->imdct[i], i + 3);
+ ret = ff_imdct15_init(&s->imdct[i], i + 3);
if (ret < 0)
goto fail;
}
- avpriv_float_dsp_init(&s->dsp, avctx->flags & CODEC_FLAG_BITEXACT);
+ avpriv_float_dsp_init(&s->dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
ff_celt_flush(s);