Commit 99893f24 authored by Jingning Han's avatar Jingning Han
Browse files

Apply finer quantizer to partition search frames in non-RD flow

This commit optimizes the bit allocation for the non-RD coding flow.
It applies slightly better quantizer to the frames, where all blocks
run a non-RD partition search. Such frames typically have better
rate-distortion trade off, thus improving the reconstruction quality
for next few frames reference at reasonably low increment in rate
cost.

The coding performance for rtc set at speed -5 with error-resilient
tuned on and rate control set as cbr is improved by 19.58%. It improved
the coding speed by about 10% for a portion of local test clips.

Change-Id: I9d56696cd4359dc8136ca10aff10fff05aaa2686
parent 6618b73b
......@@ -1377,6 +1377,7 @@ static void copy_partitioning(VP9_COMMON *cm, MODE_INFO **mi_8x8,
for (block_col = 0; block_col < 8; ++block_col) {
MODE_INFO *const prev_mi = prev_mi_8x8[block_row * mis + block_col];
const BLOCK_SIZE sb_type = prev_mi ? prev_mi->mbmi.sb_type : 0;
if (prev_mi) {
const ptrdiff_t offset = prev_mi - cm->prev_mi;
mi_8x8[block_row * mis + block_col] = cm->mi + offset;
......
......@@ -2673,6 +2673,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
vp9_write_yuv_frame(cpi->Source);
#endif
set_speed_features(cpi);
// Decide q and q bounds.
q = vp9_rc_pick_q_and_bounds(cpi, &bottom_index, &top_index);
......@@ -2682,8 +2684,6 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
set_high_precision_mv(cpi, q < HIGH_PRECISION_MV_QTHRESH);
}
set_speed_features(cpi);
if (cpi->sf.recode_loop == DISALLOW_RECODE) {
encode_without_recode_loop(cpi, size, dest, q);
} else {
......
......@@ -985,6 +985,9 @@ int vp9_rc_pick_q_and_bounds(const VP9_COMP *cpi,
q /= 3;
if (q == 0)
q++;
if (cpi->sf.partition_check == 1)
q -= 10;
if (q < *bottom_index)
*bottom_index = q;
else if (q > *top_index)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment