The branch, master has been updated
via 3cc1dc335821ef0c8cf351aa850f46965f55c26b (commit)
from 775b102182aef3cbdb29a7de47f250574b5b79d9 (commit)
- Log -----------------------------------------------------------------
commit 3cc1dc335821ef0c8cf351aa850f46965f55c26b
Author: Martin Storsjö <[email protected]>
AuthorDate: Wed Nov 19 10:43:26 2025 +0200
Commit: Niklas Haas <[email protected]>
CommitDate: Fri Nov 21 21:07:34 2025 +0000
swscale: Remove the unused ff_sws_pixel_type_to_uint
This function uses ff_sws_pixel_type_size to switch on the
size of the provided type. However, ff_sws_pixel_type_size returns
a size in bytes (from sizeof()), not a size in bits. Therefore,
this would previously never return the right thing but always
hit the av_unreachable() below.
As the function is entirely unused, just remove it.
This fixes compilation with MSVC 2026 18.0 when targeting ARM64,
which previously hit an internal compiler error [1].
[1]
https://developercommunity.visualstudio.com/t/Internal-Compiler-Error-targeting-ARM64-/10962922
diff --git a/libswscale/ops.c b/libswscale/ops.c
index 21aeb16931..1c408d7482 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -93,21 +93,6 @@ bool ff_sws_pixel_type_is_int(SwsPixelType type)
return false;
}
-SwsPixelType ff_sws_pixel_type_to_uint(SwsPixelType type)
-{
- if (!type)
- return type;
-
- switch (ff_sws_pixel_type_size(type)) {
- case 8: return SWS_PIXEL_U8;
- case 16: return SWS_PIXEL_U16;
- case 32: return SWS_PIXEL_U32;
- }
-
- av_unreachable("Invalid pixel type!");
- return SWS_PIXEL_NONE;
-}
-
/* biased towards `a` */
static AVRational av_min_q(AVRational a, AVRational b)
{
diff --git a/libswscale/ops.h b/libswscale/ops.h
index 8f26ee832e..dccc00d2f0 100644
--- a/libswscale/ops.h
+++ b/libswscale/ops.h
@@ -39,7 +39,6 @@ typedef enum SwsPixelType {
const char *ff_sws_pixel_type_name(SwsPixelType type);
int ff_sws_pixel_type_size(SwsPixelType type) av_const;
bool ff_sws_pixel_type_is_int(SwsPixelType type) av_const;
-SwsPixelType ff_sws_pixel_type_to_uint(SwsPixelType type) av_const;
typedef enum SwsOpType {
SWS_OP_INVALID = 0,
-----------------------------------------------------------------------
Summary of changes:
libswscale/ops.c | 15 ---------------
libswscale/ops.h | 1 -
2 files changed, 16 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]