]> granicus.if.org Git - libvpx/commitdiff
Update partition rate cost in rtc speed 5
authorJingning Han <jingning@google.com>
Wed, 11 Feb 2015 20:25:51 +0000 (12:25 -0800)
committerJingning Han <jingning@google.com>
Wed, 11 Feb 2015 20:48:29 +0000 (12:48 -0800)
The block partition rate cost should be updated when recursive
partition search is needed.

Change-Id: I7bc5ad1fc2cbd3577dee7f7e8da111a2742bdeb9

vp9/encoder/vp9_rd.c

index 20ca4ca1cc3f0601f6d006dd9351f6913f4eb84b..0b6d11eca76b12a36fbded5749e23453d66b4eca 100644 (file)
@@ -279,9 +279,11 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi) {
 
   set_block_thresholds(cm, rd);
 
-  if (!cpi->sf.use_nonrd_pick_mode || cm->frame_type == KEY_FRAME) {
+  if (!cpi->sf.use_nonrd_pick_mode || cm->frame_type == KEY_FRAME)
     fill_token_costs(x->token_costs, cm->fc->coef_probs);
 
+  if (cpi->sf.partition_search_type != VAR_BASED_PARTITION ||
+      cm->frame_type == KEY_FRAME) {
     for (i = 0; i < PARTITION_CONTEXTS; ++i)
       vp9_cost_tokens(cpi->partition_cost[i], get_partition_probs(cm, i),
                       vp9_partition_tree);