This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 1cc9b15baba85079a7e88443b985c7da0e84aeae
Author:     Ramiro Polla <[email protected]>
AuthorDate: Thu Apr 16 17:16:18 2026 +0200
Commit:     Ramiro Polla <[email protected]>
CommitDate: Fri May 15 14:12:48 2026 +0000

    swscale/tests/swscale: fix -p option when -flags and/or -unscaled are used
    
    The -p, -flags, and -unscaled options all affected the decision to
    select a subsample of the tests to run. When specifying -p 0.1, about
    57% of the tests would run instead of the expect 10%.
    
    This commit fixes this by separating -p from -flags and -unscaled.
---
 libswscale/tests/swscale.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index 5246d6deeb..b08ae5fac4 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -682,13 +682,12 @@ static int run_self_tests(const AVFrame *ref, const 
struct options *opts)
                             .dither = opts->dither >= 0 ? opts->dither : 
SWS_DITHER_AUTO,
                         };
 
-                        if (ff_sfc64_get(&prng_state) > UINT64_MAX * 
opts->prob)
-                            continue;
-
-                        ret = run_test(src_fmt, dst_fmt, dst_w[w], dst_h[h],
-                                       &mode, opts, ref, src, NULL);
-                        if (ret < 0)
-                            goto error;
+                        if (ff_sfc64_get(&prng_state) <= UINT64_MAX * 
opts->prob) {
+                            ret = run_test(src_fmt, dst_fmt, dst_w[w], 
dst_h[h],
+                                           &mode, opts, ref, src, NULL);
+                            if (ret < 0)
+                                goto error;
+                        }
 
                         if (opts->flags >= 0 || opts->unscaled)
                             break;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to