Adds an intermediate speed level for rtc
authorDeb Mukherjee <debargha@google.com>
Mon, 24 Feb 2014 20:08:56 +0000 (12:08 -0800)
committerDeb Mukherjee <debargha@google.com>
Mon, 24 Feb 2014 20:15:33 +0000 (12:15 -0800)
Moves the existing speed 6 to speed 7 and adds an
intermediate level 6 which is roughly in between
speeds 6 and 7 in both speed and coding efficiency.
Also includes some minor fixes/adjustments.

Change-Id: I98befc4d82d750e79fe426c457c4a2571f6b6cc7

vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_onyx_if.c

index 400a047..0385869 100644 (file)
@@ -965,9 +965,9 @@ static BLOCK_SIZE find_partition_size(BLOCK_SIZE bsize,
 // may not be allowed in which case this code attempts to choose the largest
 // allowable partition.
 static void set_partitioning(VP9_COMP *cpi, const TileInfo *const tile,
-                             MODE_INFO **mi_8x8, int mi_row, int mi_col) {
+                             MODE_INFO **mi_8x8, int mi_row, int mi_col,
+                             BLOCK_SIZE bsize) {
   VP9_COMMON *const cm = &cpi->common;
-  BLOCK_SIZE bsize = cpi->sf.always_this_block_size;
   const int mis = cm->mode_info_stride;
   int row8x8_remaining = tile->mi_row_end - mi_row;
   int col8x8_remaining = tile->mi_col_end - mi_col;
@@ -1956,7 +1956,8 @@ static void encode_sb_row(VP9_COMP *cpi, const TileInfo *const tile,
       cpi->mb.source_variance = UINT_MAX;
       if (cpi->sf.use_one_partition_size_always) {
         set_offsets(cpi, tile, mi_row, mi_col, BLOCK_64X64);
-        set_partitioning(cpi, tile, mi_8x8, mi_row, mi_col);
+        set_partitioning(cpi, tile, mi_8x8, mi_row, mi_col,
+                         cpi->sf.always_this_block_size);
         rd_use_partition(cpi, tile, mi_8x8, tp, mi_row, mi_col, BLOCK_64X64,
                          &dummy_rate, &dummy_dist, 1);
       } else {
@@ -2328,8 +2329,9 @@ static void encode_rtc_sb_row(VP9_COMP *cpi, const TileInfo *const tile,
     MODE_INFO **mi_8x8 = cm->mi_grid_visible + idx_str;
     cpi->mb.source_variance = UINT_MAX;
 
-    rtc_use_partition(cpi, tile, mi_8x8, tp, mi_row, mi_col, BLOCK_16X16,
-                     &dummy_rate, &dummy_dist, 1);
+    rtc_use_partition(cpi, tile, mi_8x8, tp, mi_row, mi_col,
+                      cpi->sf.always_this_block_size,
+                      &dummy_rate, &dummy_dist, 1);
   }
 }
 // end RTC play code
index dd17014..f46485a 100644 (file)
@@ -661,6 +661,7 @@ static void set_good_speed_feature(VP9_COMMON *cm,
     sf->reference_masking = 1;
     sf->auto_mv_step_size = 1;
 
+    sf->disable_split_var_thresh = 32;
     sf->disable_filter_search_var_thresh = 100;
     sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
 
@@ -696,6 +697,7 @@ static void set_good_speed_feature(VP9_COMMON *cm,
     sf->reference_masking = 1;
     sf->auto_mv_step_size = 1;
 
+    sf->disable_split_var_thresh = 64;
     sf->disable_filter_search_var_thresh = 200;
     sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
 
@@ -713,7 +715,7 @@ static void set_good_speed_feature(VP9_COMMON *cm,
     sf->adaptive_rd_thresh = 4;
     sf->mode_skip_start = 6;
   }
-  if (speed == 5) {
+  if (speed >= 5) {
     sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
     sf->use_one_partition_size_always = 1;
     sf->always_this_block_size = BLOCK_16X16;
@@ -861,9 +863,12 @@ static void set_rt_speed_feature(VP9_COMMON *cm,
     sf->search_method = FAST_HEX;
   }
   if (speed >= 6) {
+    sf->use_one_partition_size_always = 1;
+    sf->always_this_block_size = BLOCK_32X32;
+  }
+  if (speed >= 7) {
     sf->always_this_block_size = BLOCK_16X16;
     sf->use_pick_mode = 1;
-    sf->encode_breakout_thresh = 1000;
   }
 }