Lines Matching refs:avctx
230 static av_cold int mace_decode_init(AVCodecContext * avctx)
232 MACEContext *ctx = avctx->priv_data;
234 if (avctx->channels > 2)
236 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
239 avctx->coded_frame = &ctx->frame;
244 static int mace_decode_frame(AVCodecContext *avctx, void *data,
250 MACEContext *ctx = avctx->priv_data;
252 int is_mace3 = (avctx->codec_id == CODEC_ID_MACE3);
255 ctx->frame.nb_samples = 3 * (buf_size << (1 - is_mace3)) / avctx->channels;
256 if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
257 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
262 for(i = 0; i < avctx->channels; i++) {
265 for (j=0; j < buf_size / (avctx->channels << is_mace3); j++)
268 (j*avctx->channels << is_mace3) + k];
276 avctx->channels);
279 avctx->channels);
281 output += avctx->channels << (1-is_mace3);