Commit 549258b1 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Gerrit Code Review
Browse files

Merge "border mvref issue" into experimental

parents 7f99844e 75459d65
...@@ -152,6 +152,7 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here, ...@@ -152,6 +152,7 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
int split_count = 0; int split_count = 0;
int (*mv_ref_search)[2]; int (*mv_ref_search)[2];
const int mi_col = get_mi_col(xd); const int mi_col = get_mi_col(xd);
const int mi_row = get_mi_row(xd);
int intra_count = 0; int intra_count = 0;
int zero_count = 0; int zero_count = 0;
int newmv_count = 0; int newmv_count = 0;
...@@ -171,10 +172,10 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here, ...@@ -171,10 +172,10 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
// Look at nearest neigbours // Look at nearest neigbours
for (i = 0; i < 2; ++i) { for (i = 0; i < 2; ++i) {
const int mi_search_col = mi_col + mv_ref_search[i][0]; const int mi_search_col = mi_col + mv_ref_search[i][0];
const int mi_search_row = mi_row + mv_ref_search[i][1];
if ((mi_search_col >= cm->cur_tile_mi_col_start) && if ((mi_search_col >= cm->cur_tile_mi_col_start) &&
(mi_search_col < cm->cur_tile_mi_col_end) && (mi_search_col < cm->cur_tile_mi_col_end) &&
((mv_ref_search[i][1] << 6) >= xd->mb_to_top_edge) && (mi_search_row >= 0) && (mi_search_row < cm->mi_rows)) {
((-mv_ref_search[i][1] << 6) <= xd->mb_to_bottom_edge)) {
int b; int b;
candidate_mi = here + mv_ref_search[i][0] + candidate_mi = here + mv_ref_search[i][0] +
...@@ -206,11 +207,10 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here, ...@@ -206,11 +207,10 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
for (i = 2; (i < MVREF_NEIGHBOURS) && for (i = 2; (i < MVREF_NEIGHBOURS) &&
(refmv_count < MAX_MV_REF_CANDIDATES); ++i) { (refmv_count < MAX_MV_REF_CANDIDATES); ++i) {
const int mi_search_col = mi_col + mv_ref_search[i][0]; const int mi_search_col = mi_col + mv_ref_search[i][0];
const int mi_search_row = mi_row + mv_ref_search[i][1];
if ((mi_search_col >= cm->cur_tile_mi_col_start) && if ((mi_search_col >= cm->cur_tile_mi_col_start) &&
(mi_search_col < cm->cur_tile_mi_col_end) && (mi_search_col < cm->cur_tile_mi_col_end) &&
((mv_ref_search[i][1] << 6) >= xd->mb_to_top_edge) && (mi_search_row >= 0) && (mi_search_row < cm->mi_rows)) {
((-mv_ref_search[i][1] << 6) <= xd->mb_to_bottom_edge)) {
candidate_mi = here + mv_ref_search[i][0] + candidate_mi = here + mv_ref_search[i][0] +
(mv_ref_search[i][1] * xd->mode_info_stride); (mv_ref_search[i][1] * xd->mode_info_stride);
...@@ -237,11 +237,10 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here, ...@@ -237,11 +237,10 @@ void vp9_find_mv_refs_idx(VP9_COMMON *cm, MACROBLOCKD *xd, MODE_INFO *here,
for (i = 0; (i < MVREF_NEIGHBOURS) && for (i = 0; (i < MVREF_NEIGHBOURS) &&
(refmv_count < MAX_MV_REF_CANDIDATES); ++i) { (refmv_count < MAX_MV_REF_CANDIDATES); ++i) {
const int mi_search_col = mi_col + mv_ref_search[i][0]; const int mi_search_col = mi_col + mv_ref_search[i][0];
const int mi_search_row = mi_row + mv_ref_search[i][1];
if ((mi_search_col >= cm->cur_tile_mi_col_start) && if ((mi_search_col >= cm->cur_tile_mi_col_start) &&
(mi_search_col < cm->cur_tile_mi_col_end) && (mi_search_col < cm->cur_tile_mi_col_end) &&
((mv_ref_search[i][1] << 6) >= xd->mb_to_top_edge) && (mi_search_row >= 0) && (mi_search_row < cm->mi_rows)) {
((-mv_ref_search[i][1] << 6) <= xd->mb_to_bottom_edge)) {
candidate_mi = here + mv_ref_search[i][0] + candidate_mi = here + mv_ref_search[i][0] +
(mv_ref_search[i][1] * xd->mode_info_stride); (mv_ref_search[i][1] * xd->mode_info_stride);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment