Commit Graph

304 Commits

Author SHA1 Message Date
Martin Storsjö fd60097eb2 checkasm: aarch64: Print the SVE vector length, if available 2024-03-04 23:04:51 +02:00
Henrik Gramner 85a10359cd checkasm: Add --list-cpuflags option
Prints a list of cpuflags available for the current architecture.

Flags which are supported on the current system will be printed in
green, and flags which are unsupported in red with a ~ prefix.
2024-02-29 00:13:23 +00:00
Arpad Panyik acc1121d2f Extend Arm and AArch64 run-time CPU feature detection
Add run-time CPU feature detection for DotProd, i8mm, SVE and SVE2.
SVE and SVE2 are AArch64-only features.
2024-02-28 16:32:28 +00:00
Nathan E. Egge 52948bbfcc riscv/checkasm: Print the RVV vector length, if available 2024-02-26 18:07:11 -05:00
Arpad Panyik f1d42ae8f1 AArch64: Enable benchmarks for 8-tap sharp filters
The 6-tap sub-pel filter specialisation uses different code paths for
sharp (8-tap) and regular/smooth (6-tap) filtering kernels.

This patch enables benchmarking for the different code paths.
2024-02-22 08:58:17 +01:00
Henrik Gramner 83ae3e9a47 checkasm: Improve msac tests
* Process the entire buffer to get better coverage of eob handling.

* Use a more reasonable buffer size.

* Ignore trailing dif bits to allow for more implementation flexibility.
2024-02-21 11:17:41 +00:00
Henrik Gramner bb26bdca06 tests: Automatically determine job count in dav1d_argon.bash
Default to using the number of logical cores divided by thread count.
2024-02-18 15:37:04 +01:00
Nathan E. Egge a6878be7e0 Alphabetize architecture defines and usage 2024-01-31 06:04:21 -05:00
Nathan E. Egge e67f630613 checkasm: riscv64: Print modified register names 2024-01-31 06:04:21 -05:00
Nathan E. Egge e7660b8b24 checkasm: riscv64: Add stack canary test 2024-01-31 06:04:21 -05:00
Nathan E. Egge 8ee8b9eba1 checkasm: Implement riscv64 checked_call() 2024-01-31 06:04:21 -05:00
Nathan E. Egge 43ee02a99c riscv64/itx: Add 4-point 8bpc RVV idtx transform
inv_txfm_add_4x4_identity_identity_0_8bpc_c:      534.6 ( 1.00x)
inv_txfm_add_4x4_identity_identity_0_8bpc_rvv:     72.2 ( 7.40x)
inv_txfm_add_4x4_identity_identity_1_8bpc_c:      534.7 ( 1.00x)
inv_txfm_add_4x4_identity_identity_1_8bpc_rvv:     72.3 ( 7.40x)
2024-01-31 06:04:19 -05:00
Nathan E. Egge 7362fcf653 riscv: Add support for checkasm --bench 2024-01-30 12:16:54 -05:00
Henrik Gramner 227c37f74a Use a constant length for progress reporting in dav1d_argon.bash 2024-01-24 00:29:54 +00:00
Henrik Gramner cdb2a1a27b Avoid printing full path names in dav1d_argon.bash
Only print the paths relative to the argon directory. This avoids
excessive terminal line wrapping due to long path names which
otherwise interferes with the '\r' usage for progress reporting.
2024-01-24 00:29:54 +00:00
Matthias Dressel 2c9bbb4908 meson: Add 'enable_seek_stress' option
Allows to explicitly enable/disable seek-stress tests.
2024-01-23 17:47:46 +00:00
jinbo 38bc00849a loongarch: Improve the performance of msac series functions
Relative speedup over C code:

