Jerome Jiang [Mon, 10 Dec 2018 20:53:20 +0000 (12:53 -0800)]
Refactor svc_*_test.cc
Put test classes into svc_test namespace.
Make num_nonref_frames_ and mismatched_nframes private, as they're
computed by encoder/decoder hooks which shouldn't be modified outside
the class.
Add accessor to num_nonref_frames_.
James Zern [Sat, 8 Dec 2018 08:43:31 +0000 (00:43 -0800)]
test/svc_*_test: fix SetConfig() signature
make the parameter constant to match the base class and mark the
function virtual. virtual is used to match the rest of the code base,
but now that c++11 is required all such functions could be changed to
override.
Jerome Jiang [Wed, 5 Dec 2018 02:37:02 +0000 (18:37 -0800)]
vp9 screen: Update motion search offset when set to NSTEP.
Search method and step parameter might be changed in speed settings.
In this case, we should update the search area offset due to the change
of search method.
sdeng [Wed, 7 Nov 2018 00:20:41 +0000 (16:20 -0800)]
Add high bit Hadamard 32x32 avx2 implementation
Speed test:
[ RUN ] C/HadamardHighbdTest.DISABLED_Speed/2
Hadamard32x32[ 10 runs]: 9 us
Hadamard32x32[ 10000 runs]: 8914 us
Hadamard32x32[ 10000000 runs]: 8991776 us
[ RUN ] AVX2/HadamardHighbdTest.DISABLED_Speed/2
Hadamard32x32[ 10 runs]: 5 us
Hadamard32x32[ 10000 runs]: 4582 us
Hadamard32x32[ 10000000 runs]: 4548203 us
Yaowu Xu [Thu, 29 Nov 2018 17:44:16 +0000 (09:44 -0800)]
Optimize RDMult
This commit introduces the optimized RDMult values for both key
and non-key frames. For key frames, the commit gets values back
from commit#b13f6154df9c0834d74f7e3d41e41c4208f56d18. For impact
on key frame only encodings, see commit message for that commit.
For inter frames, the values get optimzied by running encoding tests
in Q mode with the following range using 150 frames:
2 6 10 14 18 22 26 30 34 38 42 46 50 54 58 62
The impact of current set of RDMULT values:
PSNR SSIM PSNR-HVS
lowres: -0.325% 0.422% -0.228%
midres: -0.377% 0.158% -0.376%
hdres: -0.309% 0.522% -0.322%
sdeng [Wed, 7 Nov 2018 00:20:41 +0000 (16:20 -0800)]
Add high bit Hadamard 16x16 avx2 implementation
Speed test:
[ RUN ] C/HadamardHighbdTest.DISABLED_Speed/1
Hadamard16x16[ 10 runs]: 2 us
Hadamard16x16[ 10000 runs]: 1836 us
Hadamard16x16[ 10000000 runs]: 1829451 us
[ RUN ] AVX2/HadamardHighbdTest.DISABLED_Speed/1
Hadamard16x16[ 10 runs]: 1 us
Hadamard16x16[ 10000 runs]: 1009 us
Hadamard16x16[ 10000000 runs]: 984856 us
James Zern [Wed, 5 Dec 2018 00:38:08 +0000 (16:38 -0800)]
configure: test -std=c++11 before enabling unit tests
since: 77fa51003 Replace deprecated scoped_ptr with unique_ptr
the unit tests require a c++11 capable compiler; future versions of
googletest (1.9.x) will as well, so this change was inevitable if we
wanted to keep the snapshot up to date.
Deepa K G [Mon, 3 Dec 2018 09:33:18 +0000 (15:03 +0530)]
Fix intra_count_low calculation in first pass
In first pass, scaled_low_intra_thresh should not be
compared with motion_error, as scaled_low_intra_thresh
accounts for bit-depth, whereas motion_error does not.
In addition, mv_cost is excluded for comparison.
Marco Paniconi [Mon, 3 Dec 2018 18:49:41 +0000 (10:49 -0800)]
vp9: Overshoot detection for skipped base layer.
If scene/slide change is detected on current
superframe and max-q set because of high overshoot:
then if the lower/base spatial layer are skipped on
the current superframe, max-q is forced on the
next encoded base/lower spatial layers.
sdeng [Tue, 6 Nov 2018 23:58:16 +0000 (15:58 -0800)]
Add high bit Hadamard 8x8 avx2 implementation
Speed tests:
[ RUN ] C/HadamardHighbdTest.DISABLED_Speed/0
Hadamard8x8[ 10 runs]: 0 us
Hadamard8x8[ 10000 runs]: 316 us
Hadamard8x8[ 10000000 runs]: 311749 us
[ OK ] C/HadamardHighbdTest.DISABLED_Speed/0 (371 ms)
[ RUN ] AVX2/HadamardHighbdTest.DISABLED_Speed/0
Hadamard8x8[ 10 runs]: 0 us
Hadamard8x8[ 10000 runs]: 161 us
Hadamard8x8[ 10000000 runs]: 156910 us
[ OK ] AVX2/HadamardHighbdTest.DISABLED_Speed/0 (160 ms)
This fixes an issue where, in very rare error cases, one row of LPF
could be waiting infinitely for its previous row's LPF to complete.
With LPF optimization, the second row's LPF could be triggered before
the first row's LPF. In this case, the second row's LPF will wait for
LPF of n-sync number of SBs of the first row to finish. In error
streams, depending on when the error was detected, the LPF job of the
first row may then never be triggered. This puts the thread doing the
second row's LPF in an infinite wait.
The issue is reproduceable once in approximately 500 runs of the clip in
bug 1562.
Jingning Han [Fri, 30 Nov 2018 18:23:33 +0000 (10:23 -0800)]
Simplify constant q mode qp selection
Decouple the constant q mode qp selection from vbr/cbr/cq modes.
Skip vp9_frame_type_qdelta() adjustment for non-ARF inter frames,
instead keep using the cq-level. It improves the compresson
performance:
Angie Chiang [Fri, 30 Nov 2018 01:36:57 +0000 (17:36 -0800)]
Consider mv inconsistency in single_motion_search
This is still a work-in-process.
nb_full_mvs and lambda are set to zero for now, which means
mv inconsistency penalty is zero while doing the mv search.
Marco Paniconi [Thu, 29 Nov 2018 06:08:08 +0000 (22:08 -0800)]
vp9: Fix condition for disabling noise estimation
Fix condition for turning off denoiser due to high
motion: use proper superframe counter and
frames_since_key counter so this condition won't
take effect on key (super)frame.
Jerome Jiang [Tue, 27 Nov 2018 01:10:37 +0000 (17:10 -0800)]
VP9 SVC: fix crash on scaling partition.
When scaling up partition from lower resolution layer L, mi_row and
mi_col from L must be smaller than mi_rows and mi_cols from L.
Before this change, the condition was based on mi_rows from top layer
divided by 2, which is not necessarily equal to the mi_rows from lower
resolution layer.
Added variable in SVC structure to keep track of mi_rows and mi_cols
from each spatial layer.
Marco Paniconi [Mon, 26 Nov 2018 21:58:28 +0000 (13:58 -0800)]
vp9-svc: Fix to skip enhancement layer setting
If in constrained layer drop mode, avoid setting
skip flag if base layer is dropped, as whole superframe
will be dropped in this case. This avoids an assert trigger
in the svc superframe packing.
Jingning Han [Mon, 26 Nov 2018 17:43:07 +0000 (09:43 -0800)]
Fix ARF rate allocation for cq mode
In the limited test set, it improves the cq mode compression
performance by 1.9% in PSNR and 6% in SSIM as compared to use
same quantization parameter for all ARFs.