Lines Matching defs:avctx
42 static av_cold int decode_init(AVCodecContext *avctx)
48 if (!avctx->ch_layout.nb_channels)
53 s = av_malloc_array(sizeof(DSDContext), avctx->ch_layout.nb_channels);
57 silence = avctx->codec_id == AV_CODEC_ID_DSD_LSBF || avctx->codec_id == AV_CODEC_ID_DSD_LSBF_PLANAR ? DSD_SILENCE_REVERSED : DSD_SILENCE;
58 for (i = 0; i < avctx->ch_layout.nb_channels; i++) {
63 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
64 avctx->priv_data = s;
73 static int dsd_channel(AVCodecContext *avctx, void *tdata, int j, int threadnr)
75 int lsbf = avctx->codec_id == AV_CODEC_ID_DSD_LSBF || avctx->codec_id == AV_CODEC_ID_DSD_LSBF_PLANAR;
76 DSDContext *s = avctx->priv_data;
83 if (avctx->codec_id == AV_CODEC_ID_DSD_LSBF_PLANAR || avctx->codec_id == AV_CODEC_ID_DSD_MSBF_PLANAR) {
88 src_stride = avctx->ch_layout.nb_channels;
98 static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
104 frame->nb_samples = avpkt->size / avctx->ch_layout.nb_channels;
106 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
111 avctx->execute2(avctx, dsd_channel, &td, NULL, avctx->ch_layout.nb_channels);
114 return frame->nb_samples * avctx->ch_layout.nb_channels;