Lines Matching defs:avctx
44 static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
47 WCMVContext *s = avctx->priv_data;
55 av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret);
64 if ((ret = ff_reget_buffer(avctx, s->prev_frame, flags)) < 0)
89 av_log(avctx, AV_LOG_ERROR,
96 av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret);
161 if (!avctx->frame_number) {
163 av_image_fill_black(s->prev_frame->data, linesize, avctx->pix_fmt, 0,
164 avctx->width, avctx->height);
175 if (blocks == 1 && x == 0 && y == 0 && w == avctx->width && h == avctx->height)
178 if (x + w > avctx->width || y + h > avctx->height)
181 if (w > avctx->width || h > avctx->height)
184 dst = s->prev_frame->data[0] + (avctx->height - y - 1) * s->prev_frame->linesize[0] + x * bpp;
191 av_log(avctx, AV_LOG_ERROR,
211 static av_cold int decode_init(AVCodecContext *avctx)
213 WCMVContext *s = avctx->priv_data;
215 switch (avctx->bits_per_coded_sample) {
216 case 16: avctx->pix_fmt = AV_PIX_FMT_RGB565LE; break;
217 case 24: avctx->pix_fmt = AV_PIX_FMT_BGR24; break;
218 case 32: avctx->pix_fmt = AV_PIX_FMT_BGRA; break;
219 default: av_log(avctx, AV_LOG_ERROR, "Unsupported bits_per_coded_sample: %d\n",
220 avctx->bits_per_coded_sample);
224 s->bpp = avctx->bits_per_coded_sample >> 3;
230 return ff_inflate_init(&s->zstream, avctx);
233 static av_cold int decode_close(AVCodecContext *avctx)
235 WCMVContext *s = avctx->priv_data;