Lines Matching defs:avctx
86 static av_cold int qcelp_decode_init(AVCodecContext *avctx)
88 QCELPContext *q = avctx->priv_data;
91 av_channel_layout_uninit(&avctx->ch_layout);
92 avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
93 avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
605 * @param avctx the AV codec context
614 static qcelp_packet_rate determine_bitrate(AVCodecContext *avctx,
622 QCELPContext *q = avctx->priv_data;
624 av_log(avctx, AV_LOG_WARNING,
630 av_log(avctx, AV_LOG_ERROR,
636 av_log(avctx, AV_LOG_WARNING,
643 avpriv_request_sample(avctx, "Blank frame handling");
648 static void warn_insufficient_frame_quality(AVCodecContext *avctx,
651 av_log(avctx, AV_LOG_WARNING, "Frame #%d, IFQ: %s\n",
652 avctx->frame_number, message);
687 static int qcelp_decode_frame(AVCodecContext *avctx, AVFrame *frame,
692 QCELPContext *q = avctx->priv_data;
701 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
705 if ((q->bitrate = determine_bitrate(avctx, buf_size, &buf)) == I_F_Q) {
706 warn_insufficient_frame_quality(avctx, "Bitrate cannot be determined.");
712 warn_insufficient_frame_quality(avctx, "Bitrate is 1/8 and first 16 bits are on.");
732 warn_insufficient_frame_quality(avctx, "Wrong data in reserved frame area.");
737 warn_insufficient_frame_quality(avctx, "Codebook gain sanity check failed.");
744 warn_insufficient_frame_quality(avctx, "Cannot initialize pitch filter.");
755 warn_insufficient_frame_quality(avctx, "Badly received packets in frame.");