msac_decode_bool_c:                            0.5 ( 1.00x)
msac_decode_bool_lsx:                          0.5 ( 1.09x)
msac_decode_bool_adapt_c:                      0.7 ( 1.00x)
msac_decode_bool_adapt_lsx:                    0.6 ( 1.20x)
msac_decode_symbol_adapt4_c:                   1.3 ( 1.00x)
msac_decode_symbol_adapt4_lsx:                 1.0 ( 1.30x)
msac_decode_symbol_adapt8_c:                   2.1 ( 1.00x)
msac_decode_symbol_adapt8_lsx:                 1.0 ( 2.05x)
msac_decode_symbol_adapt16_c:                  3.7 ( 1.00x)
msac_decode_symbol_adapt16_lsx:                0.8 ( 4.77x)
2024-01-21 15:31:46 +08:00
yuanhecai 2e952f300f Add loongarch support 2024-01-21 15:06:52 +08:00
Henrik Gramner d23e87f7ae checkasm: Prefer sigsetjmp()/siglongjmp() over SA_NODEFER
Also prefer re-setting the signal handler upon intercept in combination
with SA_RESETHAND over re-raising exceptions with the SIG_DFL handler.
2024-01-11 12:35:34 +00:00
Henrik Gramner 8501a4b201 checkasm: Make signal handling async-signal-safe 2024-01-11 12:35:34 +00:00
Henrik Gramner 8ba0df8492 checkasm: Fix cdef_dir function prototype 2023-12-19 12:11:46 +01:00
Martin Storsjö 5149b27447 checkasm: Map SIGBUS to the right error text
This was missed in 2ef970a885.

Also print this text for EXCEPTION_IN_PAGE_ERROR on Windows.
2023-12-15 14:10:01 +02:00
Henrik Gramner e47a39ca95 x86: Fix 8bpc AVX2 ipred_z2 filtering with extremely large frame sizes
The max_width/max_height values can exceed 16-bit range.
2023-11-12 22:52:18 +01:00
Martin Storsjö 2179b30c84 checkasm: Fix catching crashes on Windows on ARM
longjmp on Windows uses SEH to unwind on ARM/ARM64 too, just like on
x86_64, thus use RtlCaptureContext/RtlRestoreContext instead of
setjmp/longjmp on those architectures as well.
2023-11-01 19:28:07 +02:00
Henrik Gramner d2ee43892b checkasm: Improve DSP trimming error message 2023-11-01 14:43:19 +01:00
Henrik Gramner 611abc20db checkasm: Add missing WINAPI_PARTITION checks on Windows
Some functionality is only available on WINAPI_PARTITION_DESKTOP systems.
2023-11-01 14:43:19 +01:00
Henrik Gramner 6bc552eb28 checkasm: Enable virtual terminal processing on Windows
This allows for the use of standard VT100 escape codes for text coloring,
which simplifies things by eliminating a bunch of Windows-specific code.

This is only supported since Windows 10. Things will still run on
older systems, just without colored text output.
2023-11-01 14:43:18 +01:00
Henrik Gramner 0f2a877e7e checkasm: Check for errors in command line parsing 2023-11-01 13:59:46 +01:00
Matthias Dressel 9278a14cf4 checkasm: Always bench C-only functions as well
Integrates --bench-c into --bench to simplify benchmarks.
2023-07-12 19:38:06 +02:00
Matthias Dressel fc40a0db51 checkasm: document '-t' in --help text 2023-07-07 21:21:51 +02:00
Henrik Gramner 852cc3409f Move palette packing/edge-extension into a DSP function 2023-07-06 23:12:43 +02:00
Henrik Gramner 72e9c7c095 Pack palette indices
Pack two indices into each byte instead of storing them separately.

