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

Git pushed a commit to branch master
in repository ffmpeg.

commit fde02c904c64f14c6fd4b0cbfe862318d799da3c
Author:     Ramiro Polla <[email protected]>
AuthorDate: Wed Jun 24 01:47:57 2026 +0200
Commit:     Ramiro Polla <[email protected]>
CommitDate: Wed Jun 24 13:14:35 2026 +0000

    swscale/ops: remove friendly linear mask names
    
    These names are not really useful and the uops list already shows the
    shape of the mask.
---
 libswscale/ops.c            | 43 +------------------------------------------
 libswscale/ops.h            | 17 +----------------
 tests/ref/fate/sws-ops-list |  2 +-
 3 files changed, 3 insertions(+), 59 deletions(-)

diff --git a/libswscale/ops.c b/libswscale/ops.c
index 0f52f7a77c..26e6a6171c 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -794,47 +794,6 @@ uint32_t ff_sws_linear_mask(const SwsLinearOp *c)
     return mask;
 }
 
-static const char *describe_lin_mask(uint32_t mask)
-{
-    /* Try to be fairly descriptive without assuming too much */
-    static const struct {
-        char name[24];
-        uint32_t mask;
-    } patterns[] = {
-        { "noop",               0 },
-        { "luma",               SWS_MASK_LUMA },
-        { "alpha",              SWS_MASK_ALPHA },
-        { "luma+alpha",         SWS_MASK_LUMA | SWS_MASK_ALPHA },
-        { "dot3",               0x7 },
-        { "dot4",               0xF },
-        { "row0",               SWS_MASK_ROW(0) },
-        { "row0+alpha",         SWS_MASK_ROW(0) | SWS_MASK_ALPHA },
-        { "col0",               SWS_MASK_COL(0) },
-        { "col0+off3",          SWS_MASK_COL(0) | SWS_MASK_OFF3 },
-        { "off3",               SWS_MASK_OFF3 },
-        { "off3+alpha",         SWS_MASK_OFF3 | SWS_MASK_ALPHA },
-        { "diag3",              SWS_MASK_DIAG3 },
-        { "diag4",              SWS_MASK_DIAG4 },
-        { "diag3+alpha",        SWS_MASK_DIAG3 | SWS_MASK_ALPHA },
-        { "diag3+off3",         SWS_MASK_DIAG3 | SWS_MASK_OFF3 },
-        { "diag3+off3+alpha",   SWS_MASK_DIAG3 | SWS_MASK_OFF3 | 
SWS_MASK_ALPHA },
-        { "diag4+off4",         SWS_MASK_DIAG4 | SWS_MASK_OFF4 },
-        { "matrix3",            SWS_MASK_MAT3 },
-        { "matrix3+off3",       SWS_MASK_MAT3 | SWS_MASK_OFF3 },
-        { "matrix3+off3+alpha", SWS_MASK_MAT3 | SWS_MASK_OFF3 | SWS_MASK_ALPHA 
},
-        { "matrix4",            SWS_MASK_MAT4 },
-        { "matrix4+off4",       SWS_MASK_MAT4 | SWS_MASK_OFF4 },
-    };
-
-    for (int i = 0; i < FF_ARRAY_ELEMS(patterns); i++) {
-        if (!(mask & ~patterns[i].mask))
-            return patterns[i].name;
-    }
-
-    av_unreachable("Invalid linear mask!");
-    return "ERR";
-}
-
 static char describe_comp_flags(SwsCompFlags flags)
 {
     if (flags & SWS_COMP_GARBAGE)
@@ -951,7 +910,7 @@ void ff_sws_op_desc(AVBPrint *bp, const SwsOp *op)
         av_bprintf(bp, " <= x");
         break;
     case SWS_OP_LINEAR:
-        av_bprintf(bp, "%-20s: %s [", name, describe_lin_mask(op->lin.mask));
+        av_bprintf(bp, "%-20s: [", name);
         for (int i = 0; i < 4; i++) {
             av_bprintf(bp, "%s[", i ? " " : "");
             for (int j = 0; j < 5; j++) {
diff --git a/libswscale/ops.h b/libswscale/ops.h
index 38e9fbcc26..753cee5910 100644
--- a/libswscale/ops.h
+++ b/libswscale/ops.h
@@ -202,22 +202,7 @@ typedef struct SwsLinearOp {
 #define SWS_MASK_OFF(I) SWS_MASK(I, 4)
 #define SWS_MASK_ROW(I) (0x1F << (5 * (I)))
 #define SWS_MASK_COL(J) (0x8421 << J)
-
-enum {
-    SWS_MASK_ALL   = (1 << 20) - 1,
-    SWS_MASK_LUMA  = SWS_MASK(0, 0) | SWS_MASK_OFF(0),
-    SWS_MASK_ALPHA = SWS_MASK(3, 3),
-
-    SWS_MASK_DIAG3 = SWS_MASK(0, 0)  | SWS_MASK(1, 1)  | SWS_MASK(2, 2),
-    SWS_MASK_OFF3  = SWS_MASK_OFF(0) | SWS_MASK_OFF(1) | SWS_MASK_OFF(2),
-    SWS_MASK_MAT3  = SWS_MASK(0, 0)  | SWS_MASK(0, 1)  | SWS_MASK(0, 2) |
-                     SWS_MASK(1, 0)  | SWS_MASK(1, 1)  | SWS_MASK(1, 2) |
-                     SWS_MASK(2, 0)  | SWS_MASK(2, 1)  | SWS_MASK(2, 2),
-
-    SWS_MASK_DIAG4 = SWS_MASK_DIAG3  | SWS_MASK(3, 3),
-    SWS_MASK_OFF4  = SWS_MASK_OFF3   | SWS_MASK_OFF(3),
-    SWS_MASK_MAT4  = SWS_MASK_ALL & ~SWS_MASK_OFF4,
-};
+#define SWS_MASK_DIAG4  (0x41041)
 
 /* Helper function to compute the correct mask */
 uint32_t ff_sws_linear_mask(const SwsLinearOp *c);
diff --git a/tests/ref/fate/sws-ops-list b/tests/ref/fate/sws-ops-list
index b5fc179208..f0b27a6d16 100644
--- a/tests/ref/fate/sws-ops-list
+++ b/tests/ref/fate/sws-ops-list
@@ -1 +1 @@
-133f2f3066e2a853f6e77be084c9cd75
+cb589b85a77bc2b82a73de8a9bde9158

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

Reply via email to