Commit Graph
827 Commits
Author SHA1 Message Date
Andreas Rheinhardt a59498db08 avcodec/huffyuvdsp: Remove pix_fmt parameter from ff_huffyuvdsp_init()
It is unused since the mmx add_hfyu_median_pred_int16 function
has been removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-02 02:19:05 +02:00
Andreas Rheinhardt c8fb970a92 avcodec/x86/huffyuvdsp: Remove ff_add_hfyu_median_prediction_mmxext
Superseded by SSE4. This makes the huffyuv decoders ABI compliant,
e.g. nothing messes up the FPU state at all any more. Therefore
the emms_c() can be removed from huffyuvdec.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-02 02:19:04 +02:00
Andreas Rheinhardt eb40b0b6b7 tests/checkasm/huffyuvdsp: Add test for add_hfyu_median_pred_int16
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-02 02:00:49 +02:00
Andreas Rheinhardt b1142ed5be tests/checkasm/huffyuvdsp: Actually test width not multiple of 16
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-02 02:00:49 +02:00
Andreas Rheinhardt dd8730cfe3 tests/checkasm/huffyuvdsp: Actually test masks
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-02 02:00:49 +02:00
Andreas Rheinhardt 7c9d1fd3c0 tests/checkasm/huffyuvdsp: Return early if there is no function to test
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-02 02:00:49 +02:00
Andreas Rheinhardt 406c5a37aa avcodec/x86/vc1dsp_inv_trans: Port to SSE2
No change in performance here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-01 16:50:06 +02:00
Andreas Rheinhardt 3db7a55280 avcodec/x86/vc1dsp_loopfilter: Don't use MMX regs
Up until now ff_vc1_v_loop_filter4_ssse3 used MMX registers
despite being an SSSE3 function. Porting it to XMM registers
didn't lead to any change in benchmarks here, but abides
by the ABI (one function less that does not omit emms).
Unfortunately the size of the function increased by 64B
by this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-08-01 16:50:06 +02:00
Andreas Rheinhardt c6309b5c63 tests/checkasm/h264pred: Avoid declare_func_emms
This is possible after the recent MMX->XMM conversions
and preferable as it makes the test stricter.

Reviewed-by: Niklas Haas <ffmpeg@haasn.dev>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-07-28 00:54:20 +02:00
Andreas Rheinhardt 42970ac7e2 tests/checkasm/checkasm: Map rnd to checkasm_rand_uint32
Before the switch to libcheckasm, rnd returned an unsigned value;
now it only returns a signed value in the range 0..INT_MAX,
so that the sign bit is not random at all. This means that when
rnd is used to initialize four bytes at a time, one bit is not random.
Fix this by mapping rnd to checkasm_rand_uint32().

Reviewed-by: Niklas Haas <ffmpeg@haasn.dev>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-07-28 00:53:50 +02:00
Zuxy Meng 1a0747633c avcodec/x86/h264_intrapred: Deprecate MMX from pred8x8l_horizontal_down_8
Convert use of MMX to SSE2, also fix checkasm test.

Before:
 pred8x8l_horizontal_down_8_sse2:                        33.2 ( 2.53x)
 pred8x8l_horizontal_down_8_ssse3:                       27.8 ( 3.02x)

After:
 pred8x8l_horizontal_down_8_sse2:                        24.3 ( 3.45x)
 pred8x8l_horizontal_down_8_ssse3:                       22.6 ( 3.71x)

Signed-off-by: Zuxy Meng <zuxy.meng@gmail.com>
2026-07-24 19:16:45 -07:00
Zuxy Meng 14dfce5eaf avcodec/x86/h264_intrapred: SSE2 impl. of pred8x8_dc_rv40_8
Deprecate MMX. No change in performance. Also add test coverage in
checkasm.

pred8x8_dc_rv40_mmxext:                                 10.0 ( 1.24x)
pred8x8_dc_rv40_sse2:                                   10.0 ( 1.24x)

