]> granicus.if.org Git - libvpx/commitdiff
Convert simple_model_rd_from_var from a speed check to a speed feature.
authorAlex Converse <aconverse@google.com>
Thu, 30 Jul 2015 20:52:02 +0000 (13:52 -0700)
committerAlex Converse <aconverse@google.com>
Thu, 30 Jul 2015 20:53:26 +0000 (13:53 -0700)
Change-Id: I8877025e172fff29bc4e270790211463b676b4d7

vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_speed_features.c
vp9/encoder/vp9_speed_features.h

index 2a16ce78fdf864fb83465630dd6207086ccbd77f..04543bfef5caa228594cc36f9e4e49c79f32a410 100644 (file)
@@ -237,7 +237,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
     total_sse += sum_sse;
 
     // Fast approximate the modelling function.
-    if (cpi->oxcf.speed > 4) {
+    if (cpi->sf.simple_model_rd_from_var) {
       int64_t rate;
       const int64_t square_error = sum_sse;
       int quantizer = (pd->dequant[1] >> 3);
index bf06fd0ea8d89c17c1aa78bb1bfc45c1de4b5c96..440f81ebf77a119a36c5bee3d3a6d0bfaa0bff1d 100644 (file)
@@ -193,6 +193,7 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
     sf->use_fast_coef_costing = 1;
     sf->motion_field_mode_search = !boosted;
     sf->partition_search_breakout_rate_thr = 300;
+    sf->simple_model_rd_from_var = 1;
   }
 
   if (speed >= 5) {
@@ -335,6 +336,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
     sf->inter_mode_mask[BLOCK_64X64] = INTER_NEAREST;
     sf->max_intra_bsize = BLOCK_32X32;
     sf->allow_skip_recode = 1;
+    sf->simple_model_rd_from_var = 1;
   }
 
   if (speed >= 5) {
@@ -507,6 +509,7 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) {
   sf->tx_size_search_breakout = 0;
   sf->partition_search_breakout_dist_thr = 0;
   sf->partition_search_breakout_rate_thr = 0;
+  sf->simple_model_rd_from_var = 0;
 
   if (oxcf->mode == REALTIME)
     set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content);
index 8575638d9a76d28f7ce4b5bb82f7bab0cdad3ced..95038ceeadf3147869893aaed2696532a708e128 100644 (file)
@@ -415,6 +415,9 @@ typedef struct SPEED_FEATURES {
 
   // Allow skipping partition search for still image frame
   int allow_partition_search_skip;
+
+  // Fast approximation of vp9_model_rd_from_var_lapndz
+  int simple_model_rd_from_var;
 } SPEED_FEATURES;
 
 struct VP9_COMP;