| Index: source/libvpx/vp9/common/vp9_mvref_common.c
|
| ===================================================================
|
| --- source/libvpx/vp9/common/vp9_mvref_common.c (revision 232232)
|
| +++ source/libvpx/vp9/common/vp9_mvref_common.c (working copy)
|
| @@ -108,7 +108,7 @@
|
| };
|
|
|
| // clamp_mv_ref
|
| -#define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units
|
| +#define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units
|
|
|
| static void clamp_mv_ref(MV *mv, const MACROBLOCKD *xd) {
|
| clamp_mv(mv, xd->mb_to_left_edge - MV_BORDER,
|
| @@ -170,17 +170,19 @@
|
|
|
| // Checks that the given mi_row, mi_col and search point
|
| // are inside the borders of the tile.
|
| -static INLINE int is_inside(const VP9_COMMON *cm, int mi_col, int mi_row,
|
| +static INLINE int is_inside(const TileInfo *const tile,
|
| + int mi_col, int mi_row, int mi_rows,
|
| const MV *mv) {
|
| return !(mi_row + mv->row < 0 ||
|
| - mi_col + mv->col < cm->cur_tile_mi_col_start ||
|
| - mi_row + mv->row >= cm->mi_rows ||
|
| - mi_col + mv->col >= cm->cur_tile_mi_col_end);
|
| + mi_col + mv->col < tile->mi_col_start ||
|
| + mi_row + mv->row >= mi_rows ||
|
| + mi_col + mv->col >= tile->mi_col_end);
|
| }
|
|
|
| // This function searches the neighbourhood of a given MB/SB
|
| // to try and find candidate reference vectors.
|
| void vp9_find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
| + const TileInfo *const tile,
|
| MODE_INFO *mi, const MODE_INFO *prev_mi,
|
| MV_REFERENCE_FRAME ref_frame,
|
| int_mv *mv_ref_list,
|
| @@ -201,7 +203,7 @@
|
| // and we also need to keep a mode count.
|
| for (i = 0; i < 2; ++i) {
|
| const MV *const mv_ref = &mv_ref_search[i];
|
| - if (is_inside(cm, mi_col, mi_row, mv_ref)) {
|
| + if (is_inside(tile, mi_col, mi_row, cm->mi_rows, mv_ref)) {
|
| const MODE_INFO *const candidate_mi = xd->mi_8x8[mv_ref->col + mv_ref->row
|
| * xd->mode_info_stride];
|
| const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
|
| @@ -228,7 +230,7 @@
|
| // mode counts.
|
| for (; i < MVREF_NEIGHBOURS; ++i) {
|
| const MV *const mv_ref = &mv_ref_search[i];
|
| - if (is_inside(cm, mi_col, mi_row, mv_ref)) {
|
| + if (is_inside(tile, mi_col, mi_row, cm->mi_rows, mv_ref)) {
|
| const MB_MODE_INFO *const candidate = &xd->mi_8x8[mv_ref->col +
|
| mv_ref->row
|
| * xd->mode_info_stride]->mbmi;
|
| @@ -258,7 +260,7 @@
|
| if (different_ref_found) {
|
| for (i = 0; i < MVREF_NEIGHBOURS; ++i) {
|
| const MV *mv_ref = &mv_ref_search[i];
|
| - if (is_inside(cm, mi_col, mi_row, mv_ref)) {
|
| + if (is_inside(tile, mi_col, mi_row, cm->mi_rows, mv_ref)) {
|
| const MB_MODE_INFO *const candidate = &xd->mi_8x8[mv_ref->col +
|
| mv_ref->row
|
| * xd->mode_info_stride]->mbmi;
|
|
|