]> granicus.if.org Git - libvpx/commitdiff
Compute cost of UV mode accurately for intra blocks.
authorGeza Lore <gezalore@gmail.com>
Thu, 12 May 2016 13:55:56 +0000 (14:55 +0100)
committerDebargha Mukherjee <debargha@google.com>
Fri, 3 Jun 2016 18:13:51 +0000 (11:13 -0700)
We used to cache the cost of the UV mode from the search with a
different previously tried Y mode, but the UV mode is contexted
on the Y mode, so caching the cost is inaccurate.

Change-Id: Ib003510afb6fc9befb7808b67b0be64f1c0a0804

vp10/encoder/rdopt.c

index 1ddbcd4598d51e9612859e3296a3417b08b03a58..bc767aea4d6b3979a89f23c4a83454f9cedb192c 100644 (file)
@@ -9024,7 +9024,8 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
       }
 #endif  // CONFIG_EXT_INTRA
 
-      rate2 = rate_y + intra_mode_cost[mbmi->mode] + rate_uv_intra[uv_tx];
+      rate2 = rate_y + intra_mode_cost[mbmi->mode] +
+              rate_uv + cpi->intra_uv_mode_cost[mbmi->mode][mbmi->uv_mode];
       if (cpi->common.allow_screen_content_tools && mbmi->mode == DC_PRED)
         rate2 +=
             vp10_cost_bit(vp10_default_palette_y_mode_prob[bsize - BLOCK_8X8]