v.col = mv->as_mv.col - ref->as_mv.col;
return ((mvjcost[vp9_get_mv_joint(v)] +
mvcost[0][v.row] + mvcost[1][v.col]) *
- error_per_bit + 128) >> 8;
+ error_per_bit + 4096) >> 13;
}
return 0;
}
(mvcost ? \
((mvjcost[((r) != rr) * 2 + ((c) != rc)] + \
mvcost[0][((r) - rr)] + mvcost[1][((c) - rc)]) * \
- error_per_bit + 128) >> 8 : 0)
+ error_per_bit + 4096) >> 13 : 0)
+
#define SP(x) (((x) & 7) << 1) // convert motion vector component to offset
// for svf calc
static int compute_rd_mult(int qindex) {
int q = vp9_dc_quant(qindex, 0);
- return (11 * q * q) >> 6;
+ return (11 * q * q) >> 2;
}
void vp9_initialize_me_consts(VP9_COMP *cpi, int qindex) {
qindex = (qindex < 0) ? 0 : ((qindex > MAXQ) ? MAXQ : qindex);
cpi->RDMULT = compute_rd_mult(qindex);
-
if (cpi->pass == 2 && (cpi->common.frame_type != KEY_FRAME)) {
if (cpi->twopass.next_iiratio > 31)
cpi->RDMULT += (cpi->RDMULT * rd_iifactor[31]) >> 4;
cpi->RDMULT +=
(cpi->RDMULT * rd_iifactor[cpi->twopass.next_iiratio]) >> 4;
}
-
- cpi->mb.errorperbit = (cpi->RDMULT / 110);
+ cpi->mb.errorperbit = cpi->RDMULT >> 6;
cpi->mb.errorperbit += (cpi->mb.errorperbit == 0);
vp9_set_speed_features(cpi);
q = (int)pow(vp9_dc_quant(qindex, 0) >> 2, 1.25);
q <<= 2;
- cpi->RDMULT = cpi->RDMULT << 4;
-
if (q < 8)
q = 8;