diff options
Diffstat (limited to 'vp9/encoder/vp9_mcomp.c')
-rw-r--r-- | vp9/encoder/vp9_mcomp.c | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c index 8f340d2af..ad8c8999a 100644 --- a/vp9/encoder/vp9_mcomp.c +++ b/vp9/encoder/vp9_mcomp.c @@ -339,13 +339,13 @@ int vp9_find_best_sub_pixel_iterative(MACROBLOCK *x, int rr = ref_mv->as_mv.row; int rc = ref_mv->as_mv.col; - int br = bestmv->as_mv.row << 3; - int bc = bestmv->as_mv.col << 3; + int br = bestmv->as_mv.row * 8; + int bc = bestmv->as_mv.col * 8; int hstep = 4; - const int minc = MAX(x->mv_col_min << 3, ref_mv->as_mv.col - MV_MAX); - const int maxc = MIN(x->mv_col_max << 3, ref_mv->as_mv.col + MV_MAX); - const int minr = MAX(x->mv_row_min << 3, ref_mv->as_mv.row - MV_MAX); - const int maxr = MIN(x->mv_row_max << 3, ref_mv->as_mv.row + MV_MAX); + const int minc = MAX(x->mv_col_min * 8, ref_mv->as_mv.col - MV_MAX); + const int maxc = MIN(x->mv_col_max * 8, ref_mv->as_mv.col + MV_MAX); + const int minr = MAX(x->mv_row_min * 8, ref_mv->as_mv.row - MV_MAX); + const int maxr = MIN(x->mv_row_max * 8, ref_mv->as_mv.row + MV_MAX); int tr = br; int tc = bc; @@ -436,20 +436,20 @@ int vp9_find_best_sub_pixel_tree(MACROBLOCK *x, int rr = ref_mv->as_mv.row; int rc = ref_mv->as_mv.col; - int br = bestmv->as_mv.row << 3; - int bc = bestmv->as_mv.col << 3; + int br = bestmv->as_mv.row * 8; + int bc = bestmv->as_mv.col * 8; int hstep = 4; - const int minc = MAX(x->mv_col_min << 3, ref_mv->as_mv.col - MV_MAX); - const int maxc = MIN(x->mv_col_max << 3, ref_mv->as_mv.col + MV_MAX); - const int minr = MAX(x->mv_row_min << 3, ref_mv->as_mv.row - MV_MAX); - const int maxr = MIN(x->mv_row_max << 3, ref_mv->as_mv.row + MV_MAX); + const int minc = MAX(x->mv_col_min * 8, ref_mv->as_mv.col - MV_MAX); + const int maxc = MIN(x->mv_col_max * 8, ref_mv->as_mv.col + MV_MAX); + const int minr = MAX(x->mv_row_min * 8, ref_mv->as_mv.row - MV_MAX); + const int maxr = MIN(x->mv_row_max * 8, ref_mv->as_mv.row + MV_MAX); int tr = br; int tc = bc; // central mv - bestmv->as_mv.row <<= 3; - bestmv->as_mv.col <<= 3; + bestmv->as_mv.row *= 8; + bestmv->as_mv.col *= 8; // calculate central point error besterr = vfp->vf(y, y_stride, z, src_stride, sse1); @@ -532,20 +532,20 @@ int vp9_find_best_sub_pixel_comp_iterative(MACROBLOCK *x, int rr = ref_mv->as_mv.row; int rc = ref_mv->as_mv.col; - int br = bestmv->as_mv.row << 3; - int bc = bestmv->as_mv.col << 3; + int br = bestmv->as_mv.row * 8; + int bc = bestmv->as_mv.col * 8; int hstep = 4; - const int minc = MAX(x->mv_col_min << 3, ref_mv->as_mv.col - MV_MAX); - const int maxc = MIN(x->mv_col_max << 3, ref_mv->as_mv.col + MV_MAX); - const int minr = MAX(x->mv_row_min << 3, ref_mv->as_mv.row - MV_MAX); - const int maxr = MIN(x->mv_row_max << 3, ref_mv->as_mv.row + MV_MAX); + const int minc = MAX(x->mv_col_min * 8, ref_mv->as_mv.col - MV_MAX); + const int maxc = MIN(x->mv_col_max * 8, ref_mv->as_mv.col + MV_MAX); + const int minr = MAX(x->mv_row_min * 8, ref_mv->as_mv.row - MV_MAX); + const int maxr = MIN(x->mv_row_max * 8, ref_mv->as_mv.row + MV_MAX); int tr = br; int tc = bc; // central mv - bestmv->as_mv.row <<= 3; - bestmv->as_mv.col <<= 3; + bestmv->as_mv.row *= 8; + bestmv->as_mv.col *= 8; // calculate central point error // TODO(yunqingwang): central pointer error was already calculated in full- @@ -634,20 +634,20 @@ int vp9_find_best_sub_pixel_comp_tree(MACROBLOCK *x, int rr = ref_mv->as_mv.row; int rc = ref_mv->as_mv.col; - int br = bestmv->as_mv.row << 3; - int bc = bestmv->as_mv.col << 3; + int br = bestmv->as_mv.row * 8; + int bc = bestmv->as_mv.col * 8; int hstep = 4; - const int minc = MAX(x->mv_col_min << 3, ref_mv->as_mv.col - MV_MAX); - const int maxc = MIN(x->mv_col_max << 3, ref_mv->as_mv.col + MV_MAX); - const int minr = MAX(x->mv_row_min << 3, ref_mv->as_mv.row - MV_MAX); - const int maxr = MIN(x->mv_row_max << 3, ref_mv->as_mv.row + MV_MAX); + const int minc = MAX(x->mv_col_min * 8, ref_mv->as_mv.col - MV_MAX); + const int maxc = MIN(x->mv_col_max * 8, ref_mv->as_mv.col + MV_MAX); + const int minr = MAX(x->mv_row_min * 8, ref_mv->as_mv.row - MV_MAX); + const int maxr = MIN(x->mv_row_max * 8, ref_mv->as_mv.row + MV_MAX); int tr = br; int tc = bc; // central mv - bestmv->as_mv.row <<= 3; - bestmv->as_mv.col <<= 3; + bestmv->as_mv.row *= 8; + bestmv->as_mv.col *= 8; // calculate central point error // TODO(yunqingwang): central pointer error was already calculated in full- @@ -980,8 +980,8 @@ static int vp9_pattern_search(MACROBLOCK *x, this_offset = base_offset + (best_mv->as_mv.row * (in_what_stride)) + best_mv->as_mv.col; - this_mv.as_mv.row = best_mv->as_mv.row << 3; - this_mv.as_mv.col = best_mv->as_mv.col << 3; + this_mv.as_mv.row = best_mv->as_mv.row * 8; + this_mv.as_mv.col = best_mv->as_mv.col * 8; if (bestsad == INT_MAX) return INT_MAX; return @@ -1243,8 +1243,8 @@ int vp9_diamond_search_sad_c(MACROBLOCK *x, (*num00)++; } - this_mv.as_mv.row = best_mv->as_mv.row << 3; - this_mv.as_mv.col = best_mv->as_mv.col << 3; + this_mv.as_mv.row = best_mv->as_mv.row * 8; + this_mv.as_mv.col = best_mv->as_mv.col * 8; if (bestsad == INT_MAX) return INT_MAX; @@ -1416,8 +1416,8 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, (*num00)++; } - this_mv.as_mv.row = best_mv->as_mv.row << 3; - this_mv.as_mv.col = best_mv->as_mv.col << 3; + this_mv.as_mv.row = best_mv->as_mv.row * 8; + this_mv.as_mv.col = best_mv->as_mv.col * 8; if (bestsad == INT_MAX) return INT_MAX; @@ -1567,8 +1567,8 @@ int vp9_full_search_sad_c(MACROBLOCK *x, int_mv *ref_mv, } } - this_mv.as_mv.row = best_mv->as_mv.row << 3; - this_mv.as_mv.col = best_mv->as_mv.col << 3; + this_mv.as_mv.row = best_mv->as_mv.row * 8; + this_mv.as_mv.col = best_mv->as_mv.col * 8; if (bestsad < INT_MAX) return @@ -1688,8 +1688,8 @@ int vp9_full_search_sadx3(MACROBLOCK *x, int_mv *ref_mv, } - this_mv.as_mv.row = best_mv->as_mv.row << 3; - this_mv.as_mv.col = best_mv->as_mv.col << 3; + this_mv.as_mv.row = best_mv->as_mv.row * 8; + this_mv.as_mv.col = best_mv->as_mv.col * 8; if (bestsad < INT_MAX) return @@ -1836,8 +1836,8 @@ int vp9_full_search_sadx8(MACROBLOCK *x, int_mv *ref_mv, } } - this_mv.as_mv.row = best_mv->as_mv.row << 3; - this_mv.as_mv.col = best_mv->as_mv.col << 3; + this_mv.as_mv.row = best_mv->as_mv.row * 8; + this_mv.as_mv.col = best_mv->as_mv.col * 8; if (bestsad < INT_MAX) return @@ -1912,8 +1912,8 @@ int vp9_refining_search_sad_c(MACROBLOCK *x, } } - this_mv.as_mv.row = ref_mv->as_mv.row << 3; - this_mv.as_mv.col = ref_mv->as_mv.col << 3; + this_mv.as_mv.row = ref_mv->as_mv.row * 8; + this_mv.as_mv.col = ref_mv->as_mv.col * 8; if (bestsad < INT_MAX) return @@ -2018,8 +2018,8 @@ int vp9_refining_search_sadx4(MACROBLOCK *x, } } - this_mv.as_mv.row = ref_mv->as_mv.row << 3; - this_mv.as_mv.col = ref_mv->as_mv.col << 3; + this_mv.as_mv.row = ref_mv->as_mv.row * 8; + this_mv.as_mv.col = ref_mv->as_mv.col * 8; if (bestsad < INT_MAX) return @@ -2109,8 +2109,8 @@ int vp9_refining_search_8p_c(MACROBLOCK *x, } } - this_mv.as_mv.row = ref_mv->as_mv.row << 3; - this_mv.as_mv.col = ref_mv->as_mv.col << 3; + this_mv.as_mv.row = ref_mv->as_mv.row * 8; + this_mv.as_mv.col = ref_mv->as_mv.col * 8; if (bestsad < INT_MAX) { // FIXME(rbultje, yunqing): add full-pixel averaging variance functions |