Paul Wilkins [Thu, 28 Feb 2019 14:10:12 +0000 (14:10 +0000)]
Change to mode early breakout rules for FILM mode.
The biggest offender in terms of preventing retention of film
grain in high rate film content is the use of DC-PRED mode.
Some of the directional modes whilst not strictly preserving
grain do better at at least preserving some texture.
This change blocks the early breakout of the rd loop based
on the reference frame giving the best result so far. In practice,
unless DC-PRED was chosen as the best mode so far, the other
directional intra modes would not even be considered.
As the film grain mode also tends to bias against DC-PRED (or
intra in general) this was pretty much blocking all use of directional
intra modes.
The patch also allows for a broader spectrum of DC modes at the
16x16 transform level than previously.
Marco Paniconi [Sat, 9 Mar 2019 05:00:48 +0000 (21:00 -0800)]
vp9-screen: Rework the mode skip logic for screen
Don't force skip of zero-golden reference when
zero_temp_sad_source = 0, as it be may the
inter-layer reference. And remove the flatness conditon
when superblock is static.
Marco Paniconi [Fri, 8 Mar 2019 18:04:31 +0000 (10:04 -0800)]
vp9-screen: Fix to screen wth layered encoding
zero_temp_sad_source is only computed when
compute_source_sad_onepass and sf->use_source_sad are
on, which currently is only for the top layer of the
layered encoding. So qualify the usage of
zero_temp_sad_source on those flags.
This affects the quality/speed of the lower layers of
screen content mode when SVC (quality layers) are used.
Marco Paniconi [Thu, 7 Mar 2019 04:28:26 +0000 (20:28 -0800)]
vp9-rtc: Improve mode check on flat blocks in screen mode
For nonrd-pickmode in screen content mode: modify logic for
inter and intra mode check for spatially flat blocks.
Condition skip of non-zero/zero inter mode based on
zero_temp_sad_source, and force intra/DC check regardless.
Johann [Tue, 5 Mar 2019 00:55:10 +0000 (16:55 -0800)]
add -Wmissing-prototypes
clang treats -Wmissing-declarations differently than gcc. This
provides similar coverage for clang.
Fix vpx_clear_system_state() warning on 32bit builds:
note: this declaration is not a prototype; add 'void' to make it a
prototype for a zero-parameter function
Marco Paniconi [Sat, 2 Mar 2019 06:03:10 +0000 (22:03 -0800)]
vp9-rtc: Adjust force split logic for screen mode
In variance partition for screen content mode:
force split to 32x32 if source pre-process detects
non-zero temporal sad.
Reduce artifacts in scroll motion content.
Marco Paniconi [Fri, 1 Mar 2019 19:18:36 +0000 (11:18 -0800)]
vp9-rtc: Fix for scroll motion for rtc
Increase threshold to detect frames with high
num of motion blocks, and fix conditions to detect
horiz & vert scroll and avoid split below 16x16 blocks
in variance partition.
Reduces artifacts in horizonal scroll screenshare testing.
Marco Paniconi [Fri, 1 Mar 2019 01:53:18 +0000 (17:53 -0800)]
vp9-rtc: Reduce thresholds for skip golden
For nonrd-pickmode CBR mode: reduce the skip
golden ref thresholds, to reduce some psnr
regression in some clips, while still effectively
reducing flashing block artifact occurrence.
paulwilkins [Tue, 26 Feb 2019 12:34:07 +0000 (12:34 +0000)]
Fix RD multiplier bug impacting AQ1.
Change to the default RD multiplier computation in set_segment_rdmult()
The default here is wrong as for modes like AQ 1 setting the rdmult based on the
segment ID for bsize will tend to result in the RD loop favoring partition sizes where
the resulting segment assignment has the lowest Q, as these partition sizes will be
then evaluated with a lower value of rdmult. For a valid rd comparison between
partition sizes within a single SB64 we need to use the same value of rdmult.
This change fixes an observed issue with AQ 1 where almost all the blocks were being
assigned to segment 0.
Marco Paniconi [Thu, 28 Feb 2019 00:19:33 +0000 (16:19 -0800)]
vp9-rtc: Change init level of denoiser & noise level
Change to init/reset level of the denoiser from
kDenLow to kDenMedium, and the init noise level to kLow.
This affects the denoiser level during the initialization
stage of the noise estimation.
Improves denoising for noisy content during init stage of
noise estimation, with little effect for low noise/clean content.
Marco Paniconi [Wed, 27 Feb 2019 17:28:43 +0000 (09:28 -0800)]
vp9-rtc: Modify skip golden mode check for 1 layer
For real-time CBR mode: golden reference mode testing is
skipped under certain conditons based on sse of zero-last mode.
This was done for svc mode. Here we add similar condition
for non-svc/1 layer encoding.
Reduces flashing block artifacts that can occur in background
areas with noise.
Marco Paniconi [Mon, 25 Feb 2019 03:02:14 +0000 (19:02 -0800)]
vp9-rtc: Fix to Q clamp in adjust_q_cbr
For CBR mode: clamp the Q to worst/best quality in
adjust_q_cbr().
Under certain conditions, when the worst/best quality is
suddenly changed by a large amount mid-stream, the Q
adjustment from the final Q from adjust_q_cbr may not respect
the worst/best qualiy limits.
Angie Chiang [Fri, 8 Feb 2019 18:25:56 +0000 (10:25 -0800)]
Fix the bug for feature_score computation
The visited is not set to 1 after an item is pushed into the heap.
This may cause one item being pushed into the heap multiple
times, which may incur buffer overflow and memory corruption.
Hui Su [Thu, 7 Feb 2019 04:09:33 +0000 (20:09 -0800)]
Refactor the model for rect partition pruning
Remove the block variance and skip flags from the input features. They
do not seem to reduce the average loss of the model. Also decrease the
number of hidden nodes. The model size is reduced significantly.
Marco Paniconi [Mon, 4 Feb 2019 22:49:58 +0000 (14:49 -0800)]
vp8: Add extra conditon for overshoot-drop
For drop due to large overshoot feature (in 1 pass CBR):
add additional condition that current prediction error
is larger than that of last encoded frame. This make the
drop due to sudden overshoot more robust, and improves
rate convergence for steady hard content.