1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

6147 Commits

Author SHA1 Message Date
Andreas Rheinhardt
fca796ac3b tests/checkasm/sw_rgb: Be more strict about clobbering MMX state
The MMXEXT versions of the rgb2rgb functions tested here
always emit emms on their own. Therefore one can use
a stricter test to ensure that it stays that way.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-09 12:03:47 +02:00
Andreas Rheinhardt
4482b3353d avformat/vvc: Don't use ff_copy_bits()
There is no benefit in using it: The fast path of copying
is not taken because of misalignment; furthermore we are
only dealing with a few byte here anyway, so simply copy
the bytes manually, avoiding the dependency on bitstream.c
in lavf (which also contains a function that is completely
unused in lavf).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-09 10:59:33 +02:00
Nuo Mi
f68f40736f avcodec/vvcdec: support mv wraparound
A 360 video specific tool
see https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9503377

passed files:
    DMVR_A_Huawei_3.bit
    WRAP_D_InterDigital_4.bit
    WRAP_A_InterDigital_4.bit
    WRAP_B_InterDigital_4.bit
    WRAP_C_InterDigital_4.bit
    ERP_A_MediaTek_3.bit
2024-06-08 17:45:55 +08:00
Rémi Denis-Courmont
8d117024fe checkasm: disable unaligned access emulation
The OS may silently fix (emulate) unaligned hardware access exceptions.
This is extremely slow and code should be fixed not to rely on unaligned
access on affected hardware. Accordingly this requests that the OS
disable emulation and instead throw Bus error, which will be caught by
checkasm's signal handler.

This has no effects if the hardware supports unaligned access in
hardware, since no exceptions are generated. prctl() will fail safe in
that case.
2024-06-07 17:53:05 +03:00
Zhao Zhili
47ba87551c checkasm/sw_rgb: test rgb24/bgr24 to yuv
The line width 8 is supposed to test corner case, while the
performance doesn't matter. Width 1080 is also a case of
unaligned to 16.

Width 1920 meant for benchmark (together with --runs options).

