Commit Graph

6133 Commits

Author SHA1 Message Date
Rémi Denis-Courmont
f2a38bd7df checkasm/lpc: test compute_autocorr
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-06-01 18:25:42 +02:00
Rémi Denis-Courmont
d261039da9 checkasm/float_dsp: add double-precision scalar product
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 21:53:42 +02:00
James Almer
4a8f4e5e4d tests/checkasm/vvc_mc: don't zero the SAD buffers
They will be filled immediately after.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 14:50:27 +02:00
James Almer
054b0d38ba tests/checkasm/vvc_mc: fix indentation
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 14:50:27 +02:00
Wu Jianhua
ac5637ae71 tests/checkasm/vvc_alf: change alf step size to 8
From Benjamin Bross:
> for ALF where functions are in increments of 4 while 8 should be sufficient according to the spec.

Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 14:50:27 +02:00
Pierre-Anthony Lemieux
62e094904a avcodec/jpeg2000dec: fix HT block decoder
Addresses https://trac.ffmpeg.org/ticket/10905

Co-authored-by: Osamu Watanabe <owatanab@es.takushoku-u.ac.jp>
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 10:09:00 +02:00
Rémi Denis-Courmont
48bcee416b checkasm/vp8dsp: add VP7 tests
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 10:09:00 +02:00
Rémi Denis-Courmont
e65e9c389c checkasm/vp8dsp: share DSP context across tests
This will simplify later changes.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 10:09:00 +02:00
Stone Chen
434c941f59 tests/checkasm/vvc_mc: for SAD, only test valid subblock sizes
According to the VVC specification (section 8.5.1), the maximum width/height of a subblock passed for DMVR SAD is 16. This along with previous constraint requiring width * height >= 128 means that  8x16, 16x8, and 16x16 are the only allowed sizes.

This changes check_vvc_sad() to only test and benchmark those sizes.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-31 10:08:59 +02:00
Rémi Denis-Courmont
1ebc732fff checkasm: add h263dsp.{h,v}_loop_filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-28 16:28:05 +02:00
Andreas Rheinhardt
67d868a876 tests/fate/source-check: Relax BSD licence check
Several files already had standard license header (namely
2-clause BSD files), yet due to the 80 char line length limit,
they were not treated as such by source-check.sh (which
fate-source uses). Therefore relax the BSD check.

Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Reviewed-by: Pierre-Anthony Lemieux <pal@sandflow.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-28 16:28:05 +02:00
Andreas Rheinhardt
6fbe3bc7ba tests/checkasm/vvc_alf: Don't use declare_func_emms
VVC does not have MMX code at all, so one can use the stricter
declare_func to also check that the MMX state has not been clobbered
with (which would be an ABI violation).

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-25 15:28:18 +02:00
Rémi Denis-Courmont
b575460b82 checkasm/riscv: test misaligned before V
Otherwise V functions mask scalar misaligned ones.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-24 22:47:42 +02:00
James Almer
aea36dcee7 checkasm/flacdsp: add a test for lpc33
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-24 22:47:41 +02:00
Stone Chen
b9be32cced tests/checkasm: Add check_vvc_sad to vvc_mc.c
Adds checkasm for DMVR SAD AVX2 implementation.

Benchmarks ( AMD 7940HS )
vvc_sad_8x8_c: 50.3
vvc_sad_8x8_avx2: 0.3
vvc_sad_16x16_c: 250.3
vvc_sad_16x16_avx2: 10.3
vvc_sad_32x32_c: 1020.3
vvc_sad_32x32_avx2: 60.3
vvc_sad_64x64_c: 3850.3
vvc_sad_64x64_avx2: 220.3
vvc_sad_128x128_c: 14100.3
vvc_sad_128x128_avx2: 840.3

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:01 +02:00
James Almer
029500ce24 avformat/vvc: initialize some ptl flags
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:01 +02:00
Martin Storsjö
9b77a199ac checkasm: h264dsp: Avoid out of buffer writes when benchmarking
The loop filters can write before the pointer given to them;
the actual test invocations correctly used an offset, while
the benchmark calls were lacking an offset. Therefore, when
running with benchmarking, these tests could have spurious
failures.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:00 +02:00
Lynne
6c3a274901 checkasm: print bench runs when benchmarking
Helps make sense of the possible noise in the results.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:00 +02:00
J. Dekker
590308ef40 checkasm: add runs argument to adjust during bench
Some timers on certain device and test combinations can produce noisy
results, affecting the reliability of performance measurements. One
notable example of this is the Canaan K230 RISC-V development board.

An option to adjust the number of samples by an exponent (--runs) has
been added, allowing developers to increase the sample count for more
reliable results.

Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:00 +02:00
Martin Storsjö
22050228c6 checkasm: vvc_alf: Limit benchmarking to a reasonable subset of functions
Don't benchmark every single combination of widths and heights;
only benchmark cases which are squares (like in vvc_mc.c).

Contrary to vvc_mc, which increases sizes by doubling dimensions,
vvc_alf tests all sizes in increments of 4. Limit benchmarking to
the cases which are powers of two.

