Lines Matching defs:avctx
169 int (*decode)(AVCodecContext *avctx, void *dec, GetBitContext *gb, float *out);
866 static int nb_decode(AVCodecContext *avctx, void *ptr_st,
872 SpeexContext *s = avctx->priv_data;
909 av_log(avctx, AV_LOG_ERROR, "more than two wideband layers found\n");
1217 static int sb_decode(AVCodecContext *avctx, void *ptr_st,
1220 SpeexContext *s = avctx->priv_data;
1236 ret = speex_modes[st->modeID - 1].decode(avctx, &s->st[st->modeID - 1], gb, out);
1396 static int parse_speex_extradata(AVCodecContext *avctx,
1399 SpeexContext *s = avctx->priv_data;
1436 static av_cold int speex_decode_init(AVCodecContext *avctx)
1438 SpeexContext *s = avctx->priv_data;
1445 if (avctx->extradata && avctx->extradata_size >= 80) {
1446 ret = parse_speex_extradata(avctx, avctx->extradata, avctx->extradata_size);
1450 s->rate = avctx->sample_rate;
1454 s->nb_channels = avctx->ch_layout.nb_channels;
1469 if (avctx->codec_tag == MKTAG('S', 'P', 'X', 'N')) {
1472 if (!avctx->extradata || avctx->extradata && avctx->extradata_size < 47) {
1473 av_log(avctx, AV_LOG_ERROR, "Missing or invalid extradata.\n");
1477 quality = avctx->extradata[37];
1479 av_log(avctx, AV_LOG_ERROR, "Unsupported quality mode %d.\n", quality);
1487 s->rate = avctx->sample_rate;
1495 avctx->bit_rate = s->bitrate;
1496 av_channel_layout_uninit(&avctx->ch_layout);
1497 avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
1498 avctx->ch_layout.nb_channels = s->nb_channels;
1499 avctx->sample_rate = s->rate;
1500 avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
1536 static int speex_decode_frame(AVCodecContext *avctx, AVFrame *frame,
1539 SpeexContext *s = avctx->priv_data;
1551 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
1556 ret = speex_modes[s->mode].decode(avctx, &s->st[s->mode], &s->gb, dst + i * s->frame_size);
1559 if (avctx->ch_layout.nb_channels == 2)
1572 static av_cold int speex_decode_close(AVCodecContext *avctx)
1574 SpeexContext *s = avctx->priv_data;