]> granicus.if.org Git - libvpx/commitdiff
Periodically update mode and mv costs
authorJingning Han <jingning@google.com>
Sat, 22 Feb 2014 02:25:43 +0000 (18:25 -0800)
committerJingning Han <jingning@google.com>
Sat, 22 Feb 2014 02:25:43 +0000 (18:25 -0800)
Skip coefficient cost update in non-RD mode decision setting. Allow
periodical mode and motion vector cost update. Currently every other
8 frames. The increment runtime is a constant number. Hence more
visible for CIF resolution, while negligible for 1080p.

Speed -6 compression performance for rtc set is improved by 4.5%.

Change-Id: I27e0ad7c521fcc2af1d825582cbdd1a27ac4c323

vp9/encoder/vp9_rdopt.c

index 70f9fab25758310455c534e31b61e6973f4aafc5..44dedb487a7b788dd577c3fd554a08ff829c790b 100644 (file)
@@ -295,13 +295,15 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi) {
 
   set_block_thresholds(cpi);
 
-  fill_token_costs(x->token_costs, cm->fc.coef_probs);
-
   if (!cpi->sf.use_pick_mode) {
+    fill_token_costs(x->token_costs, cm->fc.coef_probs);
+
     for (i = 0; i < PARTITION_CONTEXTS; i++)
       vp9_cost_tokens(x->partition_cost[i], get_partition_probs(cm, i),
                       vp9_partition_tree);
+  }
 
+  if (!cpi->sf.use_pick_mode || (cm->current_video_frame & 0x07) == 1) {
     fill_mode_costs(cpi);
 
     if (!frame_is_intra_only(cm)) {