Lines Matching defs:avctx
43 av_log(s->avctx, AV_LOG_ERROR, " MS Video-1 warning: stream_ptr out of bounds (%d >= %d)\n", \
50 AVCodecContext *avctx;
61 static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
63 Msvideo1Context *s = avctx->priv_data;
65 s->avctx = avctx;
67 if (avctx->width < 4 || avctx->height < 4)
71 if (s->avctx->bits_per_coded_sample == 8) {
73 avctx->pix_fmt = AV_PIX_FMT_PAL8;
74 if (avctx->extradata_size >= AVPALETTE_SIZE)
75 memcpy(s->pal, avctx->extradata, AVPALETTE_SIZE);
78 avctx->pix_fmt = AV_PIX_FMT_RGB555;
109 blocks_wide = s->avctx->width / 4;
110 blocks_high = s->avctx->height / 4;
184 if (s->avctx->pix_fmt == AV_PIX_FMT_PAL8)
209 blocks_wide = s->avctx->width / 4;
210 blocks_high = s->avctx->height / 4;
297 static int msvideo1_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
302 Msvideo1Context *s = avctx->priv_data;
309 if (buf_size < (avctx->width/4) * (avctx->height/4) / 512) {
310 av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
314 if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0)
318 s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx);
335 static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
337 Msvideo1Context *s = avctx->priv_data;