This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 7a09558e5c swscale/uops: move some simple functions to header file
7a09558e5c is described below
commit 7a09558e5cca19177efbdd9105f9d5ba9a6d50b5
Author: Ramiro Polla <[email protected]>
AuthorDate: Tue Jun 30 09:24:53 2026 +0200
Commit: Ramiro Polla <[email protected]>
CommitDate: Thu Jul 16 08:30:58 2026 +0000
swscale/uops: move some simple functions to header file
So that they may be used without uops.c.
This will be useful for aarch64/ops_asmgen.c which is built for the
host system, and not the target system.
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Ramiro Polla <[email protected]>
---
libswscale/ops.c | 32 --------------------------------
libswscale/uops.h | 30 ++++++++++++++++++++++++++++--
2 files changed, 28 insertions(+), 34 deletions(-)
diff --git a/libswscale/ops.c b/libswscale/ops.c
index b9d959c1e7..0582a32345 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -68,38 +68,6 @@ const char *ff_sws_pixel_type_name(SwsPixelType type)
return "ERR";
}
-int ff_sws_pixel_type_size(SwsPixelType type)
-{
- switch (type) {
- case SWS_PIXEL_U8: return sizeof(uint8_t);
- case SWS_PIXEL_U16: return sizeof(uint16_t);
- case SWS_PIXEL_U32: return sizeof(uint32_t);
- case SWS_PIXEL_F32: return sizeof(float);
- case SWS_PIXEL_NONE: break;
- case SWS_PIXEL_TYPE_NB: break;
- }
-
- av_unreachable("Invalid pixel type!");
- return 0;
-}
-
-bool ff_sws_pixel_type_is_int(SwsPixelType type)
-{
- switch (type) {
- case SWS_PIXEL_U8:
- case SWS_PIXEL_U16:
- case SWS_PIXEL_U32:
- return true;
- case SWS_PIXEL_F32:
- return false;
- case SWS_PIXEL_NONE:
- case SWS_PIXEL_TYPE_NB: break;
- }
-
- av_unreachable("Invalid pixel type!");
- return false;
-}
-
const char *ff_sws_op_type_name(SwsOpType op)
{
switch (op) {
diff --git a/libswscale/uops.h b/libswscale/uops.h
index 923b7743b5..ba63c5d596 100644
--- a/libswscale/uops.h
+++ b/libswscale/uops.h
@@ -45,8 +45,34 @@ typedef enum SwsPixelType {
} 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;
+
+static inline av_const int ff_sws_pixel_type_size(SwsPixelType type)
+{
+ switch (type) {
+ case SWS_PIXEL_U8: return sizeof(uint8_t);
+ case SWS_PIXEL_U16: return sizeof(uint16_t);
+ case SWS_PIXEL_U32: return sizeof(uint32_t);
+ case SWS_PIXEL_F32: return sizeof(float);
+ case SWS_PIXEL_NONE: break;
+ case SWS_PIXEL_TYPE_NB: break;
+ }
+ return 0;
+}
+
+static inline av_const bool ff_sws_pixel_type_is_int(SwsPixelType type)
+{
+ switch (type) {
+ case SWS_PIXEL_U8:
+ case SWS_PIXEL_U16:
+ case SWS_PIXEL_U32:
+ return true;
+ case SWS_PIXEL_F32:
+ return false;
+ case SWS_PIXEL_NONE:
+ case SWS_PIXEL_TYPE_NB: break;
+ }
+ return false;
+}
typedef union SwsPixel {
char data[4];
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]