Lines Matching defs:avctx
74 AVCodecContext *avctx;
182 static av_cold int decode_init(AVCodecContext *avctx)
184 WmallDecodeCtx *s = avctx->priv_data;
185 uint8_t *edata_ptr = avctx->extradata;
189 if (avctx->block_align <= 0 || avctx->block_align > (1<<21)) {
190 av_log(avctx, AV_LOG_ERROR, "block_align is not set or invalid\n");
194 if (avctx->extradata_size >= 18) {
199 avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
201 avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
202 avctx->bits_per_raw_sample = 24;
204 av_log(avctx, AV_LOG_ERROR, "Unknown bit-depth: %"PRIu8"\n",
209 for (i = 0; i < avctx->extradata_size; i++)
210 ff_dlog(avctx, "[%x] ", avctx->extradata[i]);
211 ff_dlog(avctx, "\n");
214 avpriv_request_sample(avctx, "Unsupported extradata size");
219 av_channel_layout_uninit(&avctx->ch_layout);
220 av_channel_layout_from_mask(&avctx->ch_layout, channel_mask);
222 av_assert0(avctx->ch_layout.nb_channels >= 0);
223 if (avctx->ch_layout.nb_channels > WMALL_MAX_CHANNELS) {
224 avpriv_request_sample(avctx,
229 s->num_channels = avctx->ch_layout.nb_channels;
241 s->max_frame_size = MAX_FRAMESIZE * avctx->ch_layout.nb_channels;
246 s->avctx = avctx;
251 s->log2_frame_size = av_log2(avctx->block_align) + 4;
259 s->samples_per_frame = 1 << ff_wma_get_frame_len_bits(avctx->sample_rate,
264 for (i = 0; i < avctx->ch_layout.nb_channels; i++)
278 av_log(avctx, AV_LOG_ERROR, "invalid number of subframes %"PRIu8"\n",
311 av_log(s->avctx, AV_LOG_ERROR, "broken frame: subframe_len %i\n",
374 av_log(s->avctx, AV_LOG_ERROR,
389 av_log(s->avctx, AV_LOG_ERROR,
397 av_log(s->avctx, AV_LOG_ERROR, "broken frame: "
466 av_log(s->avctx, AV_LOG_ERROR,
475 avpriv_request_sample(s->avctx, "CDLMS of order %d",
890 avpriv_request_sample(s->avctx, "Arithmetic coding");
914 av_log(s->avctx, AV_LOG_DEBUG,
933 avpriv_request_sample(s->avctx, "Expect wrong output since "
951 av_log(s->avctx, AV_LOG_ERROR,
955 ff_dlog(s->avctx, "RAWPCM %d bits per sample. "
1012 av_log(s->avctx, AV_LOG_ERROR, "broken subframe\n");
1032 if ((ret = ff_get_buffer(s->avctx, s->frame, 0)) < 0) {
1066 ff_dlog(s->avctx, "start skip: %i\n", skip);
1072 ff_dlog(s->avctx, "end skip: %i\n", skip);
1098 ff_dlog(s->avctx, "Frame done\n");
1105 av_log(s->avctx, AV_LOG_ERROR,
1160 avpriv_request_sample(s->avctx, "Too small input buffer");
1186 static int decode_packet(AVCodecContext *avctx, AVFrame *rframe,
1189 WmallDecodeCtx *s = avctx->priv_data;
1207 s->next_packet_start = buf_size - FFMIN(avctx->block_align, buf_size);
1208 buf_size = FFMIN(avctx->block_align, buf_size);
1217 avpriv_request_sample(avctx, "Bitstream splicing");
1226 av_log(avctx, AV_LOG_ERROR,
1247 ff_dlog(avctx, "ignoring %x previously saved bits\n",
1288 av_log(avctx, AV_LOG_ERROR, "Overread %d\n", -remaining_bits(s, gb));
1307 static void flush(AVCodecContext *avctx)
1309 WmallDecodeCtx *s = avctx->priv_data;
1320 static av_cold int decode_close(AVCodecContext *avctx)
1322 WmallDecodeCtx *s = avctx->priv_data;