]> granicus.if.org Git - libvpx/commit
Respond more rapidly to excessive local overshoot.
authorpaulwilkins <paulwilkins@google.com>
Fri, 23 Jun 2017 12:37:38 +0000 (13:37 +0100)
committerpaulwilkins <paulwilkins@google.com>
Wed, 5 Jul 2017 15:51:52 +0000 (16:51 +0100)
commit5b44ef0c501a8756fe53de2deb07647239aefe69
treeffd37bb7f602e8b0743ed7aa6a8c6cbca352a2c8
parent7d526c1654ed972e4083c89f17fbb8f92782dfb0
Respond more rapidly to excessive local overshoot.

This patch attempts to address a bug reported for 4K video.
https://b.corp.google.com/issues/62215394

In this instance a perfect storm of a moderate complexity section
followed by a much easier section where a CGI overlay helped to
suppress film grain noise, followed by a much harder and very grainy
section at the end, cause a massive local rate spike that pushed a chunk
over the upper allowed rate limit.

This patch detects cases where the rate for a frame is much higher than
expected and allows, in this special case, for rapid adjustment of the active
Q range.

For the example chunk in the bug report the target rate was 18Mb/s and the
observed rate was over 37 Mb/s with a surge for the last few frames to over
100Mb/s. This patch brings the overall chunk rate right back down to ~18.2 Mbit/s
and  almost completely eliminates the rate spike at the end. (See graphs appended
to bug report)

Also see  I108da7ca42f3bc95c5825dd33c9d84583227dac1 which fixes a bug
unearthed during testing of this patch and also has a bearing on high rate
encodes such as 4K.

This patch does have a negative impact on some metrics. Most notably there are
clips in our standard test set where it hurts global psnr (though in many cases it
conversely helps SSIM, FAST SSIM and PSNR-HVS). It is also worth noting that
the clips (and data rates) where there is a big metric impact, are almost all cases
where there is currently a significant overshoot vs the target rate and overall rate
accuracy is greatly improved.

Change-Id: I692311a709ccdb6003e705103de9d05b59bf840a
test/level_test.cc
vp9/encoder/vp9_encoder.c