Signed-off-by: Zuxy Meng <zuxy.meng@gmail.com>
2026-07-24 19:16:45 -07:00
Martin Storsjö 8e081d3c31 checkasm: sw_ops: Fix building with older versions of Clang
Older versions of Clang (17 and older) errored out on the previous
form like this:

    ./src/tests/checkasm/sw_ops.c:210:9: error: expected expression
      210 |         static_assert(sizeof(src0[1]) >= sizeof(uint32_t[256]), "palette plane too small");
          |         ^
    /usr/include/assert.h:158:24: note: expanded from macro 'static_assert'
      158 | # define static_assert _Static_assert
          |                        ^

While newer versions of Clang merely warned about it:

    ./src/tests/checkasm/sw_ops.c:210:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
      210 |         static_assert(sizeof(src0[1]) >= sizeof(uint32_t[256]), "palette plane too small");
          |         ^
    /usr/include/assert.h:158:24: note: expanded from macro 'static_assert'
      158 | # define static_assert _Static_assert
          |                        ^
2026-07-16 19:49:30 +00:00
Niklas Haas e65dab2b59 swscale/tests/sws_ops: rewrite to test uops directly
Instead of awkwardly reverse-engineering each uop to reflect
it back to the corresponding SwsOp, this leverages the new
compile_uops() API to directly test the uop in question.

This is not only vastly simpler but also fixes several major
shortcomings with the previous design, such as always having
to keep the reflection code in sync for any newly added uop,
or not testing uops that get translated to a packed shuffle
fast path.

The major downside is that arch-specific uops can now no longer
be tested against the C reference unless we specifically add
a C reference function for each relevant uop; and also, that the
packed shuffle fast path is currently no longer tested by checkasm.
(But this will be fixed by my upcoming pshufb uop series)

Another downside is that this effectively disables testing for e.g.
aarch64, since it does not yet use the uops architecture.

$ time checkasm --test=sw_ops --repeat=10 # 1.85s -> 1.39s

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-07-14 12:24:01 +00:00
Niklas Haas 44e1b60c6a swscale/uops: consolidate SWS_UOP_{PERMUTE,COPY,MOVE}
Rather than having two uops for the C reference code and a separate
uop for the x86 backend, we can just implement the C reference
using the same register-register assignment logic.

This results in only slightly worse codegen, since the compiler is
smart enough to eliminate the unnecessary copies.

The main downside is the fact that we need to allocate extra stack space
to back-fill the remaining (unused) pointers. In theory, we could do this
more efficiently by re-using unused *input* registers directly, but that
would require a lot of reliance on compile-time constant folding teasing
apart the entire register index tracking loop and duplicate check, so this
is a useful middle ground.

On platforms like x86, we still don't care about the PERMUTE vs
COPY distinction, but it's also harmless (2-3 extra lines to
instantiate the underlying MOVE macro on both uop variants).

Finally, we need to add a mask to the move uops to keep track of which
outputs are actually needed (especially for checkasm). Though it does result
in the rather unfortunate downside that it bloats the names of the uop
names.

The op lists change to reflect the new representation, e.g.:

 rgb24 16x16 -> bgr24 16x16:
   [ u8 +++X] SWS_OP_READ         : 3 elem(s) packed >> 0
     min: {0 0 0 _}, max: {255 255 255 _}
   [ u8 +++X] SWS_OP_SWIZZLE      : 2103
     min: {0 0 0 _}, max: {255 255 255 _}
   [ u8 XXXX] SWS_OP_WRITE        : 3 elem(s) packed >> 0
     ('X' unused, 'z' byteswapped, '=' copied, '$' const, '+' integer, '0' zero)
  translated micro-ops:
     u8_read_packed_xyz
