shithub: libvpx

Download patch

ref: f67919ae8681c1b7ee0cd6755bf43aa325196eb4
parent: bba68342ce173d6db654da900f21c6e708dbc4c6
author: Jingning Han <[email protected]>
date: Thu Aug 15 13:03:14 EDT 2013

Fix the returned distortion value in rd_pick_intra

Return the distortion value in vp9_rd_pick_intra_mode_sb as sum of
dist_y and dist_uv. Remove the right shift operation on dist_uv,
and make it consistent with that of vp9_rd_pick_inter_mode_sb.

Change-Id: I9d564e242d9add38e32595d33b0e0dddb1d55e5b

--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3021,13 +3021,13 @@
   if (y_skip && uv_skip) {
     *returnrate = rate_y + rate_uv - rate_y_tokenonly - rate_uv_tokenonly +
                   vp9_cost_bit(vp9_get_pred_prob_mbskip(cm, xd), 1);
-    *returndist = dist_y + (dist_uv >> 2);
+    *returndist = dist_y + dist_uv;
     vp9_zero(ctx->tx_rd_diff);
   } else {
     int i;
     *returnrate = rate_y + rate_uv +
         vp9_cost_bit(vp9_get_pred_prob_mbskip(cm, xd), 0);
-    *returndist = dist_y + (dist_uv >> 2);
+    *returndist = dist_y + dist_uv;
     if (cpi->sf.tx_size_search_method == USE_FULL_RD)
       for (i = 0; i < TX_MODES; i++)
         ctx->tx_rd_diff[i] = tx_cache[i] - tx_cache[cm->tx_mode];