Lines Matching defs:avctx

42     AVCodecContext *avctx;
57 static av_cold int mp_decode_end(AVCodecContext *avctx)
59 MotionPixelsContext *mp = avctx->priv_data;
70 static av_cold int mp_decode_init(AVCodecContext *avctx)
73 MotionPixelsContext *mp = avctx->priv_data;
74 int w4 = (avctx->width + 3) & ~3;
75 int h4 = (avctx->height + 3) & ~3;
77 if(avctx->extradata_size < 2){
78 av_log(avctx, AV_LOG_ERROR, "extradata too small\n");
82 mp->avctx = avctx;
84 mp->changes_map = av_calloc(avctx->width, h4);
85 mp->offset_bits_len = av_log2(avctx->width * avctx->height) + 1;
86 mp->vpt = av_calloc(avctx->height, sizeof(*mp->vpt));
90 avctx->pix_fmt = AV_PIX_FMT_RGB555;
114 x = offset % mp->avctx->width;
115 y = offset / mp->avctx->width;
116 if (y >= mp->avctx->height)
118 w = FFMIN(w, mp->avctx->width - x);
119 h = FFMIN(h, mp->avctx->height - y);
126 offset += mp->avctx->width;
137 av_log(mp->avctx, AV_LOG_ERROR, "invalid code size %d/%d\n", size, mp->max_codes_bits);
144 av_log(mp->avctx, AV_LOG_ERROR, "too many codes\n");
167 av_log(mp->avctx, AV_LOG_ERROR, "too few codes\n");
208 const int y0 = y * mp->avctx->width;
216 while (x < mp->avctx->width) {
220 if (mp->changes_map[y0 + x + mp->avctx->width] < w ||
221 mp->changes_map[y0 + x + mp->avctx->width * 2] < w ||
222 mp->changes_map[y0 + x + mp->avctx->width * 3] < w) {
224 mp->hpt[((y / 4) * mp->avctx->width + i) / 4] = mp_get_yuv_from_rgb(mp, i, y);
240 mp->hpt[((y / 4) * mp->avctx->width + x) / 4] = p;
242 p.v = mp->hpt[((y / 4) * mp->avctx->width + x) / 4].v;
243 p.u = mp->hpt[((y / 4) * mp->avctx->width + x) / 4].u;
259 for (y = 0; y < mp->avctx->height; ++y) {
260 if (mp->changes_map[y * mp->avctx->width] != 0) {
277 for (y = y0; y < mp->avctx->height; y += 2)
281 static int mp_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
286 MotionPixelsContext *mp = avctx->priv_data;
290 if ((ret = ff_reget_buffer(avctx, mp->frame, 0)) < 0)
303 memset(mp->changes_map, 0, avctx->width * avctx->height);
304 for (i = !(avctx->extradata[1] & 2); i < 2; ++i) {
323 if (avctx->extradata[0] != 5)
334 0, 0, avctx);