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

Git pushed a commit to branch master
in repository ffmpeg.

commit be71c4a70f3fec81f3915b3d4ac9f62f4bb2509c
Author:     Ramiro Polla <[email protected]>
AuthorDate: Thu Jun 11 22:55:19 2026 +0200
Commit:     Ramiro Polla <[email protected]>
CommitDate: Sun Jul 19 15:07:02 2026 +0200

    swscale/aarch64/ops: specialize convert and expand operations
    
    This is similar to the way SWS_UOP_TO_{U8,U16,U32,F32} and
    SWS_UOP_EXPAND_{PAIR,QUAD} work and will simplify the move to uops.
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Ramiro Polla <[email protected]>
---
 libswscale/aarch64/ops_asmgen.c    |  40 +++++++++++---
 libswscale/aarch64/ops_entries.c   | 104 ++++++++++++++++++-------------------
 libswscale/aarch64/ops_impl.c      |  25 ++++++---
 libswscale/aarch64/ops_impl.h      |   9 ++--
 libswscale/aarch64/ops_impl_conv.c |  18 +++++--
 5 files changed, 122 insertions(+), 74 deletions(-)

diff --git a/libswscale/aarch64/ops_asmgen.c b/libswscale/aarch64/ops_asmgen.c
index c270d72ec9..4dffb592a9 100644
--- a/libswscale/aarch64/ops_asmgen.c
+++ b/libswscale/aarch64/ops_asmgen.c
@@ -845,7 +845,10 @@ static void asmgen_op_clear(SwsAArch64Context *s, const 
SwsAArch64OpImplParams *
 
 /*********************************************************************/
 /* convert (cast) between formats */
-/* AARCH64_SWS_OP_CONVERT */
+/* AARCH64_SWS_OP_TO_U8 */
+/* AARCH64_SWS_OP_TO_U16 */
+/* AARCH64_SWS_OP_TO_U32 */
+/* AARCH64_SWS_OP_TO_F32 */
 
 static void asmgen_op_convert(SwsAArch64Context *s, const 
SwsAArch64OpImplParams *p)
 {
@@ -865,7 +868,17 @@ static void asmgen_op_convert(SwsAArch64Context *s, const 
SwsAArch64OpImplParams
     }
 
     size_t src_el_size = s->el_size;
-    size_t dst_el_size = aarch64_pixel_size(p->to_type);
+    SwsAArch64PixelType to_type;
+    switch (p->op) {
+    case AARCH64_SWS_OP_TO_U8:  to_type = AARCH64_PIXEL_U8;  break;
+    case AARCH64_SWS_OP_TO_U16: to_type = AARCH64_PIXEL_U16; break;
+    case AARCH64_SWS_OP_TO_U32: to_type = AARCH64_PIXEL_U32; break;
+    case AARCH64_SWS_OP_TO_F32: to_type = AARCH64_PIXEL_F32; break;
+    default:
+        av_assert0(!"Invalid op!");
+        break;
+    }
+    size_t dst_el_size = aarch64_pixel_size(to_type);
 
     /**
      * This function assumes block_size is either 8 or 16, and that
@@ -914,7 +927,7 @@ static void asmgen_op_convert(SwsAArch64Context *s, const 
SwsAArch64OpImplParams
     }
 
     /* See comment above for high vector bank usage for u32. */
-    if (p->to_type == AARCH64_PIXEL_F32) {
+    if (to_type == AARCH64_PIXEL_F32) {
         rasm_add_comment(r, "u32 -> f32");
         LOOP_MASK(p, i) i_ucvtf(r, vl[i].s4, vl[i].s4);
         LOOP_MASK(p, i) i_ucvtf(r, vh[i].s4, vh[i].s4);
@@ -923,7 +936,8 @@ static void asmgen_op_convert(SwsAArch64Context *s, const 
SwsAArch64OpImplParams
 
 /*********************************************************************/
 /* expand integers to the full range */
-/* AARCH64_SWS_OP_EXPAND */
+/* AARCH64_SWS_OP_EXPAND_PAIR */
+/* AARCH64_SWS_OP_EXPAND_QUAD */
 
 static void asmgen_op_expand(SwsAArch64Context *s, const 
SwsAArch64OpImplParams *p)
 {
@@ -932,7 +946,15 @@ static void asmgen_op_expand(SwsAArch64Context *s, const 
SwsAArch64OpImplParams
     RasmOp *vh = s->vh;
 
     size_t src_el_size = s->el_size;
-    size_t dst_el_size = aarch64_pixel_size(p->to_type);
+    SwsAArch64PixelType to_type;
+    switch (p->op) {
+    case AARCH64_SWS_OP_EXPAND_PAIR: to_type = AARCH64_PIXEL_U16; break;
+    case AARCH64_SWS_OP_EXPAND_QUAD: to_type = AARCH64_PIXEL_U32; break;
+    default:
+        av_assert0(!"Invalid op!");
+        break;
+    }
+    size_t dst_el_size = aarch64_pixel_size(to_type);
     size_t dst_total_size = p->block_size * dst_el_size;
     size_t dst_vec_size = FFMIN(dst_total_size, 16);
 
@@ -1350,8 +1372,12 @@ static void asmgen_op_cps(SwsAArch64Context *s, const 
SwsAArch64OpImplParams *p)
     case AARCH64_SWS_OP_LSHIFT:       asmgen_op_lshift(s, p);       break;
     case AARCH64_SWS_OP_RSHIFT:       asmgen_op_rshift(s, p);       break;
     case AARCH64_SWS_OP_CLEAR:        asmgen_op_clear(s, p);        break;
-    case AARCH64_SWS_OP_CONVERT:      asmgen_op_convert(s, p);      break;
-    case AARCH64_SWS_OP_EXPAND:       asmgen_op_expand(s, p);       break;
+    case AARCH64_SWS_OP_TO_U8:        asmgen_op_convert(s, p);      break;
+    case AARCH64_SWS_OP_TO_U16:       asmgen_op_convert(s, p);      break;
+    case AARCH64_SWS_OP_TO_U32:       asmgen_op_convert(s, p);      break;
+    case AARCH64_SWS_OP_TO_F32:       asmgen_op_convert(s, p);      break;
+    case AARCH64_SWS_OP_EXPAND_PAIR:  asmgen_op_expand(s, p);       break;
+    case AARCH64_SWS_OP_EXPAND_QUAD:  asmgen_op_expand(s, p);       break;
     case AARCH64_SWS_OP_MIN:          asmgen_op_min(s, p);          break;
     case AARCH64_SWS_OP_MAX:          asmgen_op_max(s, p);          break;
     case AARCH64_SWS_OP_SCALE:        asmgen_op_scale(s, p);        break;
diff --git a/libswscale/aarch64/ops_entries.c b/libswscale/aarch64/ops_entries.c
index 2aae4802bd..4f59aef574 100644
--- a/libswscale/aarch64/ops_entries.c
+++ b/libswscale/aarch64/ops_entries.c
@@ -272,58 +272,58 @@
 { .op = AARCH64_SWS_OP_CLEAR, .block_size = 16, .type = AARCH64_PIXEL_U16, 
.mask = 0x0011 },
 { .op = AARCH64_SWS_OP_CLEAR, .block_size = 16, .type = AARCH64_PIXEL_U16, 
.mask = 0x0111 },
 { .op = AARCH64_SWS_OP_CLEAR, .block_size = 16, .type = AARCH64_PIXEL_U16, 
.mask = 0x1000 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U8, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U8, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x0011 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U8, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U8, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U8, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U8, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U8, .block_size = 16, 
.type = AARCH64_PIXEL_U16, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_U32, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_U32, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x0011 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 
16, .type = AARCH64_PIXEL_U8, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 
16, .type = AARCH64_PIXEL_U8, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U16, .block_size = 
16, .type = AARCH64_PIXEL_U8, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_U16, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_U16, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_U32, .block_size = 8, 
.type = AARCH64_PIXEL_F32, .mask = 0x1111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x0010 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x0011 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x0100 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x1010 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x1100 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U8, .mask = 0x1111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U16, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U16, .mask = 0x0010 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U16, .mask = 0x0011 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U16, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U16, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U16, .mask = 0x1111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U32, .mask = 0x0010 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U32, .mask = 0x0100 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U32, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_CONVERT, .to_type = AARCH64_PIXEL_F32, .block_size = 8, 
.type = AARCH64_PIXEL_U32, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_EXPAND, .to_type = AARCH64_PIXEL_U16, .block_size = 16, 
.type = AARCH64_PIXEL_U8, .mask = 0x0001 },
-{ .op = AARCH64_SWS_OP_EXPAND, .to_type = AARCH64_PIXEL_U16, .block_size = 16, 
.type = AARCH64_PIXEL_U8, .mask = 0x0011 },
-{ .op = AARCH64_SWS_OP_EXPAND, .to_type = AARCH64_PIXEL_U16, .block_size = 16, 
.type = AARCH64_PIXEL_U8, .mask = 0x0111 },
-{ .op = AARCH64_SWS_OP_EXPAND, .to_type = AARCH64_PIXEL_U16, .block_size = 16, 
.type = AARCH64_PIXEL_U8, .mask = 0x1110 },
-{ .op = AARCH64_SWS_OP_EXPAND, .to_type = AARCH64_PIXEL_U16, .block_size = 16, 
.type = AARCH64_PIXEL_U8, .mask = 0x1111 },
+{ .op = AARCH64_SWS_OP_TO_U8, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_TO_U8, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x0011 },
+{ .op = AARCH64_SWS_OP_TO_U8, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U8, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1001 },
+{ .op = AARCH64_SWS_OP_TO_U8, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_TO_U8, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1111 },
+{ .op = AARCH64_SWS_OP_TO_U8, .block_size = 16, .type = AARCH64_PIXEL_U16, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_U32, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_U32, 
.mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x0011 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1001 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1111 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 16, .type = AARCH64_PIXEL_U8, 
.mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 16, .type = AARCH64_PIXEL_U8, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U16, .block_size = 16, .type = AARCH64_PIXEL_U8, 
.mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_U16, 
.mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_U16, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1001 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_TO_U32, .block_size = 8, .type = AARCH64_PIXEL_F32, 
.mask = 0x1111 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x0010 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x0011 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x0100 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x1010 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x1100 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U8, 
.mask = 0x1111 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U16, 
.mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U16, 
.mask = 0x0010 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U16, 
.mask = 0x0011 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U16, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U16, 
.mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U16, 
.mask = 0x1111 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U32, 
.mask = 0x0010 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U32, 
.mask = 0x0100 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U32, 
.mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_TO_F32, .block_size = 8, .type = AARCH64_PIXEL_U32, 
.mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_EXPAND_PAIR, .block_size = 16, .type = 
AARCH64_PIXEL_U8, .mask = 0x0001 },
+{ .op = AARCH64_SWS_OP_EXPAND_PAIR, .block_size = 16, .type = 
AARCH64_PIXEL_U8, .mask = 0x0011 },
+{ .op = AARCH64_SWS_OP_EXPAND_PAIR, .block_size = 16, .type = 
AARCH64_PIXEL_U8, .mask = 0x0111 },
+{ .op = AARCH64_SWS_OP_EXPAND_PAIR, .block_size = 16, .type = 
AARCH64_PIXEL_U8, .mask = 0x1110 },
+{ .op = AARCH64_SWS_OP_EXPAND_PAIR, .block_size = 16, .type = 
AARCH64_PIXEL_U8, .mask = 0x1111 },
 { .op = AARCH64_SWS_OP_MIN, .block_size = 8, .type = AARCH64_PIXEL_F32, .mask 
= 0x0001 },
 { .op = AARCH64_SWS_OP_MIN, .block_size = 8, .type = AARCH64_PIXEL_F32, .mask 
= 0x0011 },
 { .op = AARCH64_SWS_OP_MIN, .block_size = 8, .type = AARCH64_PIXEL_F32, .mask 
= 0x0111 },
diff --git a/libswscale/aarch64/ops_impl.c b/libswscale/aarch64/ops_impl.c
index d056b88162..2ed1effce6 100644
--- a/libswscale/aarch64/ops_impl.c
+++ b/libswscale/aarch64/ops_impl.c
@@ -92,8 +92,12 @@ static const char op_types[AARCH64_SWS_OP_TYPE_NB][32] = {
     [AARCH64_SWS_OP_LSHIFT        ] = "AARCH64_SWS_OP_LSHIFT",
     [AARCH64_SWS_OP_RSHIFT        ] = "AARCH64_SWS_OP_RSHIFT",
     [AARCH64_SWS_OP_CLEAR         ] = "AARCH64_SWS_OP_CLEAR",
-    [AARCH64_SWS_OP_CONVERT       ] = "AARCH64_SWS_OP_CONVERT",
-    [AARCH64_SWS_OP_EXPAND        ] = "AARCH64_SWS_OP_EXPAND",
+    [AARCH64_SWS_OP_TO_U8         ] = "AARCH64_SWS_OP_TO_U8",
+    [AARCH64_SWS_OP_TO_U16        ] = "AARCH64_SWS_OP_TO_U16",
+    [AARCH64_SWS_OP_TO_U32        ] = "AARCH64_SWS_OP_TO_U32",
+    [AARCH64_SWS_OP_TO_F32        ] = "AARCH64_SWS_OP_TO_F32",
+    [AARCH64_SWS_OP_EXPAND_PAIR   ] = "AARCH64_SWS_OP_EXPAND_PAIR",
+    [AARCH64_SWS_OP_EXPAND_QUAD   ] = "AARCH64_SWS_OP_EXPAND_QUAD",
     [AARCH64_SWS_OP_MIN           ] = "AARCH64_SWS_OP_MIN",
     [AARCH64_SWS_OP_MAX           ] = "AARCH64_SWS_OP_MAX",
     [AARCH64_SWS_OP_SCALE         ] = "AARCH64_SWS_OP_SCALE",
@@ -128,8 +132,12 @@ static const char 
op_type_names[AARCH64_SWS_OP_TYPE_NB][16] = {
     [AARCH64_SWS_OP_LSHIFT        ] = "lshift",
     [AARCH64_SWS_OP_RSHIFT        ] = "rshift",
     [AARCH64_SWS_OP_CLEAR         ] = "clear",
-    [AARCH64_SWS_OP_CONVERT       ] = "convert",
-    [AARCH64_SWS_OP_EXPAND        ] = "expand",
+    [AARCH64_SWS_OP_TO_U8         ] = "to_u8",
+    [AARCH64_SWS_OP_TO_U16        ] = "to_u16",
+    [AARCH64_SWS_OP_TO_U32        ] = "to_u32",
+    [AARCH64_SWS_OP_TO_F32        ] = "to_f32",
+    [AARCH64_SWS_OP_EXPAND_PAIR   ] = "expand_pair",
+    [AARCH64_SWS_OP_EXPAND_QUAD   ] = "expand_quad",
     [AARCH64_SWS_OP_MIN           ] = "min",
     [AARCH64_SWS_OP_MAX           ] = "max",
     [AARCH64_SWS_OP_SCALE         ] = "scale",
@@ -336,7 +344,6 @@ static const ParamField field_block_size       = { 
PARAM_FIELD(block_size),
 static const ParamField field_shift            = { PARAM_FIELD(shift),         
   print_u8_name,    print_u8_val,    cmp_u8 };
 static const ParamField field_move             = { PARAM_FIELD(move),          
   print_u48_name,   print_u48_val,   cmp_u48 };
 static const ParamField field_pack             = { PARAM_FIELD(pack),          
   print_u16_name,   print_u16_val,   cmp_u16 };
-static const ParamField field_to_type          = { PARAM_FIELD(to_type),       
   print_pixel_name, print_pixel_val, cmp_pixel };
 static const ParamField field_linear_mask      = { PARAM_FIELD(linear.mask),   
   print_u40_name,   print_u40_val,   cmp_u40 };
 static const ParamField field_linear_fmla      = { PARAM_FIELD(linear.fmla),   
   print_u8_name,    print_u8_val,    cmp_u8 };
 static const ParamField field_dither_y_offset  = { 
PARAM_FIELD(dither.y_offset),  print_u16_name,   print_u16_val,   cmp_u16 };
@@ -361,8 +368,12 @@ static const ParamField 
*op_fields[AARCH64_SWS_OP_TYPE_NB][MAX_LEVELS] = {
     [AARCH64_SWS_OP_LSHIFT        ] = { &field_op, &field_shift,               
                     &field_block_size, &field_type, &field_mask },
     [AARCH64_SWS_OP_RSHIFT        ] = { &field_op, &field_shift,               
                     &field_block_size, &field_type, &field_mask },
     [AARCH64_SWS_OP_CLEAR         ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
-    [AARCH64_SWS_OP_CONVERT       ] = { &field_op, &field_to_type,             
                     &field_block_size, &field_type, &field_mask },
-    [AARCH64_SWS_OP_EXPAND        ] = { &field_op, &field_to_type,             
                     &field_block_size, &field_type, &field_mask },
+    [AARCH64_SWS_OP_TO_U8         ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
+    [AARCH64_SWS_OP_TO_U16        ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
+    [AARCH64_SWS_OP_TO_U32        ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
+    [AARCH64_SWS_OP_TO_F32        ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
+    [AARCH64_SWS_OP_EXPAND_PAIR   ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
+    [AARCH64_SWS_OP_EXPAND_QUAD   ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
     [AARCH64_SWS_OP_MIN           ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
     [AARCH64_SWS_OP_MAX           ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
     [AARCH64_SWS_OP_SCALE         ] = { &field_op,                             
                     &field_block_size, &field_type, &field_mask },
diff --git a/libswscale/aarch64/ops_impl.h b/libswscale/aarch64/ops_impl.h
index 04ded26f34..afad648938 100644
--- a/libswscale/aarch64/ops_impl.h
+++ b/libswscale/aarch64/ops_impl.h
@@ -53,8 +53,12 @@ typedef enum SwsAArch64OpType {
     AARCH64_SWS_OP_LSHIFT,
     AARCH64_SWS_OP_RSHIFT,
     AARCH64_SWS_OP_CLEAR,
-    AARCH64_SWS_OP_CONVERT,
-    AARCH64_SWS_OP_EXPAND,
+    AARCH64_SWS_OP_TO_U8,
+    AARCH64_SWS_OP_TO_U16,
+    AARCH64_SWS_OP_TO_U32,
+    AARCH64_SWS_OP_TO_F32,
+    AARCH64_SWS_OP_EXPAND_PAIR,
+    AARCH64_SWS_OP_EXPAND_QUAD,
     AARCH64_SWS_OP_MIN,
     AARCH64_SWS_OP_MAX,
     AARCH64_SWS_OP_SCALE,
@@ -103,7 +107,6 @@ typedef struct SwsAArch64OpImplParams {
         uint8_t             shift;
         SwsAArch64MoveOp    move;
         SwsAArch64OpMask    pack;
-        SwsAArch64PixelType to_type;
         SwsAArch64LinearOp  linear;
         SwsAArch64DitherOp  dither;
     };
diff --git a/libswscale/aarch64/ops_impl_conv.c 
b/libswscale/aarch64/ops_impl_conv.c
index a17612d123..6afd69f33e 100644
--- a/libswscale/aarch64/ops_impl_conv.c
+++ b/libswscale/aarch64/ops_impl_conv.c
@@ -197,7 +197,19 @@ static int convert_to_aarch64_impl(SwsContext *ctx, const 
SwsOpList *ops, int n,
     case SWS_OP_RSHIFT:     out->op = AARCH64_SWS_OP_RSHIFT;     break;
     case SWS_OP_CLEAR:      out->op = AARCH64_SWS_OP_CLEAR;      break;
     case SWS_OP_CONVERT:
-        out->op = op->convert.expand ? AARCH64_SWS_OP_EXPAND : 
AARCH64_SWS_OP_CONVERT;
+        if (op->convert.expand) {
+            switch (op->convert.to) {
+            case SWS_PIXEL_U16: out->op = AARCH64_SWS_OP_EXPAND_PAIR; break;
+            case SWS_PIXEL_U32: out->op = AARCH64_SWS_OP_EXPAND_QUAD; break;
+            }
+        } else {
+            switch (op->convert.to) {
+            case SWS_PIXEL_U8:  out->op = AARCH64_SWS_OP_TO_U8;  break;
+            case SWS_PIXEL_U16: out->op = AARCH64_SWS_OP_TO_U16; break;
+            case SWS_PIXEL_U32: out->op = AARCH64_SWS_OP_TO_U32; break;
+            case SWS_PIXEL_F32: out->op = AARCH64_SWS_OP_TO_F32; break;
+            }
+        }
         break;
     case SWS_OP_MIN:        out->op = AARCH64_SWS_OP_MIN;        break;
     case SWS_OP_MAX:        out->op = AARCH64_SWS_OP_MAX;        break;
@@ -264,10 +276,6 @@ static int convert_to_aarch64_impl(SwsContext *ctx, const 
SwsOpList *ops, int n,
                 MASK_SET(out->mask, i, 1);
         }
         break;
-    case AARCH64_SWS_OP_EXPAND:
-    case AARCH64_SWS_OP_CONVERT:
-        out->to_type = sws_pixel_to_aarch64(op->convert.to);
-        break;
     case AARCH64_SWS_OP_LINEAR:
         /**
          * The out->linear.mask field packs the 4x5 matrix from SwsLinearOp as

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

Reply via email to