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

Function dolby_e_init

libavcodec/dolby_e.c:1253–1278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1251}
1252
1253static av_cold int dolby_e_init(AVCodecContext *avctx)
1254{
1255 static AVOnce init_once = AV_ONCE_INIT;
1256 DBEDecodeContext *s = avctx->priv_data;
1257 float scale = 2.0f;
1258 int ret;
1259
1260 if (ff_thread_once(&init_once, init_tables))
1261 return AVERROR_UNKNOWN;
1262
1263 for (int i = 0; i < 3; i++) {
1264 if ((ret = av_tx_init(&s->imdct[0][i], &s->imdct_fn[0][i], AV_TX_FLOAT_MDCT,
1265 1, 1 << imdct_bits_tab[i] - 1, &scale, 0)) < 0)
1266 return ret;
1267 if ((ret = av_tx_init(&s->imdct[1][i], &s->imdct_fn[1][i], AV_TX_FLOAT_MDCT,
1268 1, 1 << imdct_bits_tab[i] - 1, &scale, AV_TX_FULL_IMDCT)) < 0)
1269 return ret;
1270 }
1271
1272 if (!(s->fdsp = avpriv_float_dsp_alloc(0)))
1273 return AVERROR(ENOMEM);
1274
1275 s->dectx.metadata.multi_prog_warned = s->dectx.metadata.output_channel_order == CHANNEL_ORDER_CODED;
1276 s->dectx.avctx = s->avctx = avctx;
1277 return 0;
1278}
1279
1280#define OFFSET(x) offsetof(DBEDecodeContext, x)
1281#define FLAGS (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM)

Callers

nothing calls this directly

Calls 3

ff_thread_onceFunction · 0.85
av_tx_initFunction · 0.85
avpriv_float_dsp_allocFunction · 0.85

Tested by

no test coverage detected