Janne Grunau
a32171340e
do not build the allocation fail fuzzer when lto is enabled
...
Link time optimization and '--wrap' seems to not work together.
Fixes #219 .
2018-12-11 13:48:28 +00:00
Janne Grunau
8bc73da355
fuzzing: add memory allocation fail fuzzer
...
Depends on posix_memalign and a linker supporting '--wrap' to wrap
arbitrary symbols.
2018-12-10 22:27:05 +01:00
Janne Grunau
c49680e629
checkasm: replace rand() with xorshift xor128
...
Reduces the aarch64 checkasm run time from 22s to 2.4s.
2018-12-08 19:35:35 +01:00
Henrik Gramner
0b6ee30eab
checkasm: Try to handle crashes more gracefully
...
Attempt to catch SIGFPE, SIGILL, and SIGSEGV and flag the current test as
failed instead of aborting abruptly.
2018-12-07 18:57:18 +01:00
Ronald S. Bultje
c3980e394d
12 bits/component support
2018-12-05 18:21:05 -05:00
Ronald S. Bultje
2e6c8a92d2
Change type of MC intermediates from coef to int16_t
...
Coef was originally chosen to accomodate 12 bits/component with
4 extra precision intermediates + some under/overflow range, but
it turns out that 12 bits/component only uses 2 extra precision
intermediates, so we don't need coef.
2018-12-05 18:17:55 -05:00
Henrik Gramner
d6770f9344
Add ipred_z1 AVX2 asm
2018-12-05 01:42:14 +01:00
Ronald S. Bultje
70fb01d8c7
Make per-width versions of cfl_ac
...
Also use aligned reads and writes in sub_loop, and integrate sum_loop into
the main loop.
before:
cfl_ac_420_w4_8bpc_c: 367.4
cfl_ac_420_w4_8bpc_avx2: 72.8
cfl_ac_420_w8_8bpc_c: 621.6
cfl_ac_420_w8_8bpc_avx2: 85.1
cfl_ac_420_w16_8bpc_c: 983.4
cfl_ac_420_w16_8bpc_avx2: 141.0
after:
cfl_ac_420_w4_8bpc_c: 376.2
cfl_ac_420_w4_8bpc_avx2: 28.5
cfl_ac_420_w8_8bpc_c: 607.2
cfl_ac_420_w8_8bpc_avx2: 29.9
cfl_ac_420_w16_8bpc_c: 962.1
cfl_ac_420_w16_8bpc_avx2: 48.8
2018-12-03 22:10:38 +01:00
Francois Cartegnie
08184fd81d
checkasm: add --list tests
2018-11-28 23:43:39 +01:00
Nathan E. Egge
560dc6848a
Reset the random seed when testing each CPU type.
...
Any benchmark that uses random data as input gives bunk results as it
currently uses differently random data on each run.
This now makes any non-determinism in the tests repeatable across each
call to check_cpu_flags() and checkasm_check_func().
2018-11-27 10:39:27 -05:00
Janne Grunau
bbcaf41155
fuzzer: use dav1d_parse_sequence_header()
...
Should increase function coverage in oss-fuzz to 100%.
2018-11-26 12:51:30 +01:00
David Michael Barr
0e3c21979b
checkasm: Add unit tests for chroma-from-luma subsampling
2018-11-24 00:59:49 +09:00
James Almer
32accaa47f
dav1d_fuzzer: include config.h before other headers
...
Fixes warnings about redefinition of _WIN32_WINNT on Windows targets
introduced by b716083c7a
.
2018-11-20 19:16:11 -03:00
Janne Grunau
b716083c7a
fuzzer: mask all CPU flags under memory sanitizer
2018-11-20 22:01:58 +01:00
Marvin Scholz
b3c522d5c0
build: Only add libdav1d_nasm_objs if needed
...
Current versions of meson have a bug that causes the need to add
the nasm generated objects to checkasm, even though this should
already be covered by the extract_all_objects() for libdav1d.
Meson versions >= 0.48.999 (that is, Meson 0.49 and development
versions states of that on git) fixed this issue so now adding
this is not longer needed.
Adding it regardless would actually cause an error because of
symbols being present twice.
2018-11-19 22:25:41 +01:00
Janne Grunau
623132aca2
checkasm: fix undefined signed int left shift by 31 in loopfilter test
2018-11-17 00:03:28 +01:00
Janne Grunau
14388c3c6b
call dav1d_get_picture() until it returns -EAGAIN for draining
...
With the decoupled decoding data there might be remaining input data during
draining which can cause bitstream parsing errors.
2018-11-15 22:29:05 +01:00
Janne Grunau
a79cebf2e6
dav1d_fuzzer: skip empty frames to avoid assertions after 026069693e
2018-11-14 16:17:12 +01:00
James Almer
026069693e
implement a decoupled decode API
2018-11-13 21:13:27 -03:00
Ronald S. Bultje
2f251bd115
Add a max_width/height argument to angular_ipred_fn
...
This is used in z2 to limit the number of pixels over which the
filter is applied, as per "numPx" in 7.11.2.4 point 4 in the AV1
specification. This only applies to z2, because in z1/3, the edge
filter is (incomprehensibly) lengtened by the opposite side's edge
length, which undoes the limit on the filter length (like a bug
undoing another bug).
I admit the code is getting rather complex, so we may want to
redesign this to make writing SIMD easier.
2018-11-12 16:31:17 +01:00
Henrik Gramner
58fc516596
Split MC blend
...
The mstride == 0, mstride == 1, and mstride == w cases are very different
from each other, and splitting them into separate functions makes it easier
top optimize them.
Also add some further optimizations to the AVX2 asm that became possible
after this change.
2018-11-10 02:40:44 +01:00
Henrik Gramner
e4fbbbce67
Add blend AVX2 asm
2018-11-08 08:32:17 +01:00
Henrik Gramner
8676fda34c
Add blend checkasm unit test
2018-11-08 08:32:17 +01:00
Ronald S. Bultje
47a581a53d
Change emu_edge function argument order for easier SIMD
2018-11-07 20:59:50 +01:00
Ronald S. Bultje
404a8fbfb9
Add emu_edge checkasm unit test
2018-11-07 20:59:50 +01:00
Martin Storsjö
17426a6a44
checkasm: Don't benchmark all the 8tap filters
...
This significantly reduces the runtime when benchmarking. For all
practical cases, it is enough to just benchmark one version of
the 8tap filter.
2018-11-06 14:58:35 +01:00
Martin Storsjö
84b7a86153
checkasm: Extend mc testing for any combination of 2-32 x 2-32, for OBMC
...
av1-1-b8-00-quantizer-55, -56 and -59 actually invokes the mc function
with e.g. 2x16.
2018-11-06 14:54:43 +01:00
Henrik Gramner
22e144fb4c
Add checkasm unit tests for warp8x8 and warp8x8t
2018-11-05 17:52:42 +01:00
Ronald S. Bultje
4a499fd51a
Add AVX2 implementation for SGR looprestoration
...
Total decoding time for first 1000 frames of TwxVOYxoukU:
after: 0m3.761s
before: 0m6.868s
Cycle times:
selfguided_3x3_8bpc_c: 438865.8
selfguided_3x3_8bpc_avx2: 112522.6
selfguided_5x5_8bpc_c: 326938.3
selfguided_5x5_8bpc_avx2: 75850.1
selfguided_mix_8bpc_c: 755980.5
selfguided_mix_8bpc_avx2: 195930.3
2018-11-05 17:32:35 +01:00
Ronald S. Bultje
7d1d7d2807
Add unit test for SGR looprestoration
2018-11-05 17:32:35 +01:00
Janne Grunau
124653109d
fuzzing: limit maximum frame size to 4kx4k
...
Avoid out of memory (2Gb) or time out (25s) issues in oss-fuzz.
2018-10-30 22:58:23 +01:00
Martin Storsjö
fa93b8ffd3
meson: Simplify the name of the checkasm test target
...
This simplifies running specifically this test by "meson test checkasm".
2018-10-30 23:31:51 +02:00
Marvin Scholz
4a535b9fbb
Do not run other tests parallel with checkasm test
...
This would result in weird output, as checkasm outputs several lines.
2018-10-30 13:39:43 +01:00
Marvin Scholz
ea70793450
Add option to include extra testdata tests
2018-10-30 13:39:43 +01:00
Janne Grunau
c52cc17a7e
API: constify Dav1dData and dav1d_data_wrap()
...
Fix #120 .
2018-10-29 21:20:28 +01:00
Ronald S. Bultje
3b02d3a9e5
Add CDEF filter checkasm unit test
2018-10-29 17:16:56 +01:00
Janne Grunau
e74daebe09
libfuzzer: build oss-fuzz fuzzer binaries with meson
...
oss-fuzz's FuzzingEngine requires libc++.
2018-10-28 21:12:20 +01:00
Ronald S. Bultje
dd797aa20b
Add CDEF unit test
2018-10-28 02:03:29 +02:00
Janne Grunau
31634e36e2
libfuzzer: unbreak oss-fuzz build
...
oss-fuzz builds the fuzzing binary out of meson. Local (quoted) includes
should be preferred for headers located in the same directory.
2018-10-26 09:20:11 +02:00
James Almer
367d785a4e
meson: add "-Werror=missing-prototypes" to the list of optional arguments
...
Add duplicate prototypes to ref_mvs.c for now, since ref_mvs.h can't
be included.
Signed-off-by: James Almer <jamrial@gmail.com>
2018-10-25 11:58:06 -03:00
Ronald S. Bultje
a036432316
Fix compiler warning in checkasm/looprestoration.c
2018-10-24 18:32:38 +02:00
James Almer
2982ef9279
libfuzzer: fix a -Wformat warning
2018-10-23 19:56:18 -03:00
Janne Grunau
bc803f00fd
fuzzer: add a multithreaded fuzzer using 2 frame and tile threads
2018-10-23 22:20:44 +02:00
Janne Grunau
f8e918a9f1
fuzzer: add a standalone fuzzing engine 'none'
...
Replaces the boolean 'build_libfuzzer' meson option with 'fuzzing_engine'.
This allows reproducing fuzzing test cases on systems without libfuzzer.
Also prevents regressions in the fuzzing test target since it will be
build by default.
2018-10-23 22:20:44 +02:00
Janne Grunau
a7bc6b8f2e
fuzzer: improve coverage of lib.c
2018-10-23 22:20:44 +02:00
Janne Grunau
520894c6d1
fuzzer: prevent unwanted integer promotion in r32le
...
Fixes an undefined shift in
clusterfuzz-testcase-minimized-dav1d_fuzzer-5685383740784640. Credits to
oss-fuzz.
2018-10-23 22:20:44 +02:00
Henrik Gramner
53194dbc0d
x86: Add filter intra prediction AVX2 asm
2018-10-20 16:59:08 +02:00
Henrik Gramner
93c4bea2d4
x86: Add pal_pred AVX2 asm
2018-10-20 16:56:25 +02:00
Ronald S. Bultje
89c3f53fa5
Fix wiener AVX2 SIMD and related unit test.
2018-10-19 17:37:45 +02:00
David Michael Barr
acfa495a20
checkasm: Add unit tests for chroma-from-luma
2018-10-19 21:26:06 +09:00