shithub: libvpx

Download patch

ref: 92a6db79288d1163ad1b429d63ba72db5c2b9434
parent: 2c04e85d06ea03d49e6b3c8823f33b08ff6396da
author: Yaowu Xu <[email protected]>
date: Tue Jul 1 06:52:17 EDT 2014

Added a speed feature controlling a motion search parameter

This commit added a speed feature to control the step_param used in
full pixel motion search. The intention is to reduced the search
steps for high speed real time coding.

Change-Id: I21d2f0105c2b647783a6688615da7fcf2b6d670b

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -141,7 +141,7 @@
 
   // TODO(jingning) exploiting adaptive motion search control in non-RD
   // mode decision too.
-  step_param = 6;
+  step_param = cpi->sf.mv.fullpel_search_step_param;
 
   for (i = LAST_FRAME; i <= LAST_FRAME && cpi->common.show_frame; ++i) {
     if ((x->pred_mv_sad[ref] >> 3) > x->pred_mv_sad[i]) {
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -283,6 +283,7 @@
   }
   if (speed >= 7) {
     sf->use_quant_fp = cm->frame_type == KEY_FRAME ? 0 : 1;
+    sf->mv.fullpel_search_step_param = 10;
     sf->lpf_pick = LPF_PICK_MINIMAL_LPF;
     sf->encode_breakout_thresh = (MIN(cm->width, cm->height) >= 720) ?
         800 : 300;
@@ -312,6 +313,7 @@
   sf->mv.reduce_first_step_size = 0;
   sf->mv.auto_mv_step_size = 0;
   sf->mv.max_step_search_steps = MAX_MVSEARCH_STEPS;
+  sf->mv.fullpel_search_step_param = 6;
   sf->comp_inter_joint_search_thresh = BLOCK_4X4;
   sf->adaptive_rd_thresh = 0;
   sf->use_lastframe_partitioning = LAST_FRAME_PARTITION_OFF;
@@ -359,7 +361,6 @@
   sf->search_type_check_frequency = 50;
   sf->encode_breakout_thresh = 0;
   sf->elevate_newmv_thresh = 0;
-
   // Recode loop tolerence %.
   sf->recode_tolerance = 25;
 
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -162,6 +162,9 @@
 
   // Control when to stop subpel search
   int subpel_force_stop;
+
+  // This variable sets the step_param used in full pel motion search.
+  int fullpel_search_step_param;
 } MV_SPEED_FEATURES;
 
 typedef struct SPEED_FEATURES {