Lines Matching defs:avctx

196     AVCodecContext *avctx;
266 AVCodecContext *avctx = ctx->avctx;
269 ff_dlog(avctx, "resolution = %i\n", sconf->resolution);
270 ff_dlog(avctx, "floating = %i\n", sconf->floating);
271 ff_dlog(avctx, "frame_length = %i\n", sconf->frame_length);
272 ff_dlog(avctx, "ra_distance = %i\n", sconf->ra_distance);
273 ff_dlog(avctx, "ra_flag = %i\n", sconf->ra_flag);
274 ff_dlog(avctx, "adapt_order = %i\n", sconf->adapt_order);
275 ff_dlog(avctx, "coef_table = %i\n", sconf->coef_table);
276 ff_dlog(avctx, "long_term_prediction = %i\n", sconf->long_term_prediction);
277 ff_dlog(avctx, "max_order = %i\n", sconf->max_order);
278 ff_dlog(avctx, "block_switching = %i\n", sconf->block_switching);
279 ff_dlog(avctx, "bgmc = %i\n", sconf->bgmc);
280 ff_dlog(avctx, "sb_part = %i\n", sconf->sb_part);
281 ff_dlog(avctx, "joint_stereo = %i\n", sconf->joint_stereo);
282 ff_dlog(avctx, "mc_coding = %i\n", sconf->mc_coding);
283 ff_dlog(avctx, "chan_config = %i\n", sconf->chan_config);
284 ff_dlog(avctx, "chan_sort = %i\n", sconf->chan_sort);
285 ff_dlog(avctx, "RLSLMS = %i\n", sconf->rlslms);
286 ff_dlog(avctx, "chan_config_info = %i\n", sconf->chan_config_info);
300 AVCodecContext *avctx = ctx->avctx;
304 if ((ret = init_get_bits8(&gb, avctx->extradata, avctx->extradata_size)) < 0)
307 config_offset = avpriv_mpeg4audio_get_config2(&m4ac, avctx->extradata,
308 avctx->extradata_size, 1, avctx);
320 avctx->sample_rate = m4ac.sample_rate;
324 if (avctx->ch_layout.nb_channels != m4ac.channels) {
325 av_channel_layout_uninit(&avctx->ch_layout);
326 avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
327 avctx->ch_layout.nb_channels = m4ac.channels;
359 if (avctx->ch_layout.nb_channels > FF_SANE_NB_CHANNELS) {
360 avpriv_request_sample(avctx, "Huge number of channels");
364 if (avctx->ch_layout.nb_channels == 0)
372 // TODO: use this to set avctx->channel_layout
376 if (sconf->chan_sort && avctx->ch_layout.nb_channels > 1) {
377 int chan_pos_bits = av_ceil_log2(avctx->ch_layout.nb_channels);
378 int bits_needed = avctx->ch_layout.nb_channels * chan_pos_bits + 7;
382 if (!(sconf->chan_pos = av_malloc_array(avctx->ch_layout.nb_channels, sizeof(*sconf->chan_pos))))
387 for (i = 0; i < avctx->ch_layout.nb_channels; i++) {
391 for (i = 0; i < avctx->ch_layout.nb_channels; i++) {
395 if (idx >= avctx->ch_layout.nb_channels || sconf->chan_pos[idx] != -1) {
396 av_log(avctx, AV_LOG_WARNING, "Invalid channel reordering.\n");
437 if (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL)) {
465 avpriv_report_missing_feature(ctx->avctx, \
597 AVCodecContext *avctx = ctx->avctx;
611 unsigned int const_val_bits = sconf->floating ? 24 : avctx->bits_per_raw_sample;
641 AVCodecContext *avctx = ctx->avctx;
677 av_log(avctx, AV_LOG_WARNING,
700 av_log(avctx, AV_LOG_ERROR, "k invalid for rice code.\n");
717 av_log(avctx, AV_LOG_ERROR, "Predictor order too large.\n");
752 av_log(avctx, AV_LOG_ERROR,
792 av_log(avctx, AV_LOG_ERROR, "r overflow\n");
812 av_log(avctx, AV_LOG_ERROR, "Sub block length smaller or equal start\n");
817 bd->raw_samples[0] = decode_rice(gb, avctx->bits_per_raw_sample - 4);
1200 av_log(ctx->avctx, AV_LOG_WARNING, "Invalid channel pair.\n");
1241 unsigned int channels = ctx->avctx->ch_layout.nb_channels;
1248 av_log(ctx->avctx, AV_LOG_ERROR, "Invalid master channel.\n");
1273 av_log(ctx->avctx, AV_LOG_ERROR, "Damaged channel data.\n");
1290 unsigned int channels = ctx->avctx->ch_layout.nb_channels;
1306 av_log(ctx->avctx, AV_LOG_WARNING, "Invalid channel correlation.\n");
1337 av_log(ctx->avctx, AV_LOG_ERROR, "begin %"PTRDIFF_SPECIFIER" smaller than time diff index %d.\n", begin, t);
1343 av_log(ctx->avctx, AV_LOG_ERROR, "end %"PTRDIFF_SPECIFIER" smaller than time diff index %d.\n", end, t);
1351 av_log(ctx->avctx, AV_LOG_ERROR,
1373 av_log(ctx->avctx, AV_LOG_ERROR,
1457 AVCodecContext *avctx = ctx->avctx;
1488 memset(last_acf_mantissa, 0, avctx->ch_layout.nb_channels * sizeof(*last_acf_mantissa));
1489 memset(last_shift_value, 0, avctx->ch_layout.nb_channels * sizeof(*last_shift_value) );
1493 if (avctx->ch_layout.nb_channels * 8 > get_bits_left(gb))
1496 for (c = 0; c < avctx->ch_layout.nb_channels; ++c) {
1538 av_log(ctx->avctx, AV_LOG_ERROR, "Error in MLZ decompression (%"PRId32", %d).\n", tmp_32, nchars);
1581 av_log(ctx->avctx, AV_LOG_ERROR, "Error in MLZ decompression (%"PRId32", %d).\n", tmp_32, nchars);
1642 AVCodecContext *avctx = ctx->avctx;
1647 int channels = avctx->ch_layout.nb_channels;
1708 av_log(ctx->avctx, AV_LOG_ERROR, "Invalid channel data.\n");
1722 av_log(ctx->avctx, AV_LOG_WARNING,
1788 av_log(ctx->avctx, AV_LOG_ERROR, "Overread %d\n", -get_bits_left(gb));
1798 static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
1801 ALSDecContext *ctx = avctx->priv_data;
1806 int channels = avctx->ch_layout.nb_channels;
1828 av_log(ctx->avctx, AV_LOG_WARNING,
1832 av_log(ctx->avctx, AV_LOG_WARNING,
1841 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
1850 shift = bps - ctx->avctx->bits_per_raw_sample; \
1862 if (ctx->avctx->bits_per_raw_sample <= 16) {
1869 if (sconf->crc_enabled && (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL))) {
1872 if (ctx->avctx->bits_per_raw_sample == 24) {
1893 if (ctx->avctx->bits_per_raw_sample <= 16) {
1912 av_get_bytes_per_sample(avctx->sample_fmt));
1919 av_log(avctx, AV_LOG_ERROR, "CRC error.\n");
1920 if (avctx->err_recognition & AV_EF_EXPLODE)
1936 static av_cold int decode_end(AVCodecContext *avctx)
1938 ALSDecContext *ctx = avctx->priv_data;
1974 for (i = 0; i < avctx->ch_layout.nb_channels; i++) {
1988 static av_cold int decode_init(AVCodecContext *avctx)
1994 ALSDecContext *ctx = avctx->priv_data;
1996 ctx->avctx = avctx;
1998 if (!avctx->extradata) {
1999 av_log(avctx, AV_LOG_ERROR, "Missing required ALS extradata.\n");
2004 av_log(avctx, AV_LOG_ERROR, "Reading ALSSpecificConfig failed.\n");
2007 channels = avctx->ch_layout.nb_channels;
2014 ret = ff_bgmc_init(avctx, &ctx->bgmc_lut, &ctx->bgmc_lut_status);
2019 avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
2020 avctx->bits_per_raw_sample = 32;
2022 avctx->sample_fmt = sconf->resolution > 1
2024 avctx->bits_per_raw_sample = (sconf->resolution + 1) * 8;
2025 if (avctx->bits_per_raw_sample > 32) {
2026 av_log(avctx, AV_LOG_ERROR, "Bits per raw sample %d larger than 32.\n",
2027 avctx->bits_per_raw_sample);
2038 ctx->ltp_lag_length = 8 + (avctx->sample_rate >= 96000) +
2039 (avctx->sample_rate >= 192000);
2058 av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
2082 av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
2098 av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
2123 av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
2127 ret = ff_mlz_init_dict(avctx, ctx->mlz);
2144 av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
2155 (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL))) {
2158 av_get_bytes_per_sample(avctx->sample_fmt),
2161 av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
2174 static av_cold void flush(AVCodecContext *avctx)
2176 ALSDecContext *ctx = avctx->priv_data;