From d133524e7c5c96c531703e446fdc73b3c8bd90b2 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Mon, 28 Mar 2016 12:52:05 -0700 Subject: [PATCH] Fix a rdcost computation issue in sub8x8 block mode search Compute the rate-distortion cost for sub8x8 blocks with integer motion vectors. Change-Id: I7dc034fcc4bec3850f26d1f9ae0595c91df1137e --- vp10/encoder/rdopt.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c index 4616371f6..aabefe3b3 100644 --- a/vp10/encoder/rdopt.c +++ b/vp10/encoder/rdopt.c @@ -5290,13 +5290,6 @@ static int64_t rd_pick_best_sub8x8_mode(VP10_COMP *cpi, MACROBLOCK *x, if (!subpelmv && have_ref && ref_bsi->rdstat[i][mode_idx].brdcost < INT64_MAX) { #if CONFIG_REF_MV - bsi->rdstat[i][mode_idx].pred_mv[0].as_int = - bsi->ref_mv[0]->as_int; - - if (has_second_rf) - bsi->rdstat[i][mode_idx].pred_mv[1].as_int = - bsi->ref_mv[1]->as_int; - bsi->rdstat[i][mode_idx].byrate = ref_bsi->rdstat[i][mode_idx].byrate; bsi->rdstat[i][mode_idx].bdist = @@ -5307,6 +5300,11 @@ static int64_t rd_pick_best_sub8x8_mode(VP10_COMP *cpi, MACROBLOCK *x, ref_bsi->rdstat[i][mode_idx].byrate; bsi->rdstat[i][mode_idx].eobs = ref_bsi->rdstat[i][mode_idx].eobs; + + bsi->rdstat[i][mode_idx].brdcost = + RDCOST(x->rdmult, x->rddiv, bsi->rdstat[i][mode_idx].brate, + bsi->rdstat[i][mode_idx].bdist); + memcpy(bsi->rdstat[i][mode_idx].ta, ref_bsi->rdstat[i][mode_idx].ta, sizeof(bsi->rdstat[i][mode_idx].ta)); -- 2.40.0