Lines Matching refs:last_frame
56 AVFrame *last_frame;
79 s->last_frame = av_frame_alloc();
80 if (!s->last_frame)
100 unsigned offset = (mb_y*16 + ((j&2)<<2) + mv_y)*t->last_frame->linesize[0] + mb_x*16 + ((j&1)<<3) + mv_x;
101 if (offset >= (t->avctx->height - 7) * t->last_frame->linesize[0] - 7)
105 t->last_frame->data[0] + offset,
106 t->last_frame->linesize[0], add);
109 unsigned offset = (mb_y * 8 + (mv_y/2))*t->last_frame->linesize[index] + mb_x * 8 + (mv_x/2);
110 if (offset >= (t->avctx->height/2 - 7) * t->last_frame->linesize[index] - 7)
114 t->last_frame->data[index] + offset,
115 t->last_frame->linesize[index], add);
229 if (s->last_frame->data[0])
287 av_frame_unref(s->last_frame);
297 if (inter && !s->last_frame->data[0]) {
299 ret = ff_get_buffer(avctx, s->last_frame, AV_GET_BUFFER_FLAG_REF);
302 memset(s->last_frame->data[0], 0, s->last_frame->height *
303 s->last_frame->linesize[0]);
304 memset(s->last_frame->data[1], 0x80, s->last_frame->height / 2 *
305 s->last_frame->linesize[1]);
306 memset(s->last_frame->data[2], 0x80, s->last_frame->height / 2 *
307 s->last_frame->linesize[2]);
327 av_frame_unref(s->last_frame);
328 if ((ret = av_frame_ref(s->last_frame, frame)) < 0)
338 av_frame_free(&t->last_frame);