Lines Matching defs:avctx

189 static av_cold int ac3_decode_init(AVCodecContext *avctx)
192 AC3DecodeContext *s = avctx->priv_data;
197 s->avctx = avctx;
206 s->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT);
208 ff_fmt_convert_init(&s->fmt_conv, avctx);
209 s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
214 ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
218 avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
220 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
225 if (avctx->request_channel_layout) {
227 av_channel_layout_from_mask(&s->downmix_layout, avctx->request_channel_layout);
231 if (avctx->ch_layout.nb_channels > 1 &&
233 av_channel_layout_uninit(&avctx->ch_layout);
234 avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
235 } else if (avctx->ch_layout.nb_channels > 2 &&
237 av_channel_layout_uninit(&avctx->ch_layout);
238 avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
380 av_log(s->avctx, AV_LOG_ERROR, "E-AC-3 support not compiled in\n");
464 av_log(s->avctx, AV_LOG_ERROR, "expacc %d is out-of-range\n", expacc);
477 av_log(s->avctx, AV_LOG_ERROR, "exponent %d is out-of-range\n", prevexp);
602 av_log(s->avctx, AV_LOG_ERROR, "bap %d is invalid in plain AC-3\n", bap);
872 av_log(s->avctx, AV_LOG_ERROR, "invalid spectral extension "
877 av_log(s->avctx, AV_LOG_ERROR, "invalid spectral extension "
990 av_log(s->avctx, AV_LOG_ERROR, "coupling not allowed in mono or dual-mono\n");
997 avpriv_request_sample(s->avctx, "Enhanced coupling");
1019 av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d >= %d)\n",
1068 av_log(s->avctx, AV_LOG_ERROR, "new coupling coordinates must "
1161 av_log(s->avctx, AV_LOG_ERROR, "new coupling strategy must "
1188 av_log(s->avctx, AV_LOG_WARNING, "Warning: "
1215 av_log(s->avctx, AV_LOG_ERROR, "bandwidth code = %d > 60\n", bandwidth_code);
1256 av_log(s->avctx, AV_LOG_ERROR, "new bit allocation info must "
1288 av_log(s->avctx, AV_LOG_ERROR, "new snr offsets must be present in block 0\n");
1326 av_log(s->avctx, AV_LOG_ERROR, "new coupling leak info must "
1339 av_log(s->avctx, AV_LOG_ERROR, "delta bit allocation strategy reserved\n");
1380 av_log(s->avctx, AV_LOG_ERROR, "error in bit allocation\n");
1485 static int ac3_decode_frame(AVCodecContext *avctx, AVFrame *frame,
1490 AC3DecodeContext *s = avctx->priv_data;
1549 av_log(avctx, AV_LOG_ERROR, "frame sync error\n");
1552 av_log(avctx, AV_LOG_ERROR, "invalid bitstream id\n");
1555 av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n");
1558 av_log(avctx, AV_LOG_ERROR, "invalid frame size\n");
1564 av_log(avctx, AV_LOG_DEBUG,
1570 av_log(avctx, AV_LOG_ERROR, "invalid frame type\n");
1583 av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
1585 } else if (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL)) {
1589 av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n");
1590 if (avctx->err_recognition & AV_EF_EXPLODE)
1598 av_log(avctx, AV_LOG_WARNING, "Ignoring dependent frame without independent frame.\n");
1627 av_log(avctx, AV_LOG_ERROR, "error setting downmix coeffs\n");
1632 av_log(avctx, AV_LOG_ERROR, "unable to determine channel mode\n");
1640 av_channel_layout_uninit(&avctx->ch_layout);
1641 av_channel_layout_from_mask(&avctx->ch_layout, mask);
1644 avctx->audio_service_type = s->bitstream_mode;
1646 avctx->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
1661 av_log(avctx, AV_LOG_ERROR, "error decoding the audio block\n");
1698 av_log(avctx, AV_LOG_WARNING, "Ignoring non-compatible dependent frame.\n");
1715 avctx->sample_rate = s->sample_rate;
1716 avctx->bit_rate = s->bit_rate + s->prev_bit_rate;
1738 av_log(avctx, AV_LOG_ERROR, "Too many channels (%d) coded\n",
1743 av_channel_layout_uninit(&avctx->ch_layout);
1744 av_channel_layout_from_mask(&avctx->ch_layout, channel_layout);
1749 int index = av_channel_layout_index_from_channel(&avctx->ch_layout,
1762 int index = av_channel_layout_index_from_channel(&avctx->ch_layout, i);
1778 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
1781 for (ch = 0; ch < avctx->ch_layout.nb_channels; ch++) {
1856 static av_cold int ac3_decode_end(AVCodecContext *avctx)
1858 AC3DecodeContext *s = avctx->priv_data;