Lines Matching defs:avctx

44     AVCodecContext *avctx;
64 int base_x = video_base % s->avctx->width;
65 int base_y = video_base / s->avctx->width;
66 int stride_adj = stride - s->avctx->width;
70 const uint8_t *out_end = out + stride * s->avctx->height;
76 memcpy(out, back_frame, s->avctx->width);
78 back_frame += s->avctx->width;
80 back_frame += base_x - s->avctx->width;
130 * @param avctx decoder context
133 static av_cold int rl2_decode_init(AVCodecContext *avctx)
135 Rl2Context *s = avctx->priv_data;
140 s->avctx = avctx;
141 avctx->pix_fmt = AV_PIX_FMT_PAL8;
143 ret = ff_set_dimensions(avctx, 320, 200);
148 if (!avctx->extradata || avctx->extradata_size < EXTRADATA1_SIZE) {
149 av_log(avctx, AV_LOG_ERROR, "invalid extradata size\n");
154 s->video_base = AV_RL16(&avctx->extradata[0]);
155 s->clr_count = AV_RL32(&avctx->extradata[2]);
157 if (s->video_base >= avctx->width * avctx->height) {
158 av_log(avctx, AV_LOG_ERROR, "invalid video_base\n");
164 s->palette[i] = 0xFFU << 24 | AV_RB24(&avctx->extradata[6 + i * 3]);
167 back_size = avctx->extradata_size - EXTRADATA1_SIZE;
170 uint8_t *back_frame = av_mallocz(avctx->width*avctx->height);
173 rl2_rle_decode(s, avctx->extradata + EXTRADATA1_SIZE, back_size,
174 back_frame, avctx->width, 0);
181 static int rl2_decode_frame(AVCodecContext *avctx, AVFrame *frame,
186 Rl2Context *s = avctx->priv_data;
188 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
207 * @param avctx decoder context
210 static av_cold int rl2_decode_end(AVCodecContext *avctx)
212 Rl2Context *s = avctx->priv_data;