From: hkuang Date: Mon, 8 Dec 2014 18:24:17 +0000 (-0800) Subject: Merge "Improve the performance by caching the left_mi and right_mi in macroblockd." X-Git-Tag: v1.4.0~413 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f925e5ce0fa2981317f76f0960706ae99694ed10;p=libvpx Merge "Improve the performance by caching the left_mi and right_mi in macroblockd." --- f925e5ce0fa2981317f76f0960706ae99694ed10 diff --cc vp9/common/vp9_onyxc_int.h index f2c2d255f,c5af6eaf9..ed56bed1a --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@@ -309,8 -309,34 +309,23 @@@ static INLINE void set_mi_row_col(MACRO // Are edges available for intra prediction? xd->up_available = (mi_row != 0); xd->left_available = (mi_col > tile->mi_col_start); + if (xd->up_available) { + xd->above_mi = xd->mi[-xd->mi_stride].src_mi; + xd->above_mbmi = &xd->above_mi->mbmi;; + } else { + xd->above_mi = NULL; + xd->above_mbmi = NULL; + } + + if (xd->left_available) { + xd->left_mi = xd->mi[-1].src_mi; + xd->left_mbmi = &xd->left_mi->mbmi;; + } else { + xd->left_mi = NULL; + xd->left_mbmi = NULL; + } } -static INLINE void set_prev_mi(VP9_COMMON *cm) { - const int use_prev_in_find_mv_refs = cm->width == cm->last_width && - cm->height == cm->last_height && - !cm->intra_only && - cm->last_show_frame; - // Special case: set prev_mi to NULL when the previous mode info - // context cannot be used. - cm->prev_mi = use_prev_in_find_mv_refs ? - cm->prev_mip + cm->mi_stride + 1 : NULL; -} - static INLINE void update_partition_context(MACROBLOCKD *xd, int mi_row, int mi_col, BLOCK_SIZE subsize,