]> granicus.if.org Git - libvpx/commitdiff
Use small transform size in non-rd real-time mode
authorYunqing Wang <yunqingwang@google.com>
Thu, 29 May 2014 23:53:23 +0000 (16:53 -0700)
committerYunqing Wang <yunqingwang@google.com>
Mon, 9 Jun 2014 15:26:50 +0000 (08:26 -0700)
In non-rd real-time mode, choosing smaller transform size in
encoding gives better video quality and good speed gain than
choosing larger transform size. This patch set tx size search
method to ALLOW_8X8, which is better than using 4x4 or other
larger sizes.

Borg tests on rtc set at speed 6 showed significant gain on quality.
PSNR gain: 11.034% and SSIM gain: 15.466%.

The speed gain is 5% - 12% for <720p clips, and 2% - 7% for
720p clips.

Change-Id: If4dc74ed2df359346b059f47fb73b4a0193ec548

vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_speed_features.c
vp9/encoder/vp9_speed_features.h

index 914bb370aee9ee6edc3fe67d1954cd066257e6d1..98f7ee4ce87353c77c29ad5a56ec77160211014c 100644 (file)
@@ -2418,6 +2418,8 @@ static TX_MODE select_tx_mode(const VP9_COMP *cpi) {
       return rd_opt->tx_select_threshes[frame_type][ALLOW_32X32] >
                  rd_opt->tx_select_threshes[frame_type][TX_MODE_SELECT] ?
                      ALLOW_32X32 : TX_MODE_SELECT;
+    } else if (cpi->sf.tx_size_search_method == USE_TX_8X8) {
+      return ALLOW_8X8;
     } else {
       unsigned int total = 0;
       int i;
index b7f8397479b767d80110afdeb38b516dac725006..729fa481b5bfc9e9f1520d8a18566cc484a6e7e4 100644 (file)
@@ -269,6 +269,8 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
     sf->partition_search_type = SOURCE_VAR_BASED_PARTITION;
     sf->search_type_check_frequency = 50;
     sf->source_var_thresh = 360;
+
+    sf->tx_size_search_method = USE_TX_8X8;
   }
 
   if (speed >= 7) {
index 3e7cd27d8b8681605ee68d250fbbca04e0f56f63..09180950df4aa7d740ff56e34859694fd8265299 100644 (file)
@@ -58,7 +58,8 @@ typedef enum {
   USE_FULL_RD = 0,
   USE_LARGESTINTRA,
   USE_LARGESTINTRA_MODELINTER,
-  USE_LARGESTALL
+  USE_LARGESTALL,
+  USE_TX_8X8
 } TX_SIZE_SEARCH_METHOD;
 
 typedef enum {