#define MAX_MVSEARCH_STEPS 8 // The maximum number of steps in a step search given the largest allowed initial step
#define MAX_FULL_PEL_VAL ((1 << (MAX_MVSEARCH_STEPS+3)) - 8) // Max full pel mv specified in 1/8 pel units
#define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1)) // Maximum size of the first step in full pel units
-#define MAX_POSSIBLE_MV (1 << 11) // Maximum MV in 1/8 pel units
extern void print_mode_context(void);
extern int vp8_mv_bit_cost(MV *mv, MV *ref, int *mvcost[2], int Weight);
if (bsi.segment_rd < best_rd)
{
- int col_min = (best_ref_mv->col - MAX_POSSIBLE_MV) >>3;
- int col_max = (best_ref_mv->col + MAX_POSSIBLE_MV) >>3;
- int row_min = (best_ref_mv->row - MAX_POSSIBLE_MV) >>3;
- int row_max = (best_ref_mv->row + MAX_POSSIBLE_MV) >>3;
+ int col_min = (best_ref_mv->col - MAX_FULL_PEL_VAL) >>3;
+ int col_max = (best_ref_mv->col + MAX_FULL_PEL_VAL) >>3;
+ int row_min = (best_ref_mv->row - MAX_FULL_PEL_VAL) >>3;
+ int row_max = (best_ref_mv->row + MAX_FULL_PEL_VAL) >>3;
int tmp_col_min = x->mv_col_min;
int tmp_col_max = x->mv_col_max;
x->e_mbd.mode_info_context->mbmi.ref_frame, cpi->common.ref_frame_sign_bias, &sr, &near_sadidx[0]);
/* adjust mvp to make sure it is within MV range */
- if(mvp.row > best_ref_mv.row + MAX_POSSIBLE_MV)
- mvp.row = best_ref_mv.row + MAX_POSSIBLE_MV;
- else if(mvp.row < best_ref_mv.row - MAX_POSSIBLE_MV)
- mvp.row = best_ref_mv.row - MAX_POSSIBLE_MV;
- if(mvp.col > best_ref_mv.col + MAX_POSSIBLE_MV)
- mvp.col = best_ref_mv.col + MAX_POSSIBLE_MV;
- else if(mvp.col < best_ref_mv.col - MAX_POSSIBLE_MV)
- mvp.col = best_ref_mv.col - MAX_POSSIBLE_MV;
+ if(mvp.row > best_ref_mv.row + MAX_FULL_PEL_VAL)
+ mvp.row = best_ref_mv.row + MAX_FULL_PEL_VAL;
+ else if(mvp.row < best_ref_mv.row - MAX_FULL_PEL_VAL)
+ mvp.row = best_ref_mv.row - MAX_FULL_PEL_VAL;
+ if(mvp.col > best_ref_mv.col + MAX_FULL_PEL_VAL)
+ mvp.col = best_ref_mv.col + MAX_FULL_PEL_VAL;
+ else if(mvp.col < best_ref_mv.col - MAX_FULL_PEL_VAL)
+ mvp.col = best_ref_mv.col - MAX_FULL_PEL_VAL;
}
// Check to see if the testing frequency for this mode is at its max
int further_steps;
int n;
- int col_min = (best_ref_mv.col - MAX_POSSIBLE_MV) >>3;
- int col_max = (best_ref_mv.col + MAX_POSSIBLE_MV) >>3;
- int row_min = (best_ref_mv.row - MAX_POSSIBLE_MV) >>3;
- int row_max = (best_ref_mv.row + MAX_POSSIBLE_MV) >>3;
+ int col_min = (best_ref_mv.col - MAX_FULL_PEL_VAL) >>3;
+ int col_max = (best_ref_mv.col + MAX_FULL_PEL_VAL) >>3;
+ int row_min = (best_ref_mv.row - MAX_FULL_PEL_VAL) >>3;
+ int row_max = (best_ref_mv.row + MAX_FULL_PEL_VAL) >>3;
int tmp_col_min = x->mv_col_min;
int tmp_col_max = x->mv_col_max;