Lines Matching defs:avctx
68 static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
73 CamStudioContext *c = avctx->priv_data;
75 int bpp = avctx->bits_per_coded_sample / 8;
76 int bugdelta = FFALIGN(avctx->width * bpp, 4) * avctx->height
77 - (avctx->width & ~3) * bpp * avctx->height;
80 av_log(avctx, AV_LOG_ERROR, "coded frame too small\n");
84 if ((ret = ff_reget_buffer(avctx, c->pic, 0)) < 0)
92 av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
101 av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n");
106 av_log(avctx, AV_LOG_ERROR, "compiled without zlib support\n");
111 av_log(avctx, AV_LOG_ERROR, "unknown compression\n");
135 static av_cold int decode_init(AVCodecContext *avctx)
137 CamStudioContext *c = avctx->priv_data;
139 switch (avctx->bits_per_coded_sample) {
140 case 16: avctx->pix_fmt = AV_PIX_FMT_RGB555LE; break;
141 case 24: avctx->pix_fmt = AV_PIX_FMT_BGR24; break;
142 case 32: avctx->pix_fmt = AV_PIX_FMT_BGR0; break;
144 av_log(avctx, AV_LOG_ERROR,
146 avctx->bits_per_coded_sample);
149 c->bpp = avctx->bits_per_coded_sample;
150 c->linelen = avctx->width * avctx->bits_per_coded_sample / 8;
151 c->height = avctx->height;
156 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
165 static av_cold int decode_end(AVCodecContext *avctx)
167 CamStudioContext *c = avctx->priv_data;