int profile;
int debug_flag; ///< used for suppressing repeated error messages output
- AVFloatDSPContext fdsp;
+ AVFloatDSPContext *fdsp;
FFTContext imdct;
SynthFilterContext synth;
DCADSPContext dcadsp;
int embedded_stereo = 0;
int embedded_6ch = 0;
int drc_code_present;
- int av_uninit(extensions_mask);
+ int extensions_mask = 0;
int i, j;
if (get_bits_left(&s->gb) < 16)
float *back_chan = s->samples_chanptr[s->channel_order_tab[s->xch_base_channel]];
float *lt_chan = s->samples_chanptr[s->channel_order_tab[s->xch_base_channel - 2]];
float *rt_chan = s->samples_chanptr[s->channel_order_tab[s->xch_base_channel - 1]];
- s->fdsp.vector_fmac_scalar(lt_chan, back_chan, -M_SQRT1_2, 256);
- s->fdsp.vector_fmac_scalar(rt_chan, back_chan, -M_SQRT1_2, 256);
+ s->fdsp->vector_fmac_scalar(lt_chan, back_chan, -M_SQRT1_2, 256);
+ s->fdsp->vector_fmac_scalar(rt_chan, back_chan, -M_SQRT1_2, 256);
}
/* If stream contains XXCH, we might need to undo an embedded downmix */
scale = s->xxch_dmix_coeff[j][k];
if (scale != 0.0) {
dst_chan = s->samples_chanptr[achan];
- s->fdsp.vector_fmac_scalar(dst_chan, src_chan,
+ s->fdsp->vector_fmac_scalar(dst_chan, src_chan,
-scale, 256);
}
}
s->avctx = avctx;
dca_init_vlcs();
- avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ if (!s->fdsp)
+ return AVERROR(ENOMEM);
+
ff_mdct_init(&s->imdct, 6, 1, 1.0);
ff_synth_filter_init(&s->synth);
ff_dcadsp_init(&s->dcadsp);
DCAContext *s = avctx->priv_data;
ff_mdct_end(&s->imdct);
av_freep(&s->extra_channels_buffer);
+ av_freep(&s->fdsp);
return 0;
}