Fix valgrind error which causes non-deterministic results.
Error was introduced in bf474e170fefbed60cf20fa3d2e9e229776469f0 Change-Id: I55bf114a1938c3a8869d8ff49cbe076eb9e83ea0
This commit is contained in:
parent
0393e558a4
commit
e5cc24cc2e
@ -619,7 +619,8 @@ static void clamp_uvmv_to_umv_border(MV *mv, const MACROBLOCKD *xd) {
|
||||
/*encoder only*/
|
||||
void vp8_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
|
||||
unsigned char *dst_y,
|
||||
int dst_ystride) {
|
||||
int dst_ystride,
|
||||
int clamp_mvs) {
|
||||
unsigned char *ptr_base = xd->pre.y_buffer;
|
||||
unsigned char *ptr;
|
||||
int pre_stride = xd->block[0].pre_stride;
|
||||
@ -627,7 +628,7 @@ void vp8_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
|
||||
|
||||
ymv.as_int = xd->mode_info_context->mbmi.mv[0].as_int;
|
||||
|
||||
if (xd->mode_info_context->mbmi.need_to_clamp_mvs)
|
||||
if (clamp_mvs)
|
||||
clamp_mv_to_umv_border(&ymv.as_mv, xd);
|
||||
|
||||
ptr = ptr_base + (ymv.as_mv.row >> 3) * pre_stride + (ymv.as_mv.col >> 3);
|
||||
@ -755,7 +756,8 @@ void vp8_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd,
|
||||
unsigned char *dst_u,
|
||||
unsigned char *dst_v,
|
||||
int dst_ystride, int dst_uvstride) {
|
||||
vp8_build_1st_inter16x16_predictors_mby(xd, dst_y, dst_ystride);
|
||||
vp8_build_1st_inter16x16_predictors_mby(xd, dst_y, dst_ystride,
|
||||
xd->mode_info_context->mbmi.need_to_clamp_mvs);
|
||||
vp8_build_1st_inter16x16_predictors_mbuv(xd, dst_u, dst_v, dst_uvstride);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
extern void vp8_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
|
||||
unsigned char *dst_y,
|
||||
int dst_ystride);
|
||||
int dst_ystride,
|
||||
int clamp_mvs);
|
||||
extern void vp8_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
|
||||
unsigned char *dst_u,
|
||||
unsigned char *dst_v,
|
||||
|
@ -1194,7 +1194,8 @@ void vp8_encode_inter16x16y(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) {
|
||||
x->e_mbd.mode_info_context->mbmi.pred_filter_enabled = 0;
|
||||
#endif
|
||||
|
||||
vp8_build_1st_inter16x16_predictors_mby(&x->e_mbd, x->e_mbd.predictor, 16);
|
||||
vp8_build_1st_inter16x16_predictors_mby(&x->e_mbd, x->e_mbd.predictor,
|
||||
16, 0);
|
||||
|
||||
ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, *(b->base_src), x->e_mbd.predictor, b->src_stride);
|
||||
|
||||
|
@ -88,7 +88,7 @@ static unsigned int do_16x16_motion_iteration
|
||||
#endif
|
||||
|
||||
vp8_set_mbmode_and_mvs(x, NEWMV, dst_mv);
|
||||
vp8_build_1st_inter16x16_predictors_mby(xd, xd->predictor, 16);
|
||||
vp8_build_1st_inter16x16_predictors_mby(xd, xd->predictor, 16, 0);
|
||||
// VARIANCE_INVOKE(&cpi->rtcd.variance, satd16x16)
|
||||
best_err = VARIANCE_INVOKE(&cpi->rtcd.variance, sad16x16)
|
||||
(xd->dst.y_buffer, xd->dst.y_stride,
|
||||
|
@ -3213,7 +3213,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
|
||||
rate2 += vp8_cost_mv_ref(cpi, this_mode, mdcounts);
|
||||
|
||||
vp8_build_1st_inter16x16_predictors_mby(&x->e_mbd, x->e_mbd.predictor,
|
||||
16);
|
||||
16, 0);
|
||||
if (is_comp_pred)
|
||||
vp8_build_2nd_inter16x16_predictors_mby(&x->e_mbd, x->e_mbd.predictor,
|
||||
16);
|
||||
|
Loading…
x
Reference in New Issue
Block a user