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

Git pushed a commit to branch master
in repository ffmpeg.

commit 1be662041f4cec3b4424fd1b7c734d150315997a
Author:     Niklas Haas <[email protected]>
AuthorDate: Thu Oct 29 15:14:48 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Sun Nov 8 00:36:29 2026 +0000

    swscale/uops: move expand32() from x86 to header
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/uops.h    | 11 +++++++++++
 libswscale/x86/ops.c | 14 +-------------
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/libswscale/uops.h b/libswscale/uops.h
index 4d25107927..2a48746fc6 100644
--- a/libswscale/uops.h
+++ b/libswscale/uops.h
@@ -101,6 +101,17 @@ static inline SwsPixel ff_sws_pixel_from_q64(SwsPixelType 
type, AVRational64 val
     return (SwsPixel) {0};
 }
 
+/* Expand pixel value to 32-bits by repeating as necessary */
+static inline SwsPixel ff_sws_pixel_expand32(SwsPixelType type, SwsPixel val)
+{
+    switch (type) {
+    case SWS_PIXEL_U8:  val.u32 = val.u8  * 0x01010101u; break;
+    case SWS_PIXEL_U16: val.u32 = val.u16 * 0x00010001u; break;
+    default: break;
+    }
+    return val;
+}
+
 static inline bool ff_sws_pixel_is_1s(SwsPixelType type, SwsPixel val)
 {
     switch (ff_sws_pixel_type_size(type)) {
diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c
index 9cc5ba7a0a..f1349a9ec9 100644
--- a/libswscale/x86/ops.c
+++ b/libswscale/x86/ops.c
@@ -622,22 +622,10 @@ do {
     return 0;
 }
 
-/* Expand pixel value to 32-bits by repeating as necessary */
-static uint32_t expand32(const SwsPixelType type, const SwsPixel value)
-{
-    switch (type) {
-    case SWS_PIXEL_U8:  return value.u8  * 0x01010101u;
-    case SWS_PIXEL_U16: return value.u16 * 0x00010001u;
-    case SWS_PIXEL_U32: return value.u32;
-    case SWS_PIXEL_F32: return value.u32; /* reinterpret */
-    default: return 0;
-    }
-}
-
 static void normalize_clear(SwsUOp *uop)
 {
     for (int i = 0; i < 4; i++)
-        uop->data.vec4[i].u32 = expand32(uop->type, uop->data.vec4[i]);
+        uop->data.vec4[i] = ff_sws_pixel_expand32(uop->type, 
uop->data.vec4[i]);
 }
 
 static int compile_uops_x86(SwsContext *ctx, const SwsUOpList *uops, 
SwsCompiledOp *out)

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to