This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 7af4faf6dffc8c6d93d38e242466e4fd622c8f00 Author: Niklas Haas <[email protected]> AuthorDate: Sun Apr 19 15:38:55 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Wed Jun 3 23:53:23 2026 +0200 tests/checkasm/sw_ops: skip test data setup if not testing anything The test data size is quite large, so re-setting up unused data is eating up quite a significant amount of CPU time. This commit cuts execution time of sw_ops in half. Signed-off-by: Niklas Haas <[email protected]> --- tests/checkasm/sw_ops.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/checkasm/sw_ops.c b/tests/checkasm/sw_ops.c index 1dc7d1f528..c21c2ec7a6 100644 --- a/tests/checkasm/sw_ops.c +++ b/tests/checkasm/sw_ops.c @@ -117,6 +117,16 @@ static void check_compiled(const char *name, const SwsOpBackend *backend, const SwsCompiledOp *comp_ref, const SwsCompiledOp *comp_new) { + /** + * We can't use `check_func()` alone because the actual function pointer + * may be a wrapper or entry point shared by multiple implementations. + * Solve it by hashing in the active CPU flags as well. + */ + uintptr_t id = (uintptr_t) comp_new->func; + id ^= (id << 6) + (id >> 2) + 0x9e3779b97f4a7c15 + comp_new->cpu_flags; + if (!check_key((void *) id, "%s/%s", name, backend->name)) + return; + declare_func(void, const SwsOpExec *, const void *, int bx, int y, int bx_end, int y_end); static DECLARE_ALIGNED_64(char, src0)[NB_PLANES][LINES][PIXELS * sizeof(uint32_t[4])]; @@ -178,15 +188,6 @@ static void check_compiled(const char *name, const SwsOpBackend *backend, exec.in_offset_x = in_offset_x; } - /** - * We can't use `check_func()` alone because the actual function pointer - * may be a wrapper or entry point shared by multiple implementations. - * Solve it by hashing in the active CPU flags as well. - */ - uintptr_t id = (uintptr_t) comp_new->func; - id ^= (id << 6) + (id >> 2) + 0x9e3779b97f4a7c15 + comp_new->cpu_flags; - - if (check_key((void*) id, "%s/%s", name, backend->name)) { exec.block_size_in = comp_ref->block_size * rw_pixel_bits(read_op) >> 3; exec.block_size_out = comp_ref->block_size * rw_pixel_bits(write_op) >> 3; for (int i = 0; i < NB_PLANES; i++) { @@ -235,7 +236,6 @@ static void check_compiled(const char *name, const SwsOpBackend *backend, } bench(comp_new->func, &exec, comp_new->priv, 0, 0, PIXELS / comp_new->block_size, LINES); - } } static void check_ops(const char *name, const unsigned ranges[NB_PLANES], _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
