Lines Matching refs:mv_limits

43 void av1_set_mv_search_range(MvLimits *mv_limits, const MV *mv) {  in av1_set_mv_search_range()  argument
56 if (mv_limits->col_min < col_min) mv_limits->col_min = col_min; in av1_set_mv_search_range()
57 if (mv_limits->col_max > col_max) mv_limits->col_max = col_max; in av1_set_mv_search_range()
58 if (mv_limits->row_min < row_min) mv_limits->row_min = row_min; in av1_set_mv_search_range()
59 if (mv_limits->row_max > row_max) mv_limits->row_max = row_max; in av1_set_mv_search_range()
62 static void set_subpel_mv_search_range(const MvLimits *mv_limits, int *col_min, in set_subpel_mv_search_range() argument
66 const int minc = AOMMAX(mv_limits->col_min * 8, ref_mv->col - max_mv); in set_subpel_mv_search_range()
67 const int maxc = AOMMIN(mv_limits->col_max * 8, ref_mv->col + max_mv); in set_subpel_mv_search_range()
68 const int minr = AOMMAX(mv_limits->row_min * 8, ref_mv->row - max_mv); in set_subpel_mv_search_range()
69 const int maxr = AOMMIN(mv_limits->row_max * 8, ref_mv->row + max_mv); in set_subpel_mv_search_range()
326 set_subpel_mv_search_range(&x->mv_limits, &minc, &maxc, &minr, &maxr, \
755 set_subpel_mv_search_range(&x->mv_limits, &minc, &maxc, &minr, &maxr, ref_mv); in av1_find_best_sub_pixel_tree()
934 set_subpel_mv_search_range(&x->mv_limits, &minc, &maxc, &minr, &maxr, in av1_refine_warped_mv()
993 static INLINE int check_bounds(const MvLimits *mv_limits, int row, int col, in check_bounds() argument
995 return ((row - range) >= mv_limits->row_min) & in check_bounds()
996 ((row + range) <= mv_limits->row_max) & in check_bounds()
997 ((col - range) >= mv_limits->col_min) & in check_bounds()
998 ((col + range) <= mv_limits->col_max); in check_bounds()
1001 static INLINE int is_mv_in(const MvLimits *mv_limits, const MV *mv) { in is_mv_in() argument
1002 return (mv->col >= mv_limits->col_min) && (mv->col <= mv_limits->col_max) && in is_mv_in()
1003 (mv->row >= mv_limits->row_min) && (mv->row <= mv_limits->row_max); in is_mv_in()
1041 if (check_bounds(&x->mv_limits, br, bc, 1)) { in calc_int_cost_list()
1053 if (!is_mv_in(&x->mv_limits, &neighbor_mv)) in calc_int_cost_list()
1081 if (check_bounds(&x->mv_limits, br, bc, 1)) { in calc_int_sad_list()
1091 if (!is_mv_in(&x->mv_limits, &this_mv)) in calc_int_sad_list()
1138 clamp_mv(start_mv, x->mv_limits.col_min, x->mv_limits.col_max, in pattern_search()
1139 x->mv_limits.row_min, x->mv_limits.row_max); in pattern_search()
1160 if (check_bounds(&x->mv_limits, br, bc, 1 << t)) { in pattern_search()
1173 if (!is_mv_in(&x->mv_limits, &this_mv)) continue; in pattern_search()
1203 if (check_bounds(&x->mv_limits, br, bc, 1 << s)) { in pattern_search()
1216 if (!is_mv_in(&x->mv_limits, &this_mv)) continue; in pattern_search()
1240 if (check_bounds(&x->mv_limits, br, bc, 1 << s)) { in pattern_search()
1257 if (!is_mv_in(&x->mv_limits, &this_mv)) continue; in pattern_search()
1277 if (check_bounds(&x->mv_limits, br, bc, 1 << s)) { in pattern_search()
1290 if (!is_mv_in(&x->mv_limits, &this_mv)) continue; in pattern_search()
1314 if (check_bounds(&x->mv_limits, br, bc, 1 << s)) { in pattern_search()
1331 if (!is_mv_in(&x->mv_limits, &this_mv)) { in pattern_search()
1579 clamp_mv(&fcenter_mv, x->mv_limits.col_min, x->mv_limits.col_max, in exhuastive_mesh_search()
1580 x->mv_limits.row_min, x->mv_limits.row_max); in exhuastive_mesh_search()
1586 start_row = AOMMAX(-range, x->mv_limits.row_min - fcenter_mv.row); in exhuastive_mesh_search()
1587 start_col = AOMMAX(-range, x->mv_limits.col_min - fcenter_mv.col); in exhuastive_mesh_search()
1588 end_row = AOMMIN(range, x->mv_limits.row_max - fcenter_mv.row); in exhuastive_mesh_search()
1589 end_col = AOMMIN(range, x->mv_limits.col_max - fcenter_mv.col); in exhuastive_mesh_search()
1683 clamp_mv(ref_mv, x->mv_limits.col_min, x->mv_limits.col_max, in av1_diamond_search_sad_c()
1684 x->mv_limits.row_min, x->mv_limits.row_max); in av1_diamond_search_sad_c()
1706 all_in &= ((best_mv->row + ss[i].mv.row) > x->mv_limits.row_min); in av1_diamond_search_sad_c()
1707 all_in &= ((best_mv->row + ss[i + 1].mv.row) < x->mv_limits.row_max); in av1_diamond_search_sad_c()
1708 all_in &= ((best_mv->col + ss[i + 2].mv.col) > x->mv_limits.col_min); in av1_diamond_search_sad_c()
1709 all_in &= ((best_mv->col + ss[i + 3].mv.col) < x->mv_limits.col_max); in av1_diamond_search_sad_c()
1745 if (is_mv_in(&x->mv_limits, &this_mv)) { in av1_diamond_search_sad_c()
1771 if (is_mv_in(&x->mv_limits, &this_mv)) { in av1_diamond_search_sad_c()
1939 const int all_in = ((ref_mv->row - 1) > x->mv_limits.row_min) & in av1_refining_search_sad()
1940 ((ref_mv->row + 1) < x->mv_limits.row_max) & in av1_refining_search_sad()
1941 ((ref_mv->col - 1) > x->mv_limits.col_min) & in av1_refining_search_sad()
1942 ((ref_mv->col + 1) < x->mv_limits.col_max); in av1_refining_search_sad()
1968 if (is_mv_in(&x->mv_limits, &mv)) { in av1_refining_search_sad()
2025 clamp_mv(best_mv, x->mv_limits.col_min, x->mv_limits.col_max, in av1_refining_search_8p_c()
2026 x->mv_limits.row_min, x->mv_limits.row_max); in av1_refining_search_8p_c()
2053 if (is_mv_in(&x->mv_limits, &mv)) { in av1_refining_search_8p_c()
2297 &x->mv_limits, &subpel_mv_limits.col_min, &subpel_mv_limits.col_max, in av1_int_pro_motion_estimation()
2457 if (!is_mv_in(&x->mv_limits, &hash_mv)) continue; in av1_full_pixel_search()
2618 set_subpel_mv_search_range(&x->mv_limits, &minc, &maxc, &minr, &maxr, ref_mv); in av1_find_best_obmc_sub_pixel_tree_up()
2778 if (is_mv_in(&x->mv_limits, &mv)) { in obmc_refining_search_sad()
2823 clamp_mv(ref_mv, x->mv_limits.col_min, x->mv_limits.col_max, in obmc_diamond_search_sad()
2824 x->mv_limits.row_min, x->mv_limits.row_max); in obmc_diamond_search_sad()
2840 if (is_mv_in(&x->mv_limits, &mv)) { in obmc_diamond_search_sad()
2864 if (is_mv_in(&x->mv_limits, &this_mv)) { in obmc_diamond_search_sad()
2966 clamp_mv(dst_mv, x->mv_limits.col_min, x->mv_limits.col_max, in av1_obmc_full_pixel_search()
2967 x->mv_limits.row_min, x->mv_limits.row_max); in av1_obmc_full_pixel_search()
3097 const MvLimits tmp_mv_limits = x->mv_limits; in av1_simple_motion_search()
3115 av1_set_mv_search_range(&x->mv_limits, &ref_mv); in av1_simple_motion_search()
3121 x->mv_limits = tmp_mv_limits; in av1_simple_motion_search()