-    u8_permute_zyxw
+    u8_permute_xyzw_txz_xzt
     u8_write_packed_xyz

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-07-14 12:24:01 +00:00
Andreas Rheinhardt f769e433a3 Revert "tests/checkasm/vp9dsp: Allow to run only a subset of tests"
This reverts commit 7bc35b8426.
The aim of this patch can now be achieved via checkasm's
--function pattern matching.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-07-14 10:01:08 +02:00
Shreesh Adiga 7b9eeadda0 tests/checkasm/aes: fix memcmp size argument
sizeof(16 * count) evaluates to 4 and thus only the first 4 bytes of aes
output was being compared. Removing the sizeof operator will ensure that
the whole output buffer will be compared.
2026-07-12 19:44:48 +00:00
Andreas Rheinhardt fad2e0bc50 tests/checkasm/motion: Improve randomizing buffers
Randomize four bytes at a time and only do it if needed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-07-03 16:09:57 +02:00
Andreas Rheinhardt f3343f51b1 tests/checkasm/motion: Improve reporting
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-07-03 16:09:57 +02:00
Shreesh Adiga e18e229388 checkasm/crc: increase size of input buffer from 8k to 16k
For AArch64, AV_CRC_32_IEEE_LE implementation has codepath which is triggered
when input buffer size is >= 8192. Thus to ensure sufficient test coverage,
size of the input buffer in the test file is being increased from 8192 to 16384.
2026-07-02 09:03:25 +00:00
Thomas Guilbert b3fb13e8dd Guard lpc methods in flacdsp and add tests
This commit adds additional guards for the RISC-V lpc variants.

It also adds tests to exercise the guarded paths in checkasm/flacdsp.c.
2026-07-02 02:49:06 +00:00
Andreas Rheinhardt 45c41d1d1b tests/checkasm/vc1dsp: Fix shadowing
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-07-01 20:00:46 +02:00
Andreas Rheinhardt 296d86c8bb tests/checkasm/vc1dsp: Improve mspel test
Up until now, only the fullpel test (i.e. the test without pixel
interpolation) has been tested at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-07-01 20:00:46 +02:00
Michael Niedermayer 48f30aa08c checkasm/sw_rgb: also test yuyvtoyuv422
yuyvtoyuv422 reads the trailing odd V sample at src[2w+1], one byte further
than uyvytoyuv422, so the number of extra source bytes an odd width needs is
passed in per format (1 for UYVY, 2 for YUYV) and added to the stride.

uyvytoyuv420 and yuyvtoyuv420 are intentionally not added: their x86 mmxext
chroma averaging uses PAVGB rounding and so is not bit-exact with the C
reference, which truncates, so they cannot be verified this way.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-07-01 01:48:33 +00:00
Michael Niedermayer ef18ece3f0 checkasm/sw_rgb: test uyvytoyuv422 with odd widths
The SIMD uyvytoyuv422 implementations only handled even widths correctly.
Add odd width and 1x1 entries so the trailing column handling is exercised
against the C reference.

An odd width reads one source byte more than 2*width, the V sample at
src[2w], so the stride is extended by one for odd widths.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-07-01 01:48:33 +00:00
Michael Niedermayer d5a2ab9c08 checkasm/sw_rgb: fix too small source stride in uyvytoyuv422 test
The planes table stored a source stride smaller than the 2*width bytes a
packed UYVY line occupies (e.g. width 12 with stride 12), and the correct
stride for width 128 would be 256, which does not even fit the uint8_t
field. The test passed only because the oversized source buffer absorbed
the resulting out-of-bounds reads.

Derive srcStride from the width (2*width) instead of storing it, so each
line is passed its true size.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-07-01 01:48:33 +00:00
Jeongkeun Kim 2be6bf5507 tests/checkasm/llviddsp: fix add_left_pred_int16 buffer compare size
dst0/dst1 are uint16_t* allocated as width * sizeof(uint16_t), but
the memcmp at the end of check_add_left_pred_16 only compared `width`
bytes — missing the second half of each buffer. Same pattern used
correctly in tests/checkasm/huffyuvdsp.c (memcmp with width * sizeof()).

While at it, fix missing whitespace around & and || on the same line.

