// 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,