};
static void fill_token_costs(
- unsigned int c [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [vp8_coef_tokens],
- const vp8_prob p [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [vp8_coef_tokens-1]
+ unsigned int c [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS],
+ const vp8_prob p [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES]
)
{
int i, j, k;
(cpi->RDMULT * rd_iifactor[cpi->twopass.next_iiratio]) >> 4;
}
- cpi->mb.errorperbit = (cpi->RDMULT / 100);
+ cpi->mb.errorperbit = (cpi->RDMULT / 110);
cpi->mb.errorperbit += (cpi->mb.errorperbit==0);
vp8_set_speed_features(cpi);
if (bsi.segment_rd < best_rd)
{
- int col_min = (best_ref_mv->as_mv.col - MAX_FULL_PEL_VAL) >>3;
- int col_max = (best_ref_mv->as_mv.col + MAX_FULL_PEL_VAL) >>3;
- int row_min = (best_ref_mv->as_mv.row - MAX_FULL_PEL_VAL) >>3;
- int row_max = (best_ref_mv->as_mv.row + MAX_FULL_PEL_VAL) >>3;
+ int col_min = (best_ref_mv->as_mv.col < 0)?(-((abs(best_ref_mv->as_mv.col))>>3) - MAX_FULL_PEL_VAL)
+ :((best_ref_mv->as_mv.col>>3) - MAX_FULL_PEL_VAL);
+ int col_max = (best_ref_mv->as_mv.col < 0)?(-((abs(best_ref_mv->as_mv.col))>>3) + MAX_FULL_PEL_VAL)
+ :((best_ref_mv->as_mv.col>>3) + MAX_FULL_PEL_VAL);
+ int row_min = (best_ref_mv->as_mv.row < 0)?(-((abs(best_ref_mv->as_mv.row))>>3) - MAX_FULL_PEL_VAL)
+ :((best_ref_mv->as_mv.row>>3) - MAX_FULL_PEL_VAL);
+ int row_max = (best_ref_mv->as_mv.row < 0)?(-((abs(best_ref_mv->as_mv.row))>>3) + MAX_FULL_PEL_VAL)
+ :((best_ref_mv->as_mv.row>>3) + MAX_FULL_PEL_VAL);
int tmp_col_min = x->mv_col_min;
int tmp_col_max = x->mv_col_max;
/* adjust mvp to make sure it is within MV range */
vp8_clamp_mv(&mvp,
- best_ref_mv.as_mv.col - MAX_FULL_PEL_VAL,
- best_ref_mv.as_mv.col + MAX_FULL_PEL_VAL,
- best_ref_mv.as_mv.row - MAX_FULL_PEL_VAL,
- best_ref_mv.as_mv.row + MAX_FULL_PEL_VAL);
+ best_ref_mv.as_mv.col - (MAX_FULL_PEL_VAL<<3),
+ best_ref_mv.as_mv.col + (MAX_FULL_PEL_VAL<<3),
+ best_ref_mv.as_mv.row - (MAX_FULL_PEL_VAL<<3),
+ best_ref_mv.as_mv.row + (MAX_FULL_PEL_VAL<<3));
}
// Check to see if the testing frequency for this mode is at its max
int sadpb = x->sadperbit16;
- int col_min = (best_ref_mv.as_mv.col - MAX_FULL_PEL_VAL) >>3;
- int col_max = (best_ref_mv.as_mv.col + MAX_FULL_PEL_VAL) >>3;
- int row_min = (best_ref_mv.as_mv.row - MAX_FULL_PEL_VAL) >>3;
- int row_max = (best_ref_mv.as_mv.row + MAX_FULL_PEL_VAL) >>3;
+ int col_min = (best_ref_mv.as_mv.col < 0)?(-((abs(best_ref_mv.as_mv.col))>>3) - MAX_FULL_PEL_VAL)
+ :((best_ref_mv.as_mv.col>>3) - MAX_FULL_PEL_VAL);
+ int col_max = (best_ref_mv.as_mv.col < 0)?(-((abs(best_ref_mv.as_mv.col))>>3) + MAX_FULL_PEL_VAL)
+ :((best_ref_mv.as_mv.col>>3) + MAX_FULL_PEL_VAL);
+ int row_min = (best_ref_mv.as_mv.row < 0)?(-((abs(best_ref_mv.as_mv.row))>>3) - MAX_FULL_PEL_VAL)
+ :((best_ref_mv.as_mv.row>>3) - MAX_FULL_PEL_VAL);
+ int row_max = (best_ref_mv.as_mv.row < 0)?(-((abs(best_ref_mv.as_mv.row))>>3) + MAX_FULL_PEL_VAL)
+ :((best_ref_mv.as_mv.row>>3) + MAX_FULL_PEL_VAL);
int tmp_col_min = x->mv_col_min;
int tmp_col_max = x->mv_col_max;