Fixes: fbe9148779 ("checkasm/llviddsp : add test for other dsp func")
Signed-off-by: Jeongkeun Kim <variety0724@gmail.com>
2026-06-29 21:40:05 +00:00
Andreas Rheinhardt 90cca8111b tests/checkasm/hevc_pel: Don't test impossible values
denom is in 0..7 (see pred_weight_table() in hevcdec.c).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-06-27 00:06:08 +02:00
Andreas Rheinhardt baad19d0b5 avcodec/hevc/dsp: Combine offsets early for biweight prediction
Only the sum of the offsets is ever used
(see equation 8-279 in the 2019 version of the H.265 spec).

Tested-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-06-27 00:06:08 +02:00
Martin Storsjö 93ebde18e1 checkasm: Trim out unused upstream files
We only need the source files themselves; keep them and the
LICENSE file.
2026-06-25 12:47:17 +03:00
Niklas Haas d04f7b17c7 tests/checkasm/sw_ops: eliminate unneeded overflow check
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-25 01:20:48 +02:00
Niklas Haas 3743d2851d swscale/ops: switch from AVRational to AVRational64
This has two immediate consequences:

1. Fixes overflow in the range tracker for some 32-bit packed formats:

 rgb24 -> v30xbe:
   [ u8 +++X] SWS_OP_READ         : 3 elem(s) packed >> 0
     min: {0 0 0 _}, max: {255 255 255 _}
   [ u8 +++X] SWS_OP_CONVERT      : u8 -> f32
     min: {0 0 0 _}, max: {255 255 255 _}
   [f32 ...X] SWS_OP_LINEAR       : matrix3+off3 [...]
     min: {64 64 64 _}, max: {940 960 960 _}
   [f32 ...X] SWS_OP_DITHER       : 16x16 matrix + {0 3 2 -1}
     min: {64.001953 64.001953 64.001953 _}, max: {940.998047 960.998047 960.998047 _}
   [f32 +++X] SWS_OP_CONVERT      : f32 -> u32
     min: {64 64 64 _}, max: {940 960 960 _}
   [u32 +++X] SWS_OP_SWIZZLE      : 2013
     min: {64 64 64 _}, max: {960 940 960 _}
   [u32 ++++] SWS_OP_CLEAR        : {_ _ _ 1}
     min: {64 64 64 1}, max: {960 940 960 1}
   [u32 +XXX] SWS_OP_PACK         : {10 10 10 2}
-    min: {268697857 _ _ _}, max: {-264581375 _ _ _}
+    min: {268697857 _ _ _}, max: {4030385921 _ _ _}
   [u32 zXXX] SWS_OP_SWAP_BYTES
-    min: {268697857 _ _ _}, max: {-264581375 _ _ _}
+    min: {268697857 _ _ _}, max: {4030385921 _ _ _}

2. Slightly increases the accuracy of intermediate values for some linear ops:

 yuv444p10be -> rgb48be:
   [u16 zzzX] SWS_OP_READ         : 3 elem(s) planar >> 0
     min: {0 0 0 _}, max: {1023 1023 1023 _}
   [u16 +++X] SWS_OP_SWAP_BYTES
     min: {0 0 0 _}, max: {1023 1023 1023 _}
   [u16 +++X] SWS_OP_CONVERT      : u16 -> f32
     min: {0 0 0 _}, max: {1023 1023 1023 _}
   [f32 ...X] SWS_OP_LINEAR       : matrix3+off3 [...]
46.813777] [0 0 0 1 0]]
-    min: {-57290.842348 -44341.337325 -71146.813777 _}, max: {124144.718860 111375.162457 137973.627845 _}
+    min: {-57290.842348 -44341.337326 -71146.813777 _}, max: {124144.718860 111375.162457 137973.627845 _}
   [f32 ...X] SWS_OP_MAX          : {0 0 0 _} <= x
     min: {0 0 0 _}, max: {124144.718860 111375.162457 137973.627845 _}
   [f32 ...X] SWS_OP_MIN          : x <= {65535 65535 65535 _}
     min: {0 0 0 _}, max: {65535 65535 65535 _}
   [f32 +++X] SWS_OP_CONVERT      : f32 -> u16
     min: {0 0 0 _}, max: {65535 65535 65535 _}
   [u16 zzzX] SWS_OP_SWAP_BYTES
     min: {0 0 0 _}, max: {65535 65535 65535 _}
   [u16 XXXX] SWS_OP_WRITE        : 3 elem(s) packed >> 0
     (X = unused, z = byteswapped, + = exact, 0 = zero)

