ref: 409f48ec520acb6751c8085d54b465c5b3da4ddd
parent: dc510b59b8752adc041ed7b7948be061ed13f87b
parent: 751d002f2fd45d2354d8d6419c940c12a6bf9a44
author: Jingning Han <[email protected]>
date: Wed Apr 2 08:47:50 EDT 2014
Merge "Adjust rate allocation in non-RD coding mode"
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -193,9 +193,8 @@
int var = cpi->fn_ptr[bs].vf(p->src.buf, p->src.stride,
pd->dst.buf, pd->dst.stride, &sse);
- vp9_model_rd_from_var_lapndz(var + sse, 1 << num_pels_log2_lookup[bs],
+ vp9_model_rd_from_var_lapndz(sse + var, 1 << num_pels_log2_lookup[bs],
pd->dequant[1] >> 3, &rate, &dist);
-
*out_rate_sum = rate;
*out_dist_sum = dist << 3;
}
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -982,8 +982,8 @@
if (cpi->sf.use_nonrd_pick_mode) {
if (q == 0)
q++;
- if (cpi->sf.partition_check == 1)
- q -= 10;
+ if (cpi->sf.force_ref_frame == 1)
+ q -= 15;
if (q < *bottom_index)
*bottom_index = q;
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -244,6 +244,9 @@
sf->min_partition_size = BLOCK_8X8;
sf->partition_check =
(cm->current_video_frame % sf->last_partitioning_redo_frequency == 1);
+ sf->force_ref_frame =
+ (cm->current_video_frame %
+ (sf->last_partitioning_redo_frequency << 1) == 1);
sf->partition_search_type = REFERENCE_PARTITION;
sf->use_nonrd_pick_mode = 1;
sf->search_method = FAST_DIAMOND;
@@ -296,6 +299,7 @@
sf->last_partitioning_redo_frequency = 4;
sf->disable_split_mask = 0;
sf->mode_search_skip_flags = 0;
+ sf->force_ref_frame = 0;
sf->disable_split_var_thresh = 0;
sf->disable_filter_search_var_thresh = 0;
for (i = 0; i < TX_SIZES; i++) {
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -252,6 +252,10 @@
// encoding process for RTC.
int partition_check;
+ // Use finer quantizer in every other few frames that run variable block
+ // partition type search.
+ int force_ref_frame;
+
// Implements various heuristics to skip searching modes
// The heuristics selected are based on flags
// defined in the MODE_SEARCH_SKIP_HEURISTICS enum