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

Git pushed a commit to branch master
in repository ffmpeg.

commit cc0d904795d659413d0d450061204b3edffefc24
Author:     Ramiro Polla <[email protected]>
AuthorDate: Mon Jun 1 19:06:40 2026 +0200
Commit:     Ramiro Polla <[email protected]>
CommitDate: Thu Jun 4 22:54:23 2026 +0200

    Revert "swscale/tests/swscale: check if formats require the legacy path 
with -hw"
    
    This reverts commit ac611d31209bf351bc510ba7cbb9a238649fdcff.
---
 libswscale/tests/swscale.c | 40 +---------------------------------------
 1 file changed, 1 insertion(+), 39 deletions(-)

diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index a7b2474714..881c85faaa 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -27,7 +27,6 @@
 #include <signal.h>
 
 #undef HAVE_AV_CONFIG_H
-#include "config.h"
 #include "libavutil/cpu.h"
 #include "libavutil/parseutils.h"
 #include "libavutil/pixdesc.h"
@@ -42,10 +41,6 @@
 #include "libavutil/hwcontext.h"
 
 #include "libswscale/swscale.h"
-#include "libswscale/format.h"
-#if CONFIG_UNSTABLE
-#include "libswscale/ops.h"
-#endif
 
 struct options {
     enum AVPixelFormat src_fmt;
@@ -233,7 +228,7 @@ static void unref_buffers(AVFrame *frame)
 static int checked_sws_scale_frame(SwsContext *c, AVFrame *dst, const AVFrame 
*src)
 {
     int ret = sws_scale_frame(c, dst, src);
-    if (ret < 0 && ret != AVERROR(ENOTSUP)) {
+    if (ret < 0) {
         av_log(NULL, AV_LOG_ERROR, "Failed %s ---> %s\n",
                av_get_pix_fmt_name(src->format), 
av_get_pix_fmt_name(dst->format));
     }
@@ -662,37 +657,6 @@ static inline int fmt_is_subsampled(enum AVPixelFormat fmt)
            av_pix_fmt_desc_get(fmt)->log2_chroma_h != 0;
 }
 
-/* Returns 1 if the (src_fmt, dst_fmt) pair can be expressed by the new
- * swscale ops infrastructure, 0 if it would fall back to the legacy path.
- * Used to skip pairs that cannot run on hardware frames. */
-static int hw_pair_supported(enum AVPixelFormat src_fmt, enum AVPixelFormat 
dst_fmt)
-{
-#if CONFIG_UNSTABLE
-    SwsContext *ctx;
-    SwsFormat src, dst;
-    SwsOpList *ops = NULL;
-    bool incomplete = false;
-    int ret;
-
-    ctx = sws_alloc_context();
-    if (!ctx)
-        return 0;
-
-    ff_fmt_from_pixfmt(src_fmt, &src);
-    src.width = src.height = 96;
-    ff_fmt_from_pixfmt(dst_fmt, &dst);
-    dst.width = dst.height = 96;
-    ff_infer_colors(&src.color, &dst.color);
-
-    ret = ff_sws_op_list_generate(ctx, &src, &dst, &ops, &incomplete);
-    ff_sws_op_list_free(&ops);
-    sws_free_context(&ctx);
-    return ret >= 0;
-#else
-    return 1;
-#endif
-}
-
 static inline int fmt_is_supported_by_hw(enum AVPixelFormat fmt)
 {
     if (!hw_device_constr)
@@ -745,8 +709,6 @@ static int run_self_tests(const AVFrame *ref, const struct 
options *opts)
                 continue;
             if (!sws_test_format(dst_fmt, 0) || !sws_test_format(dst_fmt, 1))
                 continue;
-            if (hw_device_ctx && !hw_pair_supported(src_fmt, dst_fmt))
-                continue;
             for (int h = 0; h < FF_ARRAY_ELEMS(dst_h); h++) {
                 for (int w = 0; w < FF_ARRAY_ELEMS(dst_w); w++) {
                     for (int f = 0; f < FF_ARRAY_ELEMS(flags); f++) {

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

Reply via email to