Commit Graph

16571 Commits

Author SHA1 Message Date
Johann
6886da7547 Create a class for buffers used in tests
Demonstrate its use with the IDCT test.

Change-Id: Idf87fe048847c180f13818fd4df916ba4500134b
2017-01-11 08:28:39 -08:00
Marco Paniconi
36e767c147 Merge "vp9: SVC unittests: fix to use y4m source." 2016-12-22 17:26:42 +00:00
James Zern
90ceaba3e4 libs.mk/stress.sh,curl: set --retry to 1
provide some resilience for transient errors

Change-Id: I8db3d4eb5ef3cccc235a8c4c0052199c0ce23a27
2016-12-22 08:29:15 -05:00
Marco
f0b491a524 vp9: SVC unittests: fix to use y4m source.
Comment out check on buffer underrun, as it currently fails
on some of the svc tests.

BUG=webm:1350

Change-Id: I73c88b800cdcc06bd2f900f7b7e2a5fd08248065
2016-12-21 22:59:35 -08:00
Marco
e7c453b613 vp9: 1 pass vbr: Skip find_predictors in pickmode when source is altref.
When source frame is altref, we only do zero-mv mode, so we can skip
the find_predictors(). No change in compression.
Small speed gain, ~1%.

Only affects 1 pass vbr with lookhead altref, for ytlive with
the macro flag USE_ALTREF_FOR_ONE_PASS on.

Change-Id: I9318c5da8521f017bf54919cd652438b3a6313d1
2016-12-21 12:12:55 -08:00
Marco Paniconi
b5770a2007 Merge "vp9; Fix to unitest for high noise." 2016-12-21 19:38:00 +00:00
Marco
9ba77ed45b vp9; Fix to unitest for high noise.
Source if y4m, and fix comment.

Change-Id: I1eb84977d42dd0f9009c276b56b3fdb03949bfc2
2016-12-21 10:22:34 -08:00
Marco Paniconi
9ba45fa510 Merge "vp9: Add datarate test for denoiser, for high noise case." 2016-12-21 03:56:13 +00:00
Marco
3fcd595dfb vp9: Add datarate test for denoiser, for high noise case.
Also breakout the denoiser tests, as the denoiser only
runs for real-time speed >=5.

Change-Id: I921b785860c35e9d1ebfad0833673a98490186c2
2016-12-20 16:48:25 -08:00
Jerome Jiang
f27276f44f Merge "vp9: Add feature to copy partition from the last frame." 2016-12-20 21:46:44 +00:00
Kaustubh Raste
8a152a55f7 Merge "Add mips msa vp9 intrapred tests" 2016-12-20 02:27:08 +00:00
Jerome Jiang
1d5ca84df6 vp9: Add feature to copy partition from the last frame.
Add feature to copy partition from the last frame.
The copy is only done under certain conditions that SAD is below threshold.
Feature is currently disabled, until threshold is tuned.
Feature will be initially used for Speed 8 (ARM).

Under extreme case of always copying partition for speed 8:
Encode time is reduced by 5.4% on rtc_derf and 7.8% on rtc.
Overall PSNR reduced by 2.1 on rtc_derf and 0.968 on rtc.

Change-Id: I1bcab515af3088e4d60675758f72613c2d3dc7a5
2016-12-19 16:24:03 -08:00
Gabriel Marin
85aead1790 Merge "Simplify address arithmetic in vp9_optimize_b" 2016-12-19 23:25:39 +00:00
James Zern
80474bf65e Merge "vpx_idct32x32_1024_add_neon: quiet uninitialized warning" 2016-12-19 22:39:01 +00:00
Marco Paniconi
c1f5194842 Merge "vp9 denoiser: Fix the logic for re-evaluating zeromv after denoising." 2016-12-19 21:15:37 +00:00
Gabriel Marin
0549f5aae9 Simplify address arithmetic in vp9_optimize_b
Simplify address arithmetic on token_costs to reduce the number of generated
instructions that are used for address arithmetic inside routine
vp9_optimize_b. It also helps improve instruction scheduling depending on
compiler and optimization level.

Measured a 9.3% reduction in retired instructions and 5.3% reduction in
execution time for this routine with GCC v4.8.4 and optimization flags -O3,
and a reduction of up to 11.6% in execution time with other compilers.

No change in behavior.

TEST=Verified that encoded files match bit for bit, with and without this
change.
BUG=b/33678225

Change-Id: I6098650fb5cd2aa04e014fe6e68ca20761f3a21f
2016-12-19 13:10:04 -08:00
James Zern
a68b36c752 vpx_idct32x32_1024_add_neon: quiet uninitialized warning
relocate the assignment to 'in' outside of the for loop. this quiets a
spurious warning in visual studio builds since:
86e340c enable vpx_idct32x32_1024_add_neon in hbd builds

+ give the variable a more descriptive name

BUG=webm:1294

Change-Id: I5c3da5c7939621477e0fc0ad3a1b2a3045c5bffd
2016-12-19 12:49:44 -08:00
Marco
6e8dbc76ad vp9: With denoising on, only estimate noise level for higher resolns.
Allow it for resolns above 640x360 for now.

