* The simplest AC-3 encoder.
*/
-//#define ASSERT_LEVEL 2
-
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
+#include "me_cmp.h"
#include "put_bits.h"
+#include "audiodsp.h"
#include "ac3dsp.h"
#include "ac3.h"
#include "fft.h"
exp_strategy[blk] = EXP_NEW;
continue;
}
- exp_diff = s->dsp.sad[0](NULL, exp, exp - AC3_MAX_COEFS, 16, 16);
+ exp_diff = s->mecc.sad[0](NULL, exp, exp - AC3_MAX_COEFS, 16, 16);
exp_strategy[blk] = EXP_REUSE;
if (ch == CPL_CH && exp_diff > (EXP_DIFF_THRESHOLD * (s->blocks[blk].end_freq[ch] - s->start_freq[ch]) / AC3_MAX_COEFS))
exp_strategy[blk] = EXP_NEW;
* Initialize bit allocation.
* Set default parameter codes and calculate parameter values.
*/
-static void bit_alloc_init(AC3EncodeContext *s)
+static av_cold void bit_alloc_init(AC3EncodeContext *s)
{
int ch;
if (ret)
goto init_fail;
- ff_dsputil_init(&s->dsp, avctx);
- avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
+ ff_audiodsp_init(&s->adsp);
+ ff_me_cmp_init(&s->mecc, avctx);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
dprint_options(s);