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

Git pushed a commit to branch master
in repository ffmpeg.

commit 9a2a0557adb51842216d96d987cfeca0652643c1
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Mon Apr 13 03:01:56 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Mon Apr 13 23:28:30 2026 +0000

    swscale/ops: remove optimize attribute from op functions
    
    It was added to force auto vectorization on GCC builds. Since then auto
    vectorization has been enabled for whole code base, 
1464930696f593320352a6f928fad6f50ade8f8b.
    
    According to GCC documentaiton, the optimize attribute should be used
    for debugging purposes only. It is not suitable in production code.
    
    In particular it's unclear whether the attribute is applied, as it's is
    actually lost when function is inlined, so usage of it is quite fragile.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libswscale/ops_backend.h  | 11 ++++-------
 libswscale/ops_tmpl_int.c |  4 ++--
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/libswscale/ops_backend.h b/libswscale/ops_backend.h
index f0b89d51c0..7aadc9d32e 100644
--- a/libswscale/ops_backend.h
+++ b/libswscale/ops_backend.h
@@ -53,13 +53,10 @@ typedef struct SwsOpIter {
 } SwsOpIter;
 
 #ifdef __clang__
-#  define SWS_FUNC
 #  define SWS_LOOP AV_PRAGMA(clang loop vectorize(assume_safety))
 #elif defined(__GNUC__)
-#  define SWS_FUNC __attribute__((optimize("tree-vectorize")))
 #  define SWS_LOOP AV_PRAGMA(GCC ivdep)
 #else
-#  define SWS_FUNC
 #  define SWS_LOOP
 #endif
 
@@ -106,10 +103,10 @@ typedef struct SwsOpIter {
 
 /* Helper macros to declare continuation functions */
 #define DECL_IMPL(NAME)                                                        
 \
-    static SWS_FUNC void fn(NAME)(SwsOpIter *restrict iter,                    
 \
-                                  const SwsOpImpl *restrict impl,              
 \
-                                  block_t x, block_t y,                        
 \
-                                  block_t z, block_t w)
+    static void fn(NAME)(SwsOpIter *restrict iter,                             
 \
+                         const SwsOpImpl *restrict impl,                       
 \
+                         block_t x, block_t y,                                 
 \
+                         block_t z, block_t w)
 
 /* Helper macro to call into the next continuation with a given type */
 #define CONTINUE(TYPE, ...)                                                    
 \
diff --git a/libswscale/ops_tmpl_int.c b/libswscale/ops_tmpl_int.c
index b010513bc5..fea0430799 100644
--- a/libswscale/ops_tmpl_int.c
+++ b/libswscale/ops_tmpl_int.c
@@ -419,7 +419,7 @@ WRAP_COMMON_PATTERNS(convert_float,
  * Note that this is only safe to do if no arguments are duplicated.
  */
 #define DECL_SWIZZLE(X, Y, Z, W)                                               
 \
-static SWS_FUNC void                                                           
 \
+static void                                                                    
 \
 fn(swizzle_##X##Y##Z##W)(SwsOpIter *restrict iter,                             
 \
                          const SwsOpImpl *restrict impl,                       
 \
                          block_t c0, block_t c1, block_t c2, block_t c3)       
 \
@@ -453,7 +453,7 @@ DECL_SWIZZLE(0, 3, 2, 1)
 
 /* Broadcast luma -> rgb (only used for y(a) -> rgb(a)) */
 #define DECL_EXPAND_LUMA(X, W, T0, T1)                                         
 \
-static SWS_FUNC void                                                           
 \
+static void                                                                    
 \
 fn(expand_luma_##X##W)(SwsOpIter *restrict iter,                               
 \
                        const SwsOpImpl *restrict impl,                         
 \
                        block_t c0, block_t c1,  block_t c2, block_t c3)        
 \

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

Reply via email to