Lines Matching refs:avctx
43 AVCodecContext *avctx;
63 int base_x = video_base % s->avctx->width;
64 int base_y = video_base / s->avctx->width;
65 int stride_adj = stride - s->avctx->width;
69 const uint8_t *out_end = out + stride * s->avctx->height;
75 memcpy(out, back_frame, s->avctx->width);
77 back_frame += s->avctx->width;
79 back_frame += base_x - s->avctx->width;
129 * @param avctx decoder context
132 static av_cold int rl2_decode_init(AVCodecContext *avctx)
134 Rl2Context *s = avctx->priv_data;
138 s->avctx = avctx;
139 avctx->pix_fmt = AV_PIX_FMT_PAL8;
142 if (!avctx->extradata || avctx->extradata_size < EXTRADATA1_SIZE) {
143 av_log(avctx, AV_LOG_ERROR, "invalid extradata size\n");
148 s->video_base = AV_RL16(&avctx->extradata[0]);
149 s->clr_count = AV_RL32(&avctx->extradata[2]);
151 if (s->video_base >= avctx->width * avctx->height) {
152 av_log(avctx, AV_LOG_ERROR, "invalid video_base\n");
158 s->palette[i] = 0xFFU << 24 | AV_RB24(&avctx->extradata[6 + i * 3]);
161 back_size = avctx->extradata_size - EXTRADATA1_SIZE;
164 uint8_t *back_frame = av_mallocz(avctx->width*avctx->height);
167 rl2_rle_decode(s, avctx->extradata + EXTRADATA1_SIZE, back_size,
168 back_frame, avctx->width, 0);
175 static int rl2_decode_frame(AVCodecContext *avctx,
182 Rl2Context *s = avctx->priv_data;
184 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
203 * @param avctx decoder context
206 static av_cold int rl2_decode_end(AVCodecContext *avctx)
208 Rl2Context *s = avctx->priv_data;