av1/encoder/mcomp.c
// Note(yunqingwang): The following 2 functions are only used in the motion
// vector unit test, which return extreme motion vectors allowed by the MV
// limits.
// Returns the maximum MV.
The following 2 functions are only used in the motion
vector unit test, which return extreme motion vectors allowed by the MV
limits.
Returns the maximum MV.
The following 2 functions are only used in the motion vector unit test which return extreme motion vectors allowed by the MV limits . Returns the maximum MV .
int av1_return_max_sub_pixel_mv(MACROBLOCK *x, const AV1_COMMON *const cm,
                                const SUBPEL_MOTION_SEARCH_PARAMS *ms_params,
                                int *distortion, unsigned int *sse1) {
  (void)cm;
  (void)sse1;
  (void)distortion;
  const int allow_hp = ms_params->allow_hp;
  const MV *ref_mv = ms_params->mv_cost_params.ref_mv;
  convert_fullmv_to_mv(&x->best_mv);
  MV *bestmv = &x->best_mv.as_mv;
  SubpelMvLimits mv_limits;
  av1_set_subpel_mv_search_range(&mv_limits, &x->mv_limits, ref_mv);
  bestmv->row = mv_limits.row_max;
  bestmv->col = mv_limits.col_max;
  unsigned int besterr = 0;
  lower_mv_precision(bestmv, allow_hp, 0);
  return besterr;
}
int av1_return_max_sub_pixel_mv ( MACROBLOCK * x , const AV1_COMMON * const cm , const SUBPEL_MOTION_SEARCH_PARAMS * ms_params , int * distortion , unsigned int * sse1 ) { ( void ) cm ; ( void ) sse1 ; ( void ) distortion ; const int allow_hp = ms_params -> allow_hp ; const MV * ref_mv = ms_params -> mv_cost_params . ref_mv ; convert_fullmv_to_mv ( & x -> best_mv ) ; MV * bestmv = & x -> best_mv . as_mv ; SubpelMvLimits mv_limits ; av1_set_subpel_mv_search_range ( & mv_limits , & x -> mv_limits , ref_mv ) ; bestmv -> row = mv_limits . row_max ; bestmv -> col = mv_limits . col_max ; unsigned int besterr = 0 ; lower_mv_precision ( bestmv , allow_hp , 0 ) ; return besterr ; }
Note(yunqingwang): The following 2 functions are only used in the motion
vector unit test, which return extreme motion vectors allowed by the MV
limits.
Note ( yunqingwang ) : The following 2 functions are only used in the motion vector unit test which return extreme motion vectors allowed by the MV limits .
// In the sub-pel motion search, if hp is not used, then the last bit of mv // has to be 0.