Lines Matching defs:avctx
51 AVCodecContext *avctx;
67 static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
72 CamtasiaContext * const c = avctx->priv_data;
78 if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) {
79 palette_has_changed = ff_copy_palette(c->pal, avpkt, avctx);
84 av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret);
98 av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", ret);
102 if ((ret = ff_reget_buffer(avctx, frame, 0)) < 0)
108 ff_msrle_decode(avctx, frame, c->bpp, &c->gb);
112 if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) {
125 static av_cold int decode_init(AVCodecContext *avctx)
127 CamtasiaContext * const c = avctx->priv_data;
129 c->avctx = avctx;
131 c->height = avctx->height;
133 switch(avctx->bits_per_coded_sample){
134 case 8: avctx->pix_fmt = AV_PIX_FMT_PAL8; break;
135 case 16: avctx->pix_fmt = AV_PIX_FMT_RGB555; break;
137 avctx->pix_fmt = AV_PIX_FMT_BGR24;
139 case 32: avctx->pix_fmt = AV_PIX_FMT_0RGB32; break;
140 default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_coded_sample);
143 c->bpp = avctx->bits_per_coded_sample;
145 c->decomp_size = (((avctx->width * c->bpp + 7) >> 3) + 3 * avctx->width + 2) * avctx->height + 2;
150 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
159 return ff_inflate_init(&c->zstream, avctx);
162 static av_cold int decode_end(AVCodecContext *avctx)
164 CamtasiaContext * const c = avctx->priv_data;