Lines Matching refs:avctx
26 static av_cold int decode_init(AVCodecContext *avctx)
28 avctx->pix_fmt = PIX_FMT_RGB48;
29 avctx->bits_per_raw_sample = 10;
31 avctx->coded_frame = avcodec_alloc_frame();
36 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
40 AVFrame *pic = avctx->coded_frame;
42 int aligned_width = FFALIGN(avctx->width, 64);
46 avctx->release_buffer(avctx, pic);
48 if (avpkt->size < 4 * aligned_width * avctx->height) {
49 av_log(avctx, AV_LOG_ERROR, "packet too small\n");
54 if (avctx->get_buffer(avctx, pic) < 0)
61 for (h = 0; h < avctx->height; h++) {
63 for (w = 0; w < avctx->width; w++) {
66 if (avctx->codec_id==CODEC_ID_R210) {
79 src += aligned_width - avctx->width;
84 *(AVFrame*)data = *avctx->coded_frame;
89 static av_cold int decode_close(AVCodecContext *avctx)
91 AVFrame *pic = avctx->coded_frame;
93 avctx->release_buffer(avctx, pic);
94 av_freep(&avctx->coded_frame);