Lines Matching refs:avctx
52 AVCodecContext *avctx;
73 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
77 CamtasiaContext * const c = avctx->priv_data;
83 avctx->release_buffer(avctx, &c->pic);
87 if(avctx->get_buffer(avctx, &c->pic) < 0){
88 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
94 av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret);
104 av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", zret);
112 ff_msrle_decode(avctx, (AVPicture*)&c->pic, c->bpp, &c->gb);
116 if (c->avctx->pix_fmt == PIX_FMT_PAL8) {
140 static av_cold int decode_init(AVCodecContext *avctx)
142 CamtasiaContext * const c = avctx->priv_data;
145 c->avctx = avctx;
147 c->height = avctx->height;
151 switch(avctx->bits_per_coded_sample){
152 case 8: avctx->pix_fmt = PIX_FMT_PAL8; break;
153 case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
155 avctx->pix_fmt = PIX_FMT_BGR24;
157 case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
158 default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_coded_sample);
161 c->bpp = avctx->bits_per_coded_sample;
163 c->decomp_size = (((avctx->width * c->bpp + 7) >> 3) + 3 * avctx->width + 2) * avctx->height + 2;
168 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
178 av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
192 static av_cold int decode_end(AVCodecContext *avctx)
194 CamtasiaContext * const c = avctx->priv_data;
199 avctx->release_buffer(avctx, &c->pic);