Lines Matching defs:avctx

47     AVCodecContext *avctx;
208 static av_cold int qdmc_decode_init(AVCodecContext *avctx)
211 QDMCContext *s = avctx->priv_data;
218 if (!avctx->extradata || (avctx->extradata_size < 48)) {
219 av_log(avctx, AV_LOG_ERROR, "extradata missing or truncated\n");
223 bytestream2_init(&b, avctx->extradata, avctx->extradata_size);
234 av_log(avctx, AV_LOG_ERROR, "not enough extradata (%i)\n",
241 av_log(avctx, AV_LOG_ERROR, "extradata size too small, %i < %i\n",
247 av_log(avctx, AV_LOG_ERROR, "invalid extradata, expecting QDCA\n");
254 av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n");
257 av_channel_layout_uninit(&avctx->ch_layout);
258 avctx->ch_layout = s->nb_channels == 2 ? (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO :
261 avctx->sample_rate = bytestream2_get_be32u(&b);
262 avctx->bit_rate = bytestream2_get_be32u(&b);
268 av_log(avctx, AV_LOG_ERROR, "data block size too large (%u)\n", s->checksum_size);
272 if (avctx->sample_rate >= 32000) {
275 } else if (avctx->sample_rate >= 16000) {
285 if (avctx->ch_layout.nb_channels == 2)
287 s->band_index = noise_bands_selector[FFMIN(6, llrint(floor(avctx->bit_rate * 3.0 / (double)x + 0.5)))];
290 avpriv_request_sample(avctx, "Unknown FFT order %d", fft_order);
295 av_log(avctx, AV_LOG_ERROR, "FFT size %d not power of 2.\n", fft_size);
303 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
315 static av_cold int qdmc_decode_close(AVCodecContext *avctx)
317 QDMCContext *s = avctx->priv_data;
413 av_log(s->avctx, AV_LOG_WARNING, "Too many tones already in buffer, ignoring tone!\n");
689 static av_cold void qdmc_flush(AVCodecContext *avctx)
691 QDMCContext *s = avctx->priv_data;
699 static int qdmc_decode_frame(AVCodecContext *avctx, AVFrame *frame,
702 QDMCContext *s = avctx->priv_data;
711 s->avctx = avctx;
713 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
727 qdmc_flush(avctx);