Lines Matching refs:avctx
26 static av_cold int decode_init(AVCodecContext *avctx)
28 avctx->pix_fmt = PIX_FMT_YUV420P;
29 avctx->coded_frame = avcodec_alloc_frame();
30 if (!avctx->coded_frame)
36 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
40 AVFrame *pic = avctx->coded_frame;
46 avctx->release_buffer(avctx, pic);
48 if (avpkt->size < avctx->width * avctx->height * 3 / 2 + 16) {
49 av_log(avctx, AV_LOG_ERROR, "packet too small\n");
54 if ((ret = avctx->get_buffer(avctx, pic)) < 0)
61 av_log_ask_for_sample(avctx, "Unknown frame header %X\n", AV_RL32(src));
70 for (h = 0; h < avctx->height; h += 2) {
71 for (w = 0; w < avctx->width; w += 2) {
90 static av_cold int decode_close(AVCodecContext *avctx)
92 AVFrame *pic = avctx->coded_frame;
94 avctx->release_buffer(avctx, pic);
95 av_freep(&avctx->coded_frame);