Signed-off-by: James Almer <jamrial@gmail.com>
2024-06-05 15:22:49 -03:00
Anton Khirnov
e4601cc339 lavc/hevc*: move to hevc/ subdir 2024-06-04 11:46:27 +02:00
Rémi Denis-Courmont
be6f8c439a checkasm: add aacencdsp.quant_bands test 2024-06-03 22:43:37 +03:00
Lynne
b3212797ae
fate: add tests for xHE-AAC
Starting off small with a few features.
Samples and reference decoded files copied from the official ISO
reference suite.
2024-06-02 18:34:46 +02:00
Rémi Denis-Courmont
fc85aff72f checkasm: add linear least square tests 2024-06-01 18:05:58 +03:00
James Almer
0a949aacae checkasm/lpc: use fixed length to bench apply_welch_window
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-31 17:06:08 -03:00
Rémi Denis-Courmont
16132a810d checkasm/lpc: test compute_autocorr
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-31 16:36:43 -03:00
Rémi Denis-Courmont
98405d28fa checkasm/float_dsp: add double-precision scalar product 2024-05-31 22:22:43 +03:00
James Almer
4008a80c1b tests/checkasm/vvc_mc: don't zero the SAD buffers
They will be filled immediately after.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-31 20:05:21 +08:00
James Almer
b70289f354 tests/checkasm/vvc_mc: fix indentation
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-31 20:05:21 +08:00
Wu Jianhua
442e94e5e4 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>
2024-05-31 19:57:31 +08:00
Pierre-Anthony Lemieux
249c66bb22
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>
2024-05-30 21:30:52 -07:00
Rémi Denis-Courmont
8a96495fef checkasm/vp8dsp: add VP7 tests 2024-05-30 18:30:52 +03:00
Rémi Denis-Courmont
a3d4c73b4e checkasm/vp8dsp: share DSP context across tests
This will simplify later changes.
2024-05-30 18:30:52 +03:00
Stone Chen
d82c503555 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.
2024-05-29 21:35:34 +08:00
Rémi Denis-Courmont
44f7f6e010 checkasm: add h263dsp.{h,v}_loop_filter 2024-05-27 22:42:07 +03:00
Andreas Rheinhardt
41e1322845 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>
2024-05-27 19:04:09 +02:00
Andreas Rheinhardt
e9197db4f7 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>
2024-05-25 14:21:54 +02:00
Rémi Denis-Courmont
d03cdfa2b6 checkasm/riscv: test misaligned before V
Otherwise V functions mask scalar misaligned ones.
2024-05-24 17:53:43 +03:00
James Almer
0920f506a7 checkasm/flacdsp: add a test for lpc33
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-24 09:23:00 -03:00
Stone Chen
2e877090f9 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>
2024-05-22 20:36:46 -03:00
James Almer
3bd7e3a336 avformat/vvc: initialize some ptl flags
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-22 17:46:49 -03:00
Martin Storsjö
6093367147 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>
2024-05-21 19:20:06 +03:00
Lynne
d43e123837
checkasm: print bench runs when benchmarking
Helps make sense of the possible noise in the results.
2024-05-21 17:48:48 +02:00
J. Dekker
b1adf6d1d0 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>
2024-05-21 16:47:45 +02:00
Martin Storsjö
a9dc7dd7fd 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.
2024-05-21 20:20:50 +08:00
Nuo Mi
aa8d5c6e7e avcodec/vvcdec: add vvc inter filters for RPR 2024-05-21 20:20:25 +08:00
Andreas Rheinhardt
d7fdd502d6 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>
2024-05-20 00:08:51 +02:00
Andreas Rheinhardt
eee88ba0dc 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>
2024-05-19 11:39:45 +02:00
Andreas Rheinhardt
41fc62f2e8 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>
2024-05-19 11:39:35 +02:00
James Almer
7e59f02c14 fate/lavf-container: add a test for VVC in mp4 muxing
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-18 13:30:32 -03:00
James Almer
415dfa89e2 avformat/vvc: fix writing general_constraint_info bytes
The existing implementation was completely broken.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-18 11:33:46 -03:00
James Almer
727a603158 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>
2024-05-17 17:04:08 -03:00
Andreas Rheinhardt
784672b833 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>
2024-05-17 13:36:03 +02:00
Andreas Rheinhardt
9126705e6e tests/checkasm/vf_blend: Update function type
Forgotten in 5b8faaad6c,
a69a0b689c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:35:33 +02:00
Andreas Rheinhardt
caec57eb3a tests/checkasm/vf_bwdif: Use correct function pointer type
Forgotten in fa06f48371.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:31:37 +02:00
Andreas Rheinhardt
4c57cbda67 tests/checkasm/vf_colorspace: Use correct function pointer type
Forgotten in 9b26a8077f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:31:23 +02:00
Andreas Rheinhardt
e3de22e307 tests/checkasm/vvc_mc: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:31:09 +02:00
Andreas Rheinhardt
6c0994864e tests/checkasm/vp8dsp: Use correct function pointer type
Forgotten in a54e53a1c4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:30:17 +02:00
Andreas Rheinhardt
dcbdcc3bf5 tests/checkasm/motion: Use correct function pointer type
Forgotten in abb85429f3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:30:06 +02:00
Andreas Rheinhardt
99135a2f8b tests/checkasm/llviddsp: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:29:51 +02:00
Andreas Rheinhardt
631636e582 tests/checkasm/huffyuvdsp: Use correct function pointer type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:29:34 +02:00
Andreas Rheinhardt
895dd370a2 tests/checkasm/hevc_*: Fix funtion pointer types
Forgotten in b3bbbb14d0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-17 13:28:20 +02:00
Andreas Rheinhardt
dff0a1557e 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>
2024-05-17 13:16:58 +02:00
James Almer
8670615743 checkasm/h264dsp: add missing pixel_mask values
Fixes "runtime error: index 4 out of bounds for type 'uint32_t [3]'" errors
after commit 4ced36744e.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-14 23:17:30 -03:00
James Almer
e9741f1a6b fate/checkasm: test vvc_alf
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-14 22:58:21 -03:00