From ccef8842d2f4df4f52efe66b6b94de707244804f Mon Sep 17 00:00:00 2001
From: Jingning Han <jingning@google.com>
Date: Wed, 13 Aug 2014 10:38:21 -0700
Subject: [PATCH] Allow full coeff probability model and cost update

This commit moves the simplified coefficient probability model
and costing update to speed 4, and turns on chessboard pattern
mode search for sub 720p sequences. The overall coding performance
of speed 3 is improved:
derf  0.889%
stdhd 1.744%

The speed 3 runtime for test sequences are improved:
bus cif at 1000 kbps 9823 ms -> 9642 ms
pedestrian 1080p 2000 kbps 189559 ms -> 183284 ms

Change-Id: Iecbc7496a68f31fd49fb09f8dfd97c028d675a5d
---
 vp9/encoder/vp9_speed_features.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c
index 6e222920d7..4fe3aac1f1 100644
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -110,14 +110,13 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
   if (speed >= 3) {
     sf->tx_size_search_method = frame_is_intra_only(cm) ? USE_FULL_RD
                                                         : USE_LARGESTALL;
-    if (MIN(cm->width, cm->height) >= 720) {
+    if (MIN(cm->width, cm->height) >= 720)
       sf->disable_split_mask = DISABLE_ALL_SPLIT;
-      sf->cb_partition_search = frame_is_boosted(cpi) ? 0 : 1;
-    } else {
+    else
       sf->disable_split_mask = DISABLE_ALL_INTER_SPLIT;
-    }
 
     sf->adaptive_pred_interp_filter = 0;
+    sf->cb_partition_search = frame_is_boosted(cpi) ? 0 : 1;
     sf->cb_pred_filter_search = 1;
     sf->motion_field_mode_search = frame_is_boosted(cpi) ? 0 : 1;
 
@@ -126,8 +125,6 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
     sf->recode_loop = ALLOW_RECODE_KFMAXBW;
     sf->adaptive_rd_thresh = 3;
     sf->mode_skip_start = 6;
-    sf->use_fast_coef_updates = ONE_LOOP_REDUCED;
-    sf->use_fast_coef_costing = 1;
   }
 
   if (speed >= 4) {
@@ -140,6 +137,8 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
     sf->disable_filter_search_var_thresh = 200;
     sf->use_lastframe_partitioning = LAST_FRAME_PARTITION_ALL;
     sf->use_lp32x32fdct = 1;
+    sf->use_fast_coef_updates = ONE_LOOP_REDUCED;
+    sf->use_fast_coef_costing = 1;
   }
 
   if (speed >= 5) {
-- 
GitLab