Importantly, none of the changes affect the actual operation list, just the
range tracking metadata.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-25 01:20:44 +02:00
Niklas Haas 310df19fcd tests/checkasm/sw_ops: add check for SWS_UOP_READ_PALETTE
We just need to ensure the palette contains valid data, which will happen
automatically as long as the plane 1 is large enough.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-20 14:08:49 +00:00
Ramiro Polla 176493e4c4 swscale/ops: pass SwsLinearOp by pointer instead of value in ff_sws_linear_mask() 2026-06-19 14:32:44 +00:00
Zhao Zhili 4acfab044d checkasm/sw_ops: fix typo in write operations
check_write() matched against SWS_UOP_READ_PACKED/PLANAR, copied from
check_read(), instead of SWS_UOP_WRITE_PACKED/PLANAR.
2026-06-15 14:36:05 +00:00
Andreas Rheinhardt 19e377b4b9 avcodec/x86/hpeldsp: Port mmxext functions to SSE2
The only noticable changes in benchmarks are for
the x2 horizontal no_rnd case where SSE2 and movhps
are beneficial:

Old benchmarks:
avg_pixels_tab[1][1]_c:                                 42.2 ( 1.00x)
avg_pixels_tab[1][1]_mmxext:                            10.8 ( 3.89x)
avg_pixels_tab[1][2]_c:                                 18.0 ( 1.00x)
avg_pixels_tab[1][2]_mmxext:                             6.1 ( 2.96x)
put_no_rnd_pixels_tab[1][1]_c:                          29.7 ( 1.00x)
put_no_rnd_pixels_tab[1][1]_mmxext:                     12.3 ( 2.41x)
put_no_rnd_pixels_tab[1][2]_c:                          20.4 ( 1.00x)
put_no_rnd_pixels_tab[1][2]_mmxext:                     12.2 ( 1.67x)
put_pixels_tab[1][1]_c:                                 29.9 ( 1.00x)
put_pixels_tab[1][1]_mmxext:                             7.6 ( 3.92x)
put_pixels_tab[1][2]_c:                                 16.8 ( 1.00x)
put_pixels_tab[1][2]_mmxext:                             6.4 ( 2.63x)

New benchmarks:
avg_pixels_tab[1][1]_c:                                 42.3 ( 1.00x)
avg_pixels_tab[1][1]_sse2:                              10.7 ( 3.95x)
avg_pixels_tab[1][2]_c:                                 17.8 ( 1.00x)
avg_pixels_tab[1][2]_sse2:                               6.3 ( 2.83x)
put_no_rnd_pixels_tab[1][1]_c:                          29.6 ( 1.00x)
put_no_rnd_pixels_tab[1][1]_sse2:                       10.5 ( 2.81x)
put_no_rnd_pixels_tab[1][2]_c:                          20.4 ( 1.00x)
put_no_rnd_pixels_tab[1][2]_sse2:                       12.3 ( 1.67x)
put_pixels_tab[1][1]_c:                                 30.1 ( 1.00x)
put_pixels_tab[1][1]_sse2:                               7.6 ( 3.93x)
put_pixels_tab[1][2]_c:                                 16.8 ( 1.00x)
put_pixels_tab[1][2]_sse2:                               6.4 ( 2.64x)

Switching to SSE2 unfortunately increased codesize of the relevant
functions by 160B.

