Lines Matching refs:mvi
76 MVInfo mvi; member
298 static MV mvi_predict(MVInfo *mvi, int mb_x, int mb_y, MV diff) in mvi_predict() argument
303 if (mvi->top) { in mvi_predict()
305 pred_mv = mvi->mv[mvi->mb_stride + mb_x - 1]; in mvi_predict()
309 } else if ((mb_x == 0) || (mb_x == mvi->mb_w - 1)) { in mvi_predict()
310 pred_mv = mvi->mv[mb_x]; in mvi_predict()
312 MV A = mvi->mv[mvi->mb_stride + mb_x - 1]; in mvi_predict()
313 MV B = mvi->mv[ mb_x ]; in mvi_predict()
314 MV C = mvi->mv[ mb_x + 1]; in mvi_predict()
321 left_mv = -((mb_x * mvi->mb_size)); in mvi_predict()
322 right_mv = ((mvi->mb_w - mb_x - 1) * mvi->mb_size); in mvi_predict()
329 top_mv = -((mb_y * mvi->mb_size)); in mvi_predict()
330 bot_mv = ((mvi->mb_h - mb_y - 1) * mvi->mb_size); in mvi_predict()
338 mvi->mv[mvi->mb_stride + mb_x].x = res.x + diff.x; in mvi_predict()
339 mvi->mv[mvi->mb_stride + mb_x].y = res.y + diff.y; in mvi_predict()
344 static void mvi_reset(MVInfo *mvi, int mb_w, int mb_h, int mb_size) in mvi_reset() argument
346 mvi->top = 1; in mvi_reset()
347 mvi->mb_w = mb_w; in mvi_reset()
348 mvi->mb_h = mb_h; in mvi_reset()
349 mvi->mb_size = mb_size; in mvi_reset()
350 mvi->mb_stride = mb_w; in mvi_reset()
351 memset(mvi->mv, 0, sizeof(MV) * mvi->mb_stride * 2); in mvi_reset()
354 static void mvi_update_row(MVInfo *mvi) in mvi_update_row() argument
358 mvi->top = 0; in mvi_update_row()
359 for (i = 0 ; i < mvi->mb_stride; i++) { in mvi_update_row()
360 mvi->mv[i] = mvi->mv[mvi->mb_stride + i]; in mvi_update_row()
574 mvi_reset(&c->mvi, c->pmb_width, c->pmb_height, 1 << c->tile_shift); in clv_decode_frame()
581 MV mv = mvi_predict(&c->mvi, i, j, zero_mv); in clv_decode_frame()
604 mv = mvi_predict(&c->mvi, i, j, tile->mv); in clv_decode_frame()
632 mvi_update_row(&c->mvi); in clv_decode_frame()
746 c->mvi.mv = av_calloc(c->pmb_width * 2, sizeof(*c->mvi.mv)); in clv_decode_init()
747 if (!c->pic || !c->prev || !c->mvi.mv) in clv_decode_init()
764 av_freep(&c->mvi.mv); in clv_decode_end()