Lines Matching refs:avctx
36 AVCodecContext *avctx;
44 static av_cold int aasc_decode_init(AVCodecContext *avctx)
46 AascContext *s = avctx->priv_data;
50 s->avctx = avctx;
51 switch (avctx->bits_per_coded_sample) {
53 avctx->pix_fmt = AV_PIX_FMT_PAL8;
55 ptr = avctx->extradata;
56 s->palette_size = FFMIN(avctx->extradata_size, AVPALETTE_SIZE);
63 avctx->pix_fmt = AV_PIX_FMT_RGB555LE;
66 avctx->pix_fmt = AV_PIX_FMT_BGR24;
69 av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth: %d\n", avctx->bits_per_coded_sample);
80 static int aasc_decode_frame(AVCodecContext *avctx,
86 AascContext *s = avctx->priv_data;
90 av_log(avctx, AV_LOG_ERROR, "frame too short\n");
94 if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
100 psize = avctx->bits_per_coded_sample / 8;
101 switch (avctx->codec_tag) {
104 ff_msrle_decode(avctx, (AVPicture*)s->frame, 8, &s->gb);
109 stride = (avctx->width * psize + psize) & ~psize;
110 if (buf_size < stride * avctx->height)
112 for (i = avctx->height - 1; i >= 0; i--) {
113 memcpy(s->frame->data[0] + i * s->frame->linesize[0], buf, avctx->width * psize);
120 ff_msrle_decode(avctx, (AVPicture*)s->frame, 8, &s->gb);
123 av_log(avctx, AV_LOG_ERROR, "Unknown compression type %d\n", compr);
128 av_log(avctx, AV_LOG_ERROR, "Unknown FourCC: %X\n", avctx->codec_tag);
132 if (avctx->pix_fmt == AV_PIX_FMT_PAL8)
143 static av_cold int aasc_decode_end(AVCodecContext *avctx)
145 AascContext *s = avctx->priv_data;