From: Yaowu Xu Date: Tue, 1 Jul 2014 17:52:17 +0000 (-0700) Subject: Added a speed feature controlling a motion search parameter X-Git-Tag: v1.4.0~1276^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92a6db79288d1163ad1b429d63ba72db5c2b9434;p=libvpx 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 --- diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index d9edeae3e..f8db56436 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -141,7 +141,7 @@ static void full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x, // 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]) { diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index f25091b06..1eac02f99 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -283,6 +283,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf, } 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 @@ void vp9_set_speed_features(VP9_COMP *cpi) { 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 @@ void vp9_set_speed_features(VP9_COMP *cpi) { sf->search_type_check_frequency = 50; sf->encode_breakout_thresh = 0; sf->elevate_newmv_thresh = 0; - // Recode loop tolerence %. sf->recode_tolerance = 25; diff --git a/vp9/encoder/vp9_speed_features.h b/vp9/encoder/vp9_speed_features.h index 74ec8c43c..4ccb77a25 100644 --- a/vp9/encoder/vp9_speed_features.h +++ b/vp9/encoder/vp9_speed_features.h @@ -162,6 +162,9 @@ typedef struct MV_SPEED_FEATURES { // 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 {