Reduces memory usage by up to 16 kB per sb128 in streams that uses
screen content tools when frame-threading is enabled, at the cost
of some additional computational overhead for packing/unpacking.
2023-07-06 23:10:22 +02:00
Henrik Gramner 233a424c38 Use pixel instead of uint16_t for palette buffers
Reduces memory usage by 6 kB per sb128 in 8bpc streams that
uses screen content tools when frame-threading is enabled.
2023-07-06 23:10:22 +02:00
Victorien Le Couviour--Tuffet a500abb750 x86: Add refmvs.load_tmvs asm 2023-06-30 21:34:31 +02:00
Henrik Gramner 8ddb28e5a7 fuzzer: Don't zero-initialize Dav1dSequenceHeader
It's not required by the API and would only risk masking potential bugs.
2023-05-29 12:19:53 +02:00
Henrik Gramner 922bd82b4e x86: Add 8-bit ipred z2 SSSE3 asm 2023-03-25 14:29:15 +00:00
Victorien Le Couviour--Tuffet 8c731791c7 checkasm: Improve mv generation for refmvs.save_tmvs 2023-03-23 15:44:03 +01:00
Victorien Le Couviour--Tuffet 6b8438b193 x86: Add refmvs.save_tmvs AVX2 asm 2023-03-06 13:36:22 +00:00
Martin Storsjö 5c9d651edc Add a -j option to dav1d_argon.bash 2023-03-01 19:59:10 +01:00
Matthias Dressel e43904ca48 Add script to test against argon samples
Co-authored-by: Henrik Gramner <gramner@twoorioles.com>
2023-03-01 19:59:10 +01:00
Henrik Gramner 440cf2ee0e checkasm: Only print nop measurements when using --verbose 2023-02-28 17:50:27 +01:00
Henrik Gramner 9e522d7a00 checkasm: Make --bench output horizontally aligned
Improves readability.
2023-02-28 17:50:27 +01:00
Henrik Gramner 33da5a6c04 checkasm: Update --bench to also print relative performance numbers 2023-02-28 17:50:25 +01:00
Henrik Gramner 45592d5edc checkasm: Fix report() output with --bench-c
It would previously print the full report() info for C functions
(with broken horizontal alignment as a side effect).
2023-02-27 17:22:52 +01:00
Martin Storsjö ef0fb0b6fc Fix building with MSVC after recent commit
98b0c96d21 added an include of
src/ref.h in src/fg_apply_tmpl.c. That template source file is
included in tests/checkasm/filmgrain.c.

src/ref.h includes <stdatomic.h>. Including this file requires
declaring a dependency on stdatomic_dependencies in meson, which
provides the fallback implementation of stdatomic.h when building
with MSVC.
2023-02-27 01:04:25 +02:00
Luca Barbato aa15e3ea74 checkasm: Print the cpu extension along the function name when listing functions 2023-02-23 15:24:07 +01:00
Martin Storsjö 77b3955537 checkasm: Add an --affinity= option for selecting a CPU core
Add an option for selecting the core where the single thread of
checkasm runs. This allows benchmarking on specific CPU cores on
heterogenous CPUs, like ARM big.LITTLE configurations.

On Linux, one can easily wrap an invocation of checkasm with
"taskset -c <n> [...]" - so this option isn't very essential
there - however it is quite useful on Windows.

On Windows, it is somewhat possible to do the same by launching
the tool with "start /B /affinity <hexmask> [...]", but that
doesn't work well with scripting ("start" returns before the
command has finished running, and it's not obvious how to
invoke "start" from within WSL).

Using "taskset" to launch processes on specific cores within WSL
on Windows doesn't work - regardless of the Linux level affinity,
the process ends up running on the performance cores anyway.
2023-01-31 15:33:58 +02:00
Martin Storsjö 2e990b370e checkasm: ipred: Iterate 5 times for each Z1/Z2/Z3 function
These functions contain a number of different codepaths; try to
make sure that we hit most codepaths for each size combination.

This both gives better test coverage in one single run of checkasm,
but also should give a better averaged runtime in benchmarks.
2023-01-27 23:54:20 +02:00
Henrik Gramner 0d6a31f275 x86: Remove stack alignment compiler flags
The intent was good, but in practice it results in a significant
amount of problems due to various compiler bugs for negligible gains.
2023-01-12 01:49:39 +01:00
Henrik Gramner 95d19071f9 checkasm: Fix integer overflow in refmvs test 2022-12-13 21:50:11 +01:00