Change-Id: I087d0d8173f96b316164fdd4a499110ce2e7a233
2016-12-19 10:05:54 -08:00
Marco
61b569b461 vp9 denoiser: Fix the logic for re-evaluating zeromv after denoising.
Correctly set interp_filter to SWITCHABLE for INTRA mode.
Also reduce threshold on noise level for re-evaluating zeromv.

Change-Id: Id32c01e193209fb380aa07204f0be3babf29f70a
2016-12-19 09:30:16 -08:00
Linfeng Zhang
7e23f895ca Merge "Clean hbd idct 4x4 neon functions and other" 2016-12-19 17:09:26 +00:00
Kaustubh Raste
1f3e079a35 Add mips msa vp9 intrapred tests
Change-Id: I49b91464a87cad8692f4b1477e45e5f567b4fe87
2016-12-19 17:32:38 +05:30
Johann Koenig
9b63cb057a Merge "post proc test: add padding for sse2 tests" 2016-12-17 01:12:34 +00:00
Marco Paniconi
d1eca240fb Merge "vp9: Change condition to enable recheck_zeromv_after_denoising." 2016-12-16 23:53:33 +00:00
Marco
4260a7f2b3 vp9: Change condition to enable recheck_zeromv_after_denoising.
For when denoising enabled: change condition to enable
the recheck_zeromv_after_denoising for only very high noise level.
This is causing an issue, so enabling it for very high noise
to effectively shut it off.

Change-Id: Ic40d6025f3f398338cedd270d17c0ccd9a3daa84
2016-12-16 15:00:21 -08:00
Johann
5993b808f0 post proc test: add padding for sse2 tests
Avoid valgrind warnings for reading out of bounds when the width is not
divisible by 16.

Change-Id: I5670d7cfbbce00874b98cfb7472f99c7936c2c47
2016-12-16 14:06:06 -08:00
Johann
4781a67737 postproc test: disable new down and across test
The new test is causing valgrind failures:
[ RUN      ] SSE2/VpxPostProcDownAndAcrossMbRowTest.CheckCvsAssembly/0
==28923== Invalid read of size 16
28923==    at 0x724016: ??? (deblock_sse2.asm:146)

Disable during investigation. The test is new but the code is not.

Change-Id: I5521e5fd48a595e3798b833bf7e3cc97b81c1975
2016-12-16 12:19:00 -08:00
Jim Bankoski
318a1ff5ec vp8 : use threading mutex's for tsan only.
To avoid decode performance hit of 2% when running on hyperthreaded
cores.

This patch only uses the mutex's when we are running tsan.

This is safe because 32 bit operations like read and store are atomic
on all the platforms we care about. Tsan warns about race situations,
but in this case either situation ( read occurs before write or write
before read) the worst case is that we go around one extra time in the
loop.  So the ordering doesn't really matter.

That said a few other things have been tried :

for instance as per here:
webrtc/base/atomicops.h#52

In this patch they use:
__atomic_load_n(i, __ATOMIC_ACQUIRE);
__atomic_store_n(i, value, __ATOMIC_RELEASE);

This code works on gcc, clang ( replacing protected write and read), and
avoids tsan errors. Incurring no penalty in performance.  In C11 its
replaced by straight atomic operands.

However there is no equivalent in the visual studio's we support as
int32 on all windows platforms is already atomic.  To avoid tsan like
warnings on windows we'd need to use interlocked exchange and the
end result doesn't gain us any thing.

Change-Id: I2066e3c7f42641ebb23d53feb1f16f23f85bcf59
2016-12-16 08:50:55 -08:00
Marco Paniconi
2b1ec65b5d Merge "vp9: Fix to usage of flag USE_ALTREF_FOR_ONE_PASS" 2016-12-15 19:48:16 +00:00
Johann
41b0888a84 postproc: neon down and across macroblock filter
Implement vpx_post_proc_down_and_across_mb_row in NEON.
Runs about 6-7x faster than C.

BUG=webm:1320