This reduces the number of benchmarked cases from 3072 down to 18.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:03:00 +02:00
Nuo Mi
d97e8b20de avcodec/vvcdec: add vvc inter filters for RPR
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-23 22:02:59 +02:00
Andreas Rheinhardt
f3f3ecfd01 tests/ref/fate/source: Add exceptions for riscv startcode files
Fixes fate-source.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-21 00:02:14 +02:00
Andreas Rheinhardt
6ec29c9752 avcodec/decode: Set KEY flag+pict_type generically for intra-only codecs
This commit is the analog of 3f11eac757
for decoding: It sets the AV_FRAME_FLAG_KEY and (for video decoders)
also pict_type to AV_PICTURE_TYPE_I. It furthermore stops setting
audio frames as always being key frames -- it is wrong for e.g.
TrueHD/MLP. The latter also affects TAK and DFPWM.

The change already improves output for several decoders where
it has been forgotten to set e.g. pict_type like speedhq, wnv1
or tiff. The latter is the reason for the change to the exif-image-tiff
FATE test reference file.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-19 15:33:55 +02:00
Andreas Rheinhardt
8bcc57d5b6 avcodec/codec_desc, jvdec: JV is not intra-only
It reuses the previous frame and does not code unchanged blocks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-19 15:33:55 +02:00
James Almer
cc5c2ba166 fate/lavf-container: add a test for VVC in mp4 muxing
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:13 +02:00
James Almer
953f988d7b avformat/vvc: fix writing general_constraint_info bytes
The existing implementation was completely broken.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:12 +02:00
James Almer
46d5595f54 checkasm/h264dsp: use int64_t scale values
Fixes "signed integer overflow: [varies] * 104858 cannot be represented in type 'int'" errors
under ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
56582dec4a tests/checkasm/sw_gbrp: Use correct function types for calls
E.g. f2de911818 forgot to
add the unused void* here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
f7b4a2150f tests/checkasm/vf_blend: Update function type
Forgotten in 5b8faaad6c,
a69a0b689c3c4e1e0bbf4c17716a25e14332a250.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
88485ee1f1 tests/checkasm/vf_bwdif: Use correct function pointer type
Forgotten in fa06f48371.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
6d78a83178 tests/checkasm/vf_colorspace: Use correct function pointer type
Forgotten in 9b26a8077f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
105116f1f8 tests/checkasm/vvc_mc: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
a32f8af5f2 tests/checkasm/vp8dsp: Use correct function pointer type
Forgotten in a54e53a1c4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
81d93892f0 tests/checkasm/motion: Use correct function pointer type
Forgotten in abb85429f3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
10121f1f61 tests/checkasm/llviddsp: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:11 +02:00
Andreas Rheinhardt
d2016d3659 tests/checkasm/huffyuvdsp: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:10 +02:00
Andreas Rheinhardt
dc43263c22 tests/checkasm/hevc_*: Fix funtion pointer types
Forgotten in b3bbbb14d0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:10 +02:00
Andreas Rheinhardt
1101317540 tests/checkasm/llauddsp: Avoid UB integer overflow
The only multiplicators used in scalarproduct_and_madd_*
are -1, 0 and +1. Yet it is of type int and the checkasm
test uses the complete range of int for it, leading to overflows
that don't happen for actual users.

Fix this by using a more reasonable range for mul: Given
that it is used in v1[i] += v3[i] * mul with v1 being
a 16bit integer, it makes no sense to use values for mul
that don't fit into 16bit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:10 +02:00
James Almer
1835a405fd checkasm/h264dsp: add missing pixel_mask values
Fixes "runtime error: index 4 out of bounds for type 'uint32_t [3]'" errors
after commit 4ced36744ee0bea5fb7a20d1b2926c588f89ea0b.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:09 +02:00
James Almer
1398d20f5a fate/checkasm: test vvc_alf
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-18 19:59:09 +02:00
Rémi Denis-Courmont
8382c30c65 lavu/riscv: CPU flag for fast misaligned accesses
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:48 +02:00
J. Dekker
35e11873a0 checkasm/h264dsp: support checking more idct depths
Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:48 +02:00
Wu Jianhua
a65d3c375b tests/checkasm/vvc_alf: add check_alf_classify
Perforamnce Test (fps):
clip                                      before  after delta
Tango2_3840x2160_60_10_420_27_LD.266      56      115   105.36%
RitualDance_1920x1080_60_10_420_32_LD.266 272     481   76.83%
RitualDance_1920x1080_60_10_420_37_RA.266 303     426   40.59%

Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:48 +02:00
Wu Jianhua
a6c469372d tests/checkasm: add checkasm_check_vvc_alf and check_alf_filter
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-14 22:49:47 +02:00
James Almer
7e87e283ba checkasm/flacdsp: add a test for wasted33
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 23:44:15 +02:00
James Almer
f1ae0b06ef checkasm/flacdsp: add a test for wasted32
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 10:54:07 +02:00
James Almer
b809537d06 checkasm/flacdsp: sanitize lpc arguments
Fixes signed integer overflows as reported by ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 10:54:05 +02:00
James Almer
33ca299ecc checkasm/flacdsp: run lpc benchmarks with an unmodified buffer
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-13 10:54:05 +02:00
Rémi Denis-Courmont
3bc242e279 riscv: add Zvbb vector bit manipulation extension
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-11 18:22:55 +02:00
sunyuechi
271de7f632 checkasm: Fix h264chroma test name
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-05-11 18:22:54 +02:00