This makes these functions ABI compatible, i.e. they no longer
rely on others calling emms_c to fix the fpu state. It also
implies that many mpegvideo decoders (the exceptions are MPEG-4,
RV30, RV40 and the VC-1 family) now no longer use any mmx registers
at all. So one can remove the emms_c from the MPEG-1/2 decoder.
The same is true for VP3.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-06-14 22:04:42 +02:00
Andreas Rheinhardt c35f57f3c4 avcodec/x86/fpel: Use SSE2 in avg_pixels8
No change in benchmarks here; this already allows
to remove an emms_c from cavsdec.c.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-06-14 22:04:42 +02:00
Niklas Haas b488ee5553 swscale/ops: generalize SwsReadWriteOp.packed to enum
I want to start adding more data layouts, like semiplanar formats (nv12), or
palette formats. I made an effort to distinguish existing checks for rw.packed
into "mode != PLANAR" and "mode == PACKED", based on the intent of the
surrounding code, in anticipation of these new layouts.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-11 16:27:47 +00:00
Niklas Haas addee69955 swscale/ops_dispatch: generalize block_size_in/out to array
See previous commit for justification. I decided to split these
refactors up into several independent commits to make it easier
to review and bisect, since they are all independent atomic changes.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-11 16:27:47 +00:00
Niklas Haas 11900e4e12 swscale/ops: generalize SWS_OP_FILTER_* result type
Instead of hard-coding SWS_PIXEL_F32 here. This is not really useful
yet, but I wanted to clean up the semantics here regardless.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-11 16:27:47 +00:00
Niklas Haas 091149b187 swscale/ops: group filtered rw metadata into struct
This is a minor cosmetic improvement that allows me to use more
convenient names for a filter-related metadata fields, without
confusion.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-11 16:27:47 +00:00
DROOdotFOOandRamiro Polla cc7c567920 swscale/aarch64/yuv2rgb_neon: add BE 16bpp output formats
BE counterparts to the LE paths in 2e142e52ae; pack adds rev16 before
store. nv12/nv21 paths are added but bench-only (no C ref, same as
2e142e52ae).

Test Name                              A55-gcc           M1-clang             A76-gcc
-------------------------------------------------------------------------------------
yuv420p_rgb565be_1920_neon    15086.1 ( 3.91x)    5507.0 ( 4.34x)    19229.1 ( 2.02x)
yuv420p_bgr565be_1920_neon    15291.7 ( 3.84x)    5476.9 ( 4.37x)    19229.4 ( 2.02x)
yuv420p_rgb555be_1920_neon    15091.5 ( 3.67x)    5569.0 ( 3.97x)    19229.3 ( 1.90x)
yuv420p_bgr555be_1920_neon    15298.6 ( 3.62x)    5600.6 ( 3.98x)    19228.8 ( 1.90x)
yuv422p_rgb565be_1920_neon    16862.3 ( 4.00x)    6378.8 ( 4.64x)    22110.3 ( 2.07x)
yuv422p_bgr565be_1920_neon    17139.3 ( 3.93x)    6448.1 ( 4.50x)    22104.1 ( 2.07x)
yuv422p_rgb555be_1920_neon    16853.3 ( 3.98x)    6468.8 ( 4.12x)    22106.4 ( 1.98x)
yuv422p_bgr555be_1920_neon    17202.2 ( 3.89x)    6467.0 ( 4.12x)    22110.2 ( 1.98x)
yuva420p_rgb565be_1920_neon   15050.2 ( 3.92x)    5452.5 ( 4.39x)    19229.5 ( 2.02x)
yuva420p_bgr565be_1920_neon   15346.6 ( 3.84x)    5462.4 ( 4.36x)    19228.9 ( 2.02x)
yuva420p_rgb555be_1920_neon   15050.8 ( 3.69x)    5463.3 ( 3.95x)    19228.6 ( 1.90x)
yuva420p_bgr555be_1920_neon   15352.8 ( 3.61x)    5543.6 ( 3.89x)    19228.6 ( 1.90x)

Co-authored-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: DROOdotFOO <drew@axol.io>
2026-06-10 17:54:20 +00:00
Martin Storsjö b20c4c6f98 checkasm: Update to the latest upstream version
This update was done by running this command:

    $ git subtree pull --squash --prefix=tests/checkasm/ext \
      https://code.ffmpeg.org/FFmpeg/checkasm.git master

