Marco Paniconi [Tue, 16 Apr 2019 17:00:53 +0000 (10:00 -0700)]
vp9-rtc: Add speed feature to force SMOOTH filter
Add speed feature for real-time to always force
SMOOTH filter for subpel motion. Can be useful in some
cases for noisy content or high motion at low bitrate.
Also some speedup in avoiding the checking of two filters.
fixes a deadlock with an odd number of threads that go from < number of
tiles to >. the previous calculations were out of sync so going from
e.g., 8 tiles to 2 with 3 threads would result in scheduling only 2
workers, but thread_loop_filter_rows() would expect 3.
Jingning Han [Fri, 12 Apr 2019 22:59:51 +0000 (15:59 -0700)]
Use uniform sampling as initial centers for k-means
The Wiener variance output has been sorted prior to the clustering,
which allows to directly use the uniform sampling as the initial
center points. It avoids empty cluster situations when the samples
are heavily distributed at two far ends and leave the middle empty.
sdeng [Fri, 29 Mar 2019 16:18:56 +0000 (09:18 -0700)]
Add Tune for SSIM
Implementation with some tuning of the paper:
C. Yeo, H. L. Tan, and Y. H. Tan, "On rate distortion optimization using
SSIM," Circuits and Systems for Video Technology, IEEE Transactions on,
vol. 23, no. 7, pp. 1170-1181, 2013.
With switching to clang-7.0.1 we got new warnings. With this change the
warnings are back to 0 for all configurations (excluding warnings in
third_party)
Paul Wilkins [Tue, 2 Apr 2019 15:38:49 +0000 (16:38 +0100)]
Film Mode: Bias based on sub block energy.
Apply a bias for film mode against intra coding
(especially DC_PRED) and compound modes if the sub
blocks of the current block have significantly different
variance in the source.
Frank Galligan [Tue, 26 Mar 2019 06:48:04 +0000 (23:48 -0700)]
Add a test to test rollover of int64 in encoder interface.
The current libvpx encoder interface can potentially rollover an int64_t
value used to calculate the current timestamp. If the timebase was set
to microseconds and first timestamp was 0, then the rollover would
occur in about 10.675 days.
Jingning Han [Wed, 3 Apr 2019 23:46:07 +0000 (16:46 -0700)]
Bypass skip check in tune for sharpness mode
The sharpness mode is enabled for hvc visual quality. Bypass the
skip block check that could potentially force all zero block in
sharpness mode. This resolves the patchy blockiness issue raised
in the 4K SDR HVC encode.
Histogram-based noise estimation algorithm leveraged that low-noise sequences
tend to populate lower-valued histogram bins and high-noise sequences tend to
populate higher-valued histogram bins in a predictable/repeatable manner. The
algorithm compensates for histogram flattening and skewing toward zero as the
scene darkens.
Marco Paniconi [Mon, 1 Apr 2019 21:18:54 +0000 (14:18 -0700)]
vp9-rtc: Move noise estimation to after scene change detection
This allows to use result from scene chage detection to exclude
the current frame from noise estimation analysis if the frame has
scene/ big content change (i.e., high_source_sad flag is set).
The behavior change for noise estimation may be small in practice,
since in the current code, a scene change would have blocks excluded
due to thresh_sum_diff, and the subsequent frames would also be mostly
excluded due to (past) non-zero motion vectors (until the
consec_zeromv > thresh_consec_zeromv is satisfied again).
But its better to completely exclude current frame if its a scene change.
Marco Paniconi [Fri, 29 Mar 2019 22:18:14 +0000 (15:18 -0700)]
vp9-rtc: Speed feature changes for speed 9.
Add threshold multipler for variance partitioning
as speed feature, and increase it by 2x for speed >= 9
for resoln >= VGA. Also only allow simple_interpol
filter when avg_low_motion is below threshold.
Better tradeoff of speed/quality comparing to speed 8.
Paul Wilkins [Tue, 2 Apr 2019 12:00:03 +0000 (12:00 +0000)]
Merge changes Ied3992f4,I83ca669b,I8f1c1a29
* changes:
Further Adjustments to film mode bias.
Add GF group noise weighting in rd_variance_adjustment()
Adjustment to low variance block bias in rd_variance_adjustment()
Marco Paniconi [Tue, 26 Mar 2019 17:45:22 +0000 (10:45 -0700)]
vp9-rtc: Disable cyclic refresh under some conditions
cyclic refresh does not work for speeds <= 4, so disable
it for this case. And dynamically disable it when
average_qp is close to MAXQ (only for non-svc), to improve
quality/rate control at very low bitrates.
Jingning Han [Mon, 25 Mar 2019 18:27:14 +0000 (11:27 -0700)]
Unify the transform and quantization process
Unify the transform and quantization process for 4x4 - 16x16
transform block sizes. This doesn't affect the encoding speed
visibly. Remove it to reduce the maintenance load.
Jerome Jiang [Thu, 21 Mar 2019 21:17:15 +0000 (14:17 -0700)]
vp9 postproc neon: Remove the condition on mb cols.
VP8 and VP9 have different padding on buffer stride.
VP8 microblock is 16x16 so the buffer stride needs to be divisible by
16. Thus UV buffer stride is divisible by 8.
VP9 microblock is 8x8 so the buffer stride is only extended to be
divisible by 8. Then UV buffer stride isn't divisible by 8.
Marco Paniconi [Thu, 21 Mar 2019 17:36:31 +0000 (10:36 -0700)]
vp9-screen: Adjust speed features at speed 8
Keep loopfilter on, and use half-pel instead of full.
This reduces big quality gap between the speed 8 and 7,
but still keeps speed 8 about 30-40% faster than speed 7.
Tested on screenshare clips with scroll and slide changes.
Marco Paniconi [Wed, 20 Mar 2019 20:39:48 +0000 (13:39 -0700)]
vp9-rtc: Fixes for low-resoln
The force smooth_filter should only be used
for noisy content, so for now keep it off and
add TODO. Also fix/adjust low-resoln condition
and threshold in cyclic refresh.