Change-Id: Ic5c7d3552a88cfcf999ec5bf2bd46fee460642c2
2016-12-14 15:11:28 -08:00
Marco
5de798f2b2 vp9: Fix to usage of flag USE_ALTREF_FOR_ONE_PASS
The flag USE_ALTREF_FOR_ONE_PASS allows for alt-ref lookahead
in 1 pass vbr (from https://chromium-review.googlesource.com/#/c/365498).
This change is to make sure this macro flag only has effect if
the config flag cpi->oxcf.enable_auto_altef is also on.

No change in ytlive encoding, as USE_ALTREF_FOR_ONE_PASS is not
yet enabled.

Change-Id: I1a69681e4a15c5244581a3dab4587fca08f02e0f
2016-12-14 15:07:38 -08:00
Linfeng Zhang
c8f25fa5c0 Clean hbd idct 4x4 neon functions and other
BUG=webm:1301

Change-Id: I387b7eae716a7df15c691dc6f368b07602df7342
2016-12-14 11:38:28 -08:00
Yaowu Xu
27e1bacdb3 Change order of operation to avoid ubsan warnings
This commit change an order of operation to avoid left shifts of
negative numbers.

Change-Id: I607c7eb91658c7a5ef397fc1504721d1b10e3dd6
2016-12-14 09:37:14 -08:00
Linfeng Zhang
3dd20456ab Merge "Update idct test code to test 8-bit & high bitdepth simultaneously" 2016-12-14 17:05:34 +00:00
Linfeng Zhang
201dcefafe Update idct test code to test 8-bit & high bitdepth simultaneously
Change-Id: Icc0eb9c0ddf2a13ec832877a089450972134e8ec
2016-12-13 17:25:04 -08:00
James Bankoski
3486abd54a Merge "Reapply 'Amend and improve VP8 multithreading implementation'" 2016-12-14 01:21:50 +00:00
James Zern
86e340c76e enable vpx_idct32x32_1024_add_neon in hbd builds
BUG=webm:1294

Change-Id: Ibdda54e6d1303b0f73bc7bc71417e4041d7618de
2016-12-12 19:28:35 -08:00
Jim Bankoski
85a541a421 Reapply 'Amend and improve VP8 multithreading implementation'
Reapply this patch:
ff0107f Amend and improve VP8 multithreading implementation

Amended the patch to add a unit test, and fix an asan error.

BUG=webm:851

Change-Id: I6572c03256169c64e80248bf5a5e99f59a2fc93c
2016-12-13 02:11:34 +00:00
Linfeng Zhang
5d4aa325a6 Cosmetics by unifying dest_stride to stride in idct
Change-Id: Ie9336a808a3c3592bb4fd5d4ad3839028bfcafba
2016-12-12 15:13:22 -08:00
James Bankoski
282f3b3d78 Merge "vp8: adds multithread testing." 2016-12-10 00:01:32 +00:00
Marco Paniconi
817488be47 Merge "vp9: Fix to crash in svc code." 2016-12-09 23:47:02 +00:00
Jim Bankoski
121e161115 vp8: adds multithread testing.
The test is disabled because of TSAN errors until we resolve
BUG=webm:851

Change-Id: I0b21c8d815bc1ea365da024b1e2ee5e1fc5715c2
2016-12-09 15:05:59 -08:00
Johann
2c24f7178d Move load_and_transpose to transpose_neon.h
Allows for use outside the idcts without pulling in idct_neon.h

Change-Id: I4a94c1af3dac3e1b5bc8296ec9eab0ddcc8cfecf
2016-12-09 12:54:55 -08:00
Marco
076d4bd91a vp9: Fix to crash in svc code.
use_base_mv assumes 2x2 scaling, so fix is to shutoff
this feature unless spatial scale factors are 2.

Added svc unittest for 2 spatial layers with 5x5 scaling,
which generates the issue without this fix.

Also fix some settings in svc unittest:
let the speed setting vary (from 5 to 8), and enable static threshold.

BUG=webm:1344

Change-Id: Idfd0a6c633c21b49a0479601506302cfe974e30e
2016-12-09 08:57:09 -08:00
James Zern
7ba9d31e3f Merge "idct16x16_add_neon: fix arm visual studio builds" 2016-12-09 03:19:16 +00:00
Marco
cd6f742980 vp8 multi_res_encoder: Ajust some settings in sample encoder.
Set #threads to default 1 for all streams, change bit allocaton
for 3 temporal layers, and enable denoiser on middle resolution layer.

Change-Id: I4a57adbfdb2c319002b8f3cf359613842dc00d75
2016-12-08 15:27:16 -08:00
James Zern
6defef4ab2 idct16x16_add_neon: fix arm visual studio builds
after:
2d3d95f enable vpx_idct16x16_256_add_neon in hbd builds

reorder INCLUDEs and fix indent of IF/ENDIFs

remove vpx_config.asm to avoid multiple symbol definitions in windows
builds and shift idct_neon.asm.S to the top to allow use of
CONFIG_VP9_HIGHBITDEPTH in the export list.

Change-Id: I0dacfbae62a6ec8fe4a26940c1a52da2dfad2029
2016-12-08 15:17:57 -08:00
Yunqing Wang
880adc3355 Merge "Remove an unused first pass statistic" 2016-12-08 22:46:44 +00:00
Yunqing Wang
394020383d Remove an unused first pass statistic
One of the first pass stats "new_mv_count" is no longer used in VP9,
and is removed. This also makes it easy to implement a multi-threaded
first pass. This change doesn't affect the coding performance, which
has been verified by borg tests.

Change-Id: I4c7c7bf9465fda838eb230814ef0c631c068c903
2016-12-07 15:32:25 -08:00
Marco Paniconi
e4c6f8fde7 Merge "vp9: Fix some TODOs in svc code." 2016-12-07 22:06:01 +00:00
Linfeng Zhang
385599b553 Merge "Update TEST_P(PartialIDctTest, RunQuantCheck)" 2016-12-07 21:05:05 +00:00