This includes fixes for a couple regressions noted after integrating
the new external checkasm into ffmpeg:

- Fixes spurious errors about missing vzeroupper in C code generated
  by MSVC, fixing https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/23360
- Fixes building for WINAPI_FAMILY_PHONE_APP, and for UWP with older
  Windows SDKs, https://code.videolan.org/videolan/checkasm/-/work_items/37
- Fixes building in x86_32 mode for Windows with --disable-asm,
  https://code.videolan.org/videolan/checkasm/-/work_items/36
2026-06-09 20:57:59 +03:00
Niklas Haas 100ce4ac41 tests/checkasm/sw_ops: rewrite using uops_macros.h
This ensures 100% coverage of all uop primitives by generating the set of
tests exactly from the list of seen primitives, using the uops macros.

There are some annoying quirks still because of the fact that we have to
essentially "untranslate" the UOPs back to SwsOps that result back in the
intended uop after the translation, but overall it's not too bad and still
much better than the status quo of hand-rolling the list of test cases.

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-09 18:27:20 +02:00
Jun Zhao 3d71b9ec93 tests/checkasm: hevc_pred: use pixel helpers for diagnostic output
Replace plain memcmp+fail() with checkasm_check_pixel_padded() for
DC, planar, and angular prediction tests. Use PIXEL_RECT for output
buffers instead of flat arrays.

This enables:
- Detailed per-pixel difference output when run with 'checkasm -v'
- Detection of out-of-bounds writes beyond the NxN block area
- Padding violation reporting (writes past block boundary)

Previously, a test failure would only report "FAILED" with no
information about which pixels were wrong, making assembly debugging
difficult. Follows the pattern established in 4d4b301e4a (checkasm:
hevc_pel: Use helpers for checking for writes out of bounds).

Suggested-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2026-06-07 23:29:33 +00:00
Niklas Haas 3137d337fe tests/checkasm/sw_ops: use new checkasm_set_func_variant()
The current approach of re-testing the C reference for every backend
separately leads to both confusing output (e.g. having an extra redundant
`memcpy_c` line for every op, even those not implemented by the memcpy
backend), as well as a lot of unnecessary wasted time re-testing and
re-benching the same C variant for every backend.

This new API function lets us test the C function only a single time, while
simultaneously having all of the other backends implicitly compare themselves
against the C reference.

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-06-07 09:24:23 +00:00
Martin Storsjö 96470d1e8c checkasm: Fix defining CHECKASM_HAVE_GENERATED_H
Commit 4569ab7eaa tried to set this
only on the object files for the checkasm library itself, but
missed that EXT_CHECKASMOBJS lacks the path prefix, thus this
wasn't set at all.

Alternatively, for simplicity, we could keep passing this for
all checkasm object files, not only the checkasm library objects;
the other object files don't use it in any case.
2026-06-05 11:46:38 +00:00
Kacper Michajłow 2a54b181c0 tests/checkasm/vvc_mc: prevent function inline to avoid stack overflow
Fixes stack overflow on Windows when by default we have 1 MB.
Individually those functions fit, but when they are all inlined, it's
too much.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-06-05 08:22:40 +02:00
Kacper Michajłow 7d2a629ccf tests/checkasm/rv34dsp: pass correct buffer to bench function
The test can negate stride, in which case we have to use adjusted
`dst_newp`.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2026-06-05 08:22:37 +02:00
Martin Storsjö 4569ab7eaa configure: Provide checkasm_header_config_generated.h as well
This is required for overriding defines that exist in the public
headers of checkasm, when e.g. building with assembly disabled
for an architecture where we normally would use the checked_call
wrapper.

This fixes a leftover in how checkasm is integrated into the
ffmpeg build system; there were many different approaches
considered for fixing --disable-asm, and the ffmpeg configure
integration didn't end up matching the final solution.

This fixes building with --disable-asm.
2026-06-04 18:26:50 +00:00