Lines Matching defs:avctx
87 AVCodecContext *avctx;
118 static av_cold int shorten_decode_init(AVCodecContext *avctx)
120 ShortenContext *s = avctx->priv_data;
121 s->avctx = avctx;
134 av_log(s->avctx, AV_LOG_ERROR, "nmean too large\n");
138 av_log(s->avctx, AV_LOG_ERROR,
193 s->avctx->sample_fmt = AV_SAMPLE_FMT_U8P;
198 s->avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
201 av_log(s->avctx, AV_LOG_ERROR, "unknown audio type\n");
211 static int decode_aiff_header(AVCodecContext *avctx, const uint8_t *header,
214 ShortenContext *s = avctx->priv_data;
223 av_log(avctx, AV_LOG_ERROR, "missing FORM tag\n");
232 av_log(avctx, AV_LOG_ERROR, "missing AIFF tag\n");
239 av_log(avctx, AV_LOG_ERROR, "no COMM chunk found\n");
247 av_log(avctx, AV_LOG_ERROR, "COMM chunk was too short\n");
253 avctx->bits_per_coded_sample = bps;
258 av_log(avctx, AV_LOG_ERROR, "unsupported number of bits per sample: %d\n", bps);
265 av_log(avctx, AV_LOG_ERROR, "exp %d is out of range\n", exp);
269 avctx->sample_rate = val << exp;
271 avctx->sample_rate = (val + (1ULL<<(-exp-1))) >> -exp;
274 av_log(avctx, AV_LOG_INFO, "%d header bytes unparsed\n", len);
279 static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header,
289 av_log(avctx, AV_LOG_ERROR, "missing RIFF tag\n");
296 av_log(avctx, AV_LOG_ERROR, "missing WAVE tag\n");
304 av_log(avctx, AV_LOG_ERROR, "no fmt chunk found\n");
311 av_log(avctx, AV_LOG_ERROR, "fmt chunk was too short\n");
321 av_log(avctx, AV_LOG_ERROR, "unsupported wave format\n");
326 avctx->sample_rate = bytestream2_get_le32(&gb);
330 avctx->bits_per_coded_sample = bps;
333 av_log(avctx, AV_LOG_ERROR, "unsupported number of bits per sample: %d\n", bps);
339 av_log(avctx, AV_LOG_INFO, "%d header bytes unparsed\n", len);
361 av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n",
375 av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n",
412 av_log(s->avctx, AV_LOG_ERROR, "missing shorten magic 'ajkg'\n");
424 av_log(s->avctx, AV_LOG_ERROR, "No channels reported\n");
428 av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
432 if (s->avctx->ch_layout.nb_channels != s->channels) {
433 av_channel_layout_uninit(&s->avctx->ch_layout);
434 s->avctx->ch_layout.nb_channels = s->channels;
435 s->avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
445 av_log(s->avctx, AV_LOG_ERROR,
454 av_log(s->avctx, AV_LOG_ERROR, "maxnlpc is: %d\n", maxnlpc);
459 av_log(s->avctx, AV_LOG_ERROR, "nmean is: %d\n", s->nmean);
465 av_log(s->avctx, AV_LOG_ERROR, "invalid skip_bytes: %d\n", skip_bytes);
477 if (s->avctx->extradata_size > 0)
481 av_log(s->avctx, AV_LOG_ERROR,
489 av_log(s->avctx, AV_LOG_ERROR, "header is wrong size: %d\n",
498 if ((ret = decode_wave_header(s->avctx, s->header, s->header_size)) < 0)
501 if ((ret = decode_aiff_header(s->avctx, s->header, s->header_size)) < 0)
504 avpriv_report_missing_feature(s->avctx, "unsupported bit packing %"
525 static int shorten_decode_frame(AVCodecContext *avctx, AVFrame *frame,
530 ShortenContext *s = avctx->priv_data;
542 av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n");
592 av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n");
621 av_log(avctx, AV_LOG_ERROR, "unknown shorten function %d\n", cmd);
632 av_log(avctx, AV_LOG_ERROR, "verbatim length %d invalid\n",
642 av_log(avctx, AV_LOG_ERROR, "bitshift %d is invalid\n",
652 avpriv_report_missing_feature(avctx,
657 av_log(avctx, AV_LOG_ERROR, "invalid or unsupported "
684 av_log(avctx, AV_LOG_ERROR, "residual size unsupportd: %d\n", residual_size);
743 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
778 av_log(s->avctx, AV_LOG_ERROR, "overread: %d\n", i - buf_size);
791 static av_cold int shorten_decode_close(AVCodecContext *avctx)
793 ShortenContext *s = avctx->priv_data;