Index: source/libvpx/vp9/encoder/vp9_onyx_if.c |
=================================================================== |
--- source/libvpx/vp9/encoder/vp9_onyx_if.c (revision 207479) |
+++ source/libvpx/vp9/encoder/vp9_onyx_if.c (working copy) |
@@ -591,22 +591,25 @@ |
sf->thresh_mult[THR_COMP_SPLITLA ] += speed_multiplier * 4500; |
sf->thresh_mult[THR_COMP_SPLITGA ] += speed_multiplier * 4500; |
- if (speed > 4) { |
+ if (cpi->sf.skip_lots_of_modes) { |
for (i = 0; i < MAX_MODES; ++i) |
sf->thresh_mult[i] = INT_MAX; |
- sf->thresh_mult[THR_DC ] = 0; |
- sf->thresh_mult[THR_TM ] = 0; |
- sf->thresh_mult[THR_NEWMV ] = 4000; |
- sf->thresh_mult[THR_NEWG ] = 4000; |
- sf->thresh_mult[THR_NEWA ] = 4000; |
+ sf->thresh_mult[THR_DC] = 0; |
+ sf->thresh_mult[THR_TM] = 0; |
+ sf->thresh_mult[THR_NEWMV] = 4000; |
+ sf->thresh_mult[THR_NEWG] = 4000; |
+ sf->thresh_mult[THR_NEWA] = 4000; |
sf->thresh_mult[THR_NEARESTMV] = 0; |
- sf->thresh_mult[THR_NEARESTG ] = 0; |
- sf->thresh_mult[THR_NEARESTA ] = 0; |
- sf->thresh_mult[THR_NEARMV ] = 2000; |
- sf->thresh_mult[THR_NEARG ] = 2000; |
- sf->thresh_mult[THR_NEARA ] = 2000; |
+ sf->thresh_mult[THR_NEARESTG] = 0; |
+ sf->thresh_mult[THR_NEARESTA] = 0; |
+ sf->thresh_mult[THR_NEARMV] = 2000; |
+ sf->thresh_mult[THR_NEARG] = 2000; |
+ sf->thresh_mult[THR_NEARA] = 2000; |
sf->thresh_mult[THR_COMP_NEARESTLA] = 2000; |
+ sf->thresh_mult[THR_SPLITMV] = 2500; |
+ sf->thresh_mult[THR_SPLITG] = 2500; |
+ sf->thresh_mult[THR_SPLITA] = 2500; |
sf->recode_loop = 0; |
} |
@@ -681,6 +684,18 @@ |
sf->max_step_search_steps = MAX_MVSEARCH_STEPS; |
sf->comp_inter_joint_search_thresh = BLOCK_SIZE_AB4X4; |
sf->adpative_rd_thresh = 0; |
+ sf->use_lastframe_partitioning = 0; |
+ sf->use_largest_txform = 0; |
+ sf->use_8tap_always = 0; |
+ sf->use_avoid_tested_higherror = 0; |
+ sf->skip_lots_of_modes = 0; |
+ sf->adjust_thresholds_by_speed = 0; |
+ sf->partition_by_variance = 0; |
+ sf->use_one_partition_size_always = 0; |
+ sf->use_partitions_less_than = 0; |
+ sf->less_than_block_size = BLOCK_SIZE_MB16X16; |
+ sf->use_partitions_greater_than = 0; |
+ sf->greater_than_block_size = BLOCK_SIZE_SB8X8; |
#if CONFIG_MULTIPLE_ARF |
// Switch segmentation off. |
@@ -708,12 +723,44 @@ |
sf->optimize_coefficients = 0; |
sf->first_step = 1; |
} |
- break; |
+ if (speed == 2) { |
+ sf->comp_inter_joint_search_thresh = BLOCK_SIZE_SB8X8; |
+ sf->use_lastframe_partitioning = 1; |
+ sf->first_step = 0; |
+ } |
+ if (speed == 3) { |
+ sf->comp_inter_joint_search_thresh = BLOCK_SIZE_SB8X8; |
+ sf->partition_by_variance = 1; |
+ sf->first_step = 0; |
+ } |
+ if (speed == 4) { |
+ sf->first_step = 0; |
+ sf->comp_inter_joint_search_thresh = BLOCK_SIZE_SB8X8; |
+ sf->use_one_partition_size_always = 1; |
+ sf->always_this_block_size = BLOCK_SIZE_MB16X16; |
+ } |
+ if (speed == 2) { |
+ sf->first_step = 0; |
+ sf->comp_inter_joint_search_thresh = BLOCK_SIZE_SB8X8; |
+ sf->use_partitions_less_than = 1; |
+ sf->less_than_block_size = BLOCK_SIZE_MB16X16; |
+ } |
+ if (speed == 3) { |
+ sf->first_step = 0; |
+ sf->comp_inter_joint_search_thresh = BLOCK_SIZE_SB8X8; |
+ sf->use_partitions_greater_than = 1; |
+ sf->greater_than_block_size = BLOCK_SIZE_SB8X8; |
+ } |
+ break; |
+ |
}; /* switch */ |
// Set rd thresholds based on mode and speed setting |
- set_rd_speed_thresholds(cpi, mode, speed); |
+ if(cpi->sf.adjust_thresholds_by_speed) |
+ set_rd_speed_thresholds(cpi, mode, speed); |
+ else |
+ set_rd_speed_thresholds(cpi, mode, 0); |
// Slow quant, dct and trellis not worthwhile for first pass |
// so make sure they are always turned off. |
@@ -2993,7 +3040,7 @@ |
!cpi->common.frame_parallel_decoding_mode) { |
vp9_adapt_mode_probs(&cpi->common); |
vp9_adapt_mode_context(&cpi->common); |
- vp9_adapt_nmv_probs(&cpi->common, cpi->mb.e_mbd.allow_high_precision_mv); |
+ vp9_adapt_mv_probs(&cpi->common, cpi->mb.e_mbd.allow_high_precision_mv); |
} |
} |
@@ -3327,7 +3374,7 @@ |
vp9_second_pass(cpi); |
encode_frame_to_data_rate(cpi, size, dest, frame_flags); |
- |
+ //vp9_print_modes_and_motion_vectors(&cpi->common, "encode.stt"); |
#ifdef DISABLE_RC_LONG_TERM_MEM |
cpi->twopass.bits_left -= cpi->this_frame_target; |
#else |