diff options
author | Marco Paniconi <marpan@google.com> | 2018-07-02 12:55:29 -0700 |
---|---|---|
committer | Marco Paniconi <marpan@google.com> | 2018-07-02 13:08:53 -0700 |
commit | 03abd2c8f358549a445dce452e26aa72d3853e55 (patch) | |
tree | 109ac0e132b98d8cc0028801bf182ba884eff4c4 /vp9 | |
parent | 1bb29e24553bc03c8cb2b3bb11daff8c109cc462 (diff) | |
download | libvpx-03abd2c8f358549a445dce452e26aa72d3853e55.tar libvpx-03abd2c8f358549a445dce452e26aa72d3853e55.tar.gz libvpx-03abd2c8f358549a445dce452e26aa72d3853e55.tar.bz2 libvpx-03abd2c8f358549a445dce452e26aa72d3853e55.zip |
vp9: Adjust segment weight for cyclic refresh.
For screen-content: use the previous actual number of seg
blocks for the segment weight, used in the rate control
for setting frame-level Q.
Small overall increase in psnr on several screen-content clips.
Change-Id: Id414fb7f1b0ba578d464437d7f9c1783a0cad310
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_aq_cyclicrefresh.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c index d89295bdf..fb8ce12a1 100644 --- a/vp9/encoder/vp9_aq_cyclicrefresh.c +++ b/vp9/encoder/vp9_aq_cyclicrefresh.c @@ -503,6 +503,14 @@ void vp9_cyclic_refresh_update_parameters(VP9_COMP *const cpi) { num8x8bl; if (weight_segment_target < 7 * weight_segment / 8) weight_segment = weight_segment_target; + // For screen-content: don't include target for the weight segment, since + // all for all flat areas the segment is reset, so its more accurate to + // just use the previous actual number of seg blocks for the weight. + if (cpi->oxcf.content == VP9E_CONTENT_SCREEN) + weight_segment = + (double)((cr->actual_num_seg1_blocks + cr->actual_num_seg2_blocks) >> + 1) / + num8x8bl; cr->weight_segment = weight_segment; } |