Lines Matching defs:avctx
75 static av_cold int decode_init(AVCodecContext *avctx)
78 InterplayACMContext *s = avctx->priv_data;
80 if (avctx->extradata_size < 14)
83 if (avctx->ch_layout.nb_channels <= 0) {
84 av_log(avctx, AV_LOG_ERROR, "Invalid number of channels: %d\n", avctx->ch_layout.nb_channels);
88 s->max_samples = AV_RL32(avctx->extradata + 4) / avctx->ch_layout.nb_channels;
91 s->level = AV_RL16(avctx->extradata + 12) & 0xf;
92 s->rows = AV_RL16(avctx->extradata + 12) >> 4;
106 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
555 static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
558 InterplayACMContext *s = avctx->priv_data;
588 frame->nb_samples = FFMIN(s->block_len / avctx->ch_layout.nb_channels, s->max_samples);
590 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
599 for (n = 0; n < frame->nb_samples * avctx->ch_layout.nb_channels; n++) {
622 static av_cold int decode_close(AVCodecContext *avctx)
624 InterplayACMContext *s = avctx->priv_data;