diff options
author | Harinarayanan K K <harinarayanan.kk@ittiam.com> | 2015-06-30 17:12:51 +0530 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2015-07-31 18:50:48 +0000 |
commit | 8ce82804ab3b5d1d0202b5e6906d85ef70e08899 (patch) | |
tree | 519db8db4f2aab2b6bb1acb61f899032e84ff4b5 | |
parent | 0574be65f4b2376e32bdf979650d8e5f168b68b7 (diff) | |
download | android_external_libavc-8ce82804ab3b5d1d0202b5e6906d85ef70e08899.tar.gz android_external_libavc-8ce82804ab3b5d1d0202b5e6906d85ef70e08899.tar.bz2 android_external_libavc-8ce82804ab3b5d1d0202b5e6906d85ef70e08899.zip |
Fixed issue in cost computation for BIPRED ME
BIPRED ME was discarding the halfpel motion vector components
in cost computation. That is fixed now.
Bug: 22860270
Change-Id: If6c77096d701a258920b14134ff120fd1540f254
-rw-r--r-- | encoder/ih264e_me.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/encoder/ih264e_me.c b/encoder/ih264e_me.c index 3d12a1b..36182e4 100644 --- a/encoder/ih264e_me.c +++ b/encoder/ih264e_me.c @@ -1736,10 +1736,10 @@ void ih264e_evaluate_bipred(me_ctxt_t *ps_me_ctxt, INT_MAX, &i4_mb_distortion); /* compute cost */ - i4_mb_cost = ps_me_ctxt->pu1_mv_bits[( s_l0_mv.i2_mvy << 2 ) - ps_l0_pred_mv->i2_mvx]; - i4_mb_cost += ps_me_ctxt->pu1_mv_bits[( s_l0_mv.i2_mvy << 2 ) - ps_l0_pred_mv->i2_mvy]; - i4_mb_cost += ps_me_ctxt->pu1_mv_bits[( s_l1_mv.i2_mvx << 2 ) - ps_l1_pred_mv->i2_mvx]; - i4_mb_cost += ps_me_ctxt->pu1_mv_bits[( s_l1_mv.i2_mvy << 2 ) - ps_l1_pred_mv->i2_mvy]; + i4_mb_cost = ps_me_ctxt->pu1_mv_bits[ps_me_ctxt->as_mv_init_search[PRED_BI][i].i2_mvx - ps_l0_pred_mv->i2_mvx]; + i4_mb_cost += ps_me_ctxt->pu1_mv_bits[ps_me_ctxt->as_mv_init_search[PRED_BI][i].i2_mvy - ps_l0_pred_mv->i2_mvy]; + i4_mb_cost += ps_me_ctxt->pu1_mv_bits[ps_me_ctxt->as_mv_init_search[PRED_BI][i + 1].i2_mvx - ps_l1_pred_mv->i2_mvx]; + i4_mb_cost += ps_me_ctxt->pu1_mv_bits[ps_me_ctxt->as_mv_init_search[PRED_BI][i + 1].i2_mvy - ps_l1_pred_mv->i2_mvy]; i4_mb_cost -= (ps_me_ctxt->i4_skip_bias[BSLICE]) * (ps_me_ctxt->i4_skip_type == PRED_BI) * (i == 0); |