The branch, master has been updated
via 1294ab5db1b029b05e27ddefe1dd583087644b3c (commit)
via 66faef3dbe74bdae40c852caa0ab28ca8cb7a8f7 (commit)
from a4fd3f27f4d911e807f9c45931a5fd5d3ae95c87 (commit)
- Log -----------------------------------------------------------------
commit 1294ab5db1b029b05e27ddefe1dd583087644b3c
Author: Kacper MichajÅow <[email protected]>
AuthorDate: Sat Sep 13 16:12:16 2025 +0200
Commit: Kacper MichajÅow <[email protected]>
CommitDate: Sat Sep 13 19:12:44 2025 +0200
swscale/ops_tmpl_int: remove unused arguments from wrap read decl
Signed-off-by: Kacper MichajÅow <[email protected]>
diff --git a/libswscale/ops_backend.h b/libswscale/ops_backend.h
index 7880bb608e..4a1794af8a 100644
--- a/libswscale/ops_backend.h
+++ b/libswscale/ops_backend.h
@@ -110,7 +110,11 @@ typedef struct SwsOpIter {
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)
\
+ block_t z, block_t w)
+
+#define DECL_IMPL_READ(NAME)
\
+ static SWS_FUNC void fn(NAME)(SwsOpIter *restrict iter,
\
+ const SwsOpImpl *restrict impl)
/* 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 0337ae5708..857031ada9 100644
--- a/libswscale/ops_tmpl_int.c
+++ b/libswscale/ops_tmpl_int.c
@@ -121,7 +121,7 @@ DECL_WRITE(write_packed, const int elems)
}
#define WRAP_READ(FUNC, ELEMS, FRAC, PACKED)
\
-DECL_IMPL(FUNC##ELEMS)
\
+DECL_IMPL_READ(FUNC##ELEMS)
\
{
\
CALL_READ(FUNC, ELEMS);
\
for (int i = 0; i < (PACKED ? 1 : ELEMS); i++)
\
commit 66faef3dbe74bdae40c852caa0ab28ca8cb7a8f7
Author: Kacper MichajÅow <[email protected]>
AuthorDate: Sat Sep 13 16:10:51 2025 +0200
Commit: Kacper MichajÅow <[email protected]>
CommitDate: Sat Sep 13 18:14:02 2025 +0200
swscale/ops_chain: add type removed ff_sws_op_chain_free_cb
to avoid pointer casting and UB of calling function with different
pointer type.
Signed-off-by: Kacper MichajÅow <[email protected]>
diff --git a/libswscale/ops_backend.c b/libswscale/ops_backend.c
index ac76dedbee..248a591fd2 100644
--- a/libswscale/ops_backend.c
+++ b/libswscale/ops_backend.c
@@ -98,7 +98,7 @@ static int compile(SwsContext *ctx, SwsOpList *ops,
SwsCompiledOp *out)
.block_size = SWS_BLOCK_SIZE,
.cpu_flags = chain->cpu_flags,
.priv = chain,
- .free = (void (*)(void *)) ff_sws_op_chain_free,
+ .free = ff_sws_op_chain_free_cb,
};
return 0;
}
diff --git a/libswscale/ops_chain.c b/libswscale/ops_chain.c
index ef768b4904..314789a652 100644
--- a/libswscale/ops_chain.c
+++ b/libswscale/ops_chain.c
@@ -31,11 +31,12 @@ SwsOpChain *ff_sws_op_chain_alloc(void)
return av_mallocz(sizeof(SwsOpChain));
}
-void ff_sws_op_chain_free(SwsOpChain *chain)
+void ff_sws_op_chain_free_cb(void *ptr)
{
- if (!chain)
+ if (!ptr)
return;
+ SwsOpChain *chain = ptr;
for (int i = 0; i < chain->num_impl + 1; i++) {
if (chain->free[i])
chain->free[i](chain->impl[i].priv.ptr);
diff --git a/libswscale/ops_chain.h b/libswscale/ops_chain.h
index ceff7e4e7e..7f436869b1 100644
--- a/libswscale/ops_chain.h
+++ b/libswscale/ops_chain.h
@@ -86,7 +86,11 @@ typedef struct SwsOpChain {
} SwsOpChain;
SwsOpChain *ff_sws_op_chain_alloc(void);
-void ff_sws_op_chain_free(SwsOpChain *chain);
+void ff_sws_op_chain_free_cb(void *chain);
+static inline void ff_sws_op_chain_free(SwsOpChain *chain)
+{
+ ff_sws_op_chain_free_cb(chain);
+}
/* Returns 0 on success, or a negative error code. */
int ff_sws_op_chain_append(SwsOpChain *chain, SwsFuncPtr func,
diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c
index 82a6d233b9..26f49582ae 100644
--- a/libswscale/x86/ops.c
+++ b/libswscale/x86/ops.c
@@ -649,7 +649,7 @@ static int compile(SwsContext *ctx, SwsOpList *ops,
SwsCompiledOp *out)
*out = (SwsCompiledOp) {
.priv = chain,
- .free = (void (*)(void *)) ff_sws_op_chain_free,
+ .free = ff_sws_op_chain_free_cb,
/* Use at most two full YMM regs during the widest precision section */
.block_size = 2 * FFMIN(mmsize, 32) / ff_sws_op_list_max_size(ops),
-----------------------------------------------------------------------
Summary of changes:
libswscale/ops_backend.c | 2 +-
libswscale/ops_backend.h | 6 +++++-
libswscale/ops_chain.c | 5 +++--
libswscale/ops_chain.h | 6 +++++-
libswscale/ops_tmpl_int.c | 2 +-
libswscale/x86/ops.c | 2 +-
6 files changed, 16 insertions(+), 7 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]