MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / dsp_init

Function dsp_init

libavcodec/aacenc.c:1149–1166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1147}
1148
1149static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
1150{
1151 int ret = 0;
1152 float scale = 32768.0f;
1153
1154 s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
1155 if (!s->fdsp)
1156 return AVERROR(ENOMEM);
1157
1158 if ((ret = av_tx_init(&s->mdct1024, &s->mdct1024_fn, AV_TX_FLOAT_MDCT, 0,
1159 1024, &scale, 0)) < 0)
1160 return ret;
1161 if ((ret = av_tx_init(&s->mdct128, &s->mdct128_fn, AV_TX_FLOAT_MDCT, 0,
1162 128, &scale, 0)) < 0)
1163 return ret;
1164
1165 return 0;
1166}
1167
1168static av_cold int alloc_buffers(AVCodecContext *avctx, AACEncContext *s)
1169{

Callers 1

aac_encode_initFunction · 0.70

Calls 2

avpriv_float_dsp_allocFunction · 0.85
av_tx_initFunction · 0.85

Tested by

no test coverage detected