diff options
author | Jingning Han <jingning@google.com> | 2018-11-29 17:24:13 +0000 |
---|---|---|
committer | Johann Koenig <johannkoenig@google.com> | 2018-11-29 18:23:40 +0000 |
commit | c41c4752a14b917a2155a5003d3e50efbb3b790b (patch) | |
tree | 0cf0319aa35053ef83c0117744d7e8cdc14967ef /vp9/encoder | |
parent | 932f8fa04dc15f4adf16df37402556e8c4dc72e7 (diff) | |
download | libvpx-c41c4752a14b917a2155a5003d3e50efbb3b790b.tar libvpx-c41c4752a14b917a2155a5003d3e50efbb3b790b.tar.gz libvpx-c41c4752a14b917a2155a5003d3e50efbb3b790b.tar.bz2 libvpx-c41c4752a14b917a2155a5003d3e50efbb3b790b.zip |
Revert "Optimize RDMULT values for key frames"
This reverts commit b13f6154df9c0834d74f7e3d41e41c4208f56d18.
Temporarily revert this change due to interactions with rate control at very low target bit-rate.
Original change's description:
> Optimize RDMULT values for key frames
>
> Encoding of 5 frames of each sequence using key frames only, the new
> values help the metrics by:
>
> PSNR SSIM PSNR-HVS
> lowres: -0.870% -0.140% -0.892%
> midres: -0.899% -0.146% -1.052%
> hdres: -0.944% -0.115% -1.028%
>
> Tested q range:
> 2 6 10 14 18 22 26 30 34 38 42 46 50 54 58 62
>
> Change-Id: I5b0dda366d589f52987c5bad11a1f95c4e6dc1a5
TBR=yaowu@google.com,paulwilkins@google.com,jingning@google.com,builds@webmproject.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ie1e4cf21308d69699a65a393a83884882682ea8e
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_rd.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/vp9/encoder/vp9_rd.c b/vp9/encoder/vp9_rd.c index 8323f3af4..18b74f57b 100644 --- a/vp9/encoder/vp9_rd.c +++ b/vp9/encoder/vp9_rd.c @@ -174,23 +174,10 @@ static const int rd_frame_type_factor[FRAME_UPDATE_TYPES] = { 128, 144, 128, 128, 144, 144 }; int vp9_compute_rd_mult_based_on_qindex(const VP9_COMP *cpi, int qindex) { - // largest dc_quant is 21387, therefore rdmult should always fit in uint32_t - // i.e. 21387 * 21387 * 8 = 3659230152 = 0xDA1B6BC8 + // largest dc_quant is 21387, therefore rdmult should always fit in int32_t const int q = vp9_dc_quant(qindex, 0, cpi->common.bit_depth); - uint32_t rdmult = q * q; - - if (cpi->common.frame_type != KEY_FRAME) { - rdmult = rdmult * 3 + (rdmult * 2 / 3); - } else { - if (qindex < 64) - rdmult = rdmult * 4; - else if (qindex <= 128) - rdmult = rdmult * 3 + rdmult / 2; - else if (qindex < 190) - rdmult = rdmult * 4 + rdmult / 2; - else - rdmult = rdmult * 7 + rdmult / 2; - } + int rdmult = q * q; + rdmult = rdmult * 3 + (rdmult * 2 / 3); #if CONFIG_VP9_HIGHBITDEPTH switch (cpi->common.bit_depth) { case VPX_BITS_10: rdmult = ROUND_POWER_OF_TWO(rdmult, 4); break; |