PR #25531 opened by Ramiro Polla (ramiro) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25531 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25531.patch
This also helps with breakpoints, backtraces, and perf reports. >From 05f05c795830c6bc6fb0cda8c98794d3ec3260b2 Mon Sep 17 00:00:00 2001 From: Ramiro Polla <[email protected]> Date: Tue, 27 Oct 2026 16:59:46 +0100 Subject: [PATCH 1/3] swscale/vulkan/ops: rename free_fn to spirv_free Make it consistent with spirv_process. --- libswscale/vulkan/ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libswscale/vulkan/ops.c b/libswscale/vulkan/ops.c index 5492a9390e5..530bfbf1151 100644 --- a/libswscale/vulkan/ops.c +++ b/libswscale/vulkan/ops.c @@ -178,7 +178,7 @@ error: av_err2str(err)); } -static void free_fn(void *priv) +static void spirv_free(void *priv) { VulkanPriv *p = priv; ff_vk_exec_pool_free(&p->s->vkctx, &p->e); @@ -1245,13 +1245,13 @@ static int compile_spirv(SwsContext *sws, const SwsOpList *ops, .opaque = true, .func_opaque = spirv_process, .priv = p, - .free = free_fn, + .free = spirv_free, }; return 0; fail: - free_fn(p); + spirv_free(p); return err; } -- 2.54.0 >From fd1200c2201d1195e46a3466ca7f33e240829998 Mon Sep 17 00:00:00 2001 From: Ramiro Polla <[email protected]> Date: Tue, 27 Oct 2026 17:02:01 +0100 Subject: [PATCH 2/3] swscale: name backend process functions consistently Name the SwsCompiledOp.func c callbacks process_<backend>. --- libswscale/ops_memcpy.c | 6 +++--- libswscale/uops_backend.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libswscale/ops_memcpy.c b/libswscale/ops_memcpy.c index 735006ab188..0f003a81c9b 100644 --- a/libswscale/ops_memcpy.c +++ b/libswscale/ops_memcpy.c @@ -38,8 +38,8 @@ typedef struct MemcpyPriv { /* Memcpy backend for trivial cases */ -static void process(const SwsOpExec *exec, const void *priv, - int x_start, int y_start, int x_end, int y_end) +static void process_memcpy(const SwsOpExec *exec, const void *priv, + int x_start, int y_start, int x_end, int y_end) { const MemcpyPriv *p = priv; const int lines = y_end - y_start; @@ -139,7 +139,7 @@ static int compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) *out = (SwsCompiledOp) { .slice_align = 1, .block_size = 1, - .func = process, + .func = process_memcpy, .priv = av_memdup(&p, sizeof(p)), .free = av_free, }; diff --git a/libswscale/uops_backend.c b/libswscale/uops_backend.c index 5dfb829b4e4..29491bfbe0a 100644 --- a/libswscale/uops_backend.c +++ b/libswscale/uops_backend.c @@ -106,9 +106,9 @@ static const SwsUOpTable uop_table = { }, }; -static void process(const SwsOpExec *exec, const void *priv, - const int bx_start, const int y_start, - int bx_end, int y_end) +static void process_c(const SwsOpExec *exec, const void *priv, + const int bx_start, const int y_start, + int bx_end, int y_end) { const SwsOpChain *chain = priv; const SwsOpImpl *impl = chain->impl; @@ -159,7 +159,7 @@ static int compile_uops_c(SwsContext *ctx, const SwsUOpList *uops, SwsCompiledOp .cpu_flags = chain->cpu_flags, .priv = chain, .free = ff_sws_op_chain_free_cb, - .func = process, + .func = process_c, }; memcpy(out->over_read, chain->over_read, sizeof(out->over_read)); -- 2.54.0 >From 5b561493e4615a89bf1d46911a41fb7fe6ab1d82 Mon Sep 17 00:00:00 2001 From: Ramiro Polla <[email protected]> Date: Tue, 27 Oct 2026 17:05:46 +0100 Subject: [PATCH 3/3] swscale: name backend compile callbacks consistently Name the SwsOpBackend.compile callbacks compile_ops_<backend> and the SwsOpBackend.compile_uops callbacks compile_uops_<backend>. --- libswscale/aarch64/ops.c | 12 ++++++------ libswscale/ops_memcpy.c | 4 ++-- libswscale/uops_backend.c | 4 ++-- libswscale/vulkan/ops.c | 6 +++--- libswscale/x86/ops.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libswscale/aarch64/ops.c b/libswscale/aarch64/ops.c index 963bfec7308..fea71a618a6 100644 --- a/libswscale/aarch64/ops.c +++ b/libswscale/aarch64/ops.c @@ -151,7 +151,7 @@ static int aarch64_setup(const SwsUOp *uop, const SwsAArch64OpImplParams *p, } /*********************************************************************/ -static int aarch64_compile_uops(SwsContext *ctx, const SwsUOpList *uops, +static int compile_uops_aarch64(SwsContext *ctx, const SwsUOpList *uops, SwsCompiledOp *out) { int ret; @@ -218,8 +218,8 @@ error: } /*********************************************************************/ -static int aarch64_compile(SwsContext *ctx, const SwsOpList *ops, - SwsCompiledOp *out) +static int compile_ops_aarch64(SwsContext *ctx, const SwsOpList *ops, + SwsCompiledOp *out) { SwsUOpList *uops = ff_sws_uop_list_alloc(); if (!uops) @@ -230,7 +230,7 @@ static int aarch64_compile(SwsContext *ctx, const SwsOpList *ops, if (ret < 0) goto error; - ret = aarch64_compile_uops(ctx, uops, out); + ret = compile_uops_aarch64(ctx, uops, out); error: ff_sws_uop_list_free(&uops); @@ -241,7 +241,7 @@ error: const SwsOpBackend backend_aarch64 = { .name = "aarch64", .flags = SWS_BACKEND_AARCH64, - .compile = aarch64_compile, - .compile_uops = aarch64_compile_uops, + .compile = compile_ops_aarch64, + .compile_uops = compile_uops_aarch64, .hw_format = AV_PIX_FMT_NONE, }; diff --git a/libswscale/ops_memcpy.c b/libswscale/ops_memcpy.c index 0f003a81c9b..9c8345569f9 100644 --- a/libswscale/ops_memcpy.c +++ b/libswscale/ops_memcpy.c @@ -75,7 +75,7 @@ static void process_memcpy(const SwsOpExec *exec, const void *priv, } } -static int compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) +static int compile_ops_memcpy(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) { MemcpyPriv p = {0}; @@ -149,6 +149,6 @@ static int compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) const SwsOpBackend backend_murder = { .name = "memcpy", .flags = SWS_BACKEND_MEMCPY, - .compile = compile, + .compile = compile_ops_memcpy, .hw_format = AV_PIX_FMT_NONE, }; diff --git a/libswscale/uops_backend.c b/libswscale/uops_backend.c index 29491bfbe0a..fbe683348cc 100644 --- a/libswscale/uops_backend.c +++ b/libswscale/uops_backend.c @@ -179,7 +179,7 @@ fail: return ret; } -static int compile_c(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) +static int compile_ops_c(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) { SwsUOpList *uops = ff_sws_uop_list_alloc(); if (!uops) @@ -202,7 +202,7 @@ fail: const SwsOpBackend backend_c = { .name = "c", .flags = SWS_BACKEND_C, - .compile = compile_c, + .compile = compile_ops_c, .compile_uops = compile_uops_c, .hw_format = AV_PIX_FMT_NONE, }; diff --git a/libswscale/vulkan/ops.c b/libswscale/vulkan/ops.c index 530bfbf1151..ce189e89457 100644 --- a/libswscale/vulkan/ops.c +++ b/libswscale/vulkan/ops.c @@ -1209,8 +1209,8 @@ fail: return err; } -static int compile_spirv(SwsContext *sws, const SwsOpList *ops, - SwsCompiledOp *out) +static int compile_ops_spirv(SwsContext *sws, const SwsOpList *ops, + SwsCompiledOp *out) { int err; SwsInternal *c = sws_internal(sws); @@ -1258,6 +1258,6 @@ fail: const SwsOpBackend backend_spirv = { .name = "spirv", .flags = SWS_BACKEND_SPIRV, - .compile = compile_spirv, + .compile = compile_ops_spirv, .hw_format = AV_PIX_FMT_VULKAN, }; diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c index 7985b7a0266..43e2c9d0248 100644 --- a/libswscale/x86/ops.c +++ b/libswscale/x86/ops.c @@ -716,7 +716,7 @@ fail: return ret; } -static int compile_x86(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) +static int compile_ops_x86(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) { const int cpu_flags = av_get_cpu_flags(); const int mmsize = get_mmsize(); @@ -748,7 +748,7 @@ fail: const SwsOpBackend backend_x86 = { .name = "x86", .flags = SWS_BACKEND_X86, - .compile = compile_x86, + .compile = compile_ops_x86, .compile_uops = compile_uops_x86, .hw_format = AV_PIX_FMT_NONE, }; -- 2.54.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
