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

Git pushed a commit to branch master
in repository ffmpeg.

commit 535ee06f6d050a1957f17fc255a6b487a9c77133
Author:     Niklas Haas <[email protected]>
AuthorDate: Tue Jul 14 13:53:37 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Fri Jul 17 13:23:21 2026 +0000

    swscale/uops: add SWS_UOP_FLAG_PSHUFB
    
    Exposes the SWS_UOP_RW_SHUFFLE capability. While this translates
    to the exact `pshufb` instruction on x86, we don't expose a separate
    capability for e.g. `vpermb` on AVX-512, since the underlying semantics
    are essentially equivalent.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/uops.h            | 5 +++--
 libswscale/uops_macros_gen.c | 2 +-
 libswscale/x86/ops.c         | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libswscale/uops.h b/libswscale/uops.h
index 48d29572cd..28a7e4e874 100644
--- a/libswscale/uops.h
+++ b/libswscale/uops.h
@@ -120,8 +120,9 @@ static inline char *ff_sws_comp_mask_print(SwsCompMask 
mask, char buf[5])
 
 typedef uint32_t SwsUOpFlags;
 typedef enum SwsUOpFlagBits {
-    SWS_UOP_FLAG_NONE = 0,
-    SWS_UOP_FLAG_FMA  = (1 << 0), /* platform supports FMA ops */
+    SWS_UOP_FLAG_NONE   = 0,
+    SWS_UOP_FLAG_FMA    = (1 << 0), /* platform supports FMA ops */
+    SWS_UOP_FLAG_PSHUFB = (1 << 1), /* platform supports pshufb equivalent */
 } SwsUOpFlagBits;
 
 typedef enum SwsUOpType {
diff --git a/libswscale/uops_macros_gen.c b/libswscale/uops_macros_gen.c
index 1bdbf6774e..2df9a9c2c2 100644
--- a/libswscale/uops_macros_gen.c
+++ b/libswscale/uops_macros_gen.c
@@ -230,7 +230,7 @@ fail:
 
 static const SwsUOpFlags uop_flags[] = {
     0,
-    SWS_UOP_FLAG_FMA, /* x86 backend */
+    SWS_UOP_FLAG_PSHUFB | SWS_UOP_FLAG_FMA, /* x86 backend */
 };
 
 static int register_uops(SwsContext *ctx, const SwsOpList *ops,
diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c
index ce11b46579..143bfa5013 100644
--- a/libswscale/x86/ops.c
+++ b/libswscale/x86/ops.c
@@ -666,7 +666,7 @@ static int compile_x86(SwsContext *ctx, const SwsOpList 
*ops, SwsCompiledOp *out
     if (mmsize < 0)
         return mmsize;
 
-    SwsUOpFlags flags = 0;
+    SwsUOpFlags flags = SWS_UOP_FLAG_PSHUFB;
     if (EXTERNAL_FMA3(cpu_flags))
         flags |= SWS_UOP_FLAG_FMA;
 

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

Reply via email to