From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id E9EE44B987 for ; Sat, 26 Apr 2025 17:58:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6D00268B78B; Sat, 26 Apr 2025 20:56:34 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E5AC568A210 for ; Sat, 26 Apr 2025 20:56:15 +0300 (EEST) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with UTF8SMTP id 1484D42873; Sat, 26 Apr 2025 19:56:11 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Sat, 26 Apr 2025 19:41:09 +0200 Message-ID: <20250426175603.726924-6-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250426175603.726924-1-ffmpeg@haasn.xyz> References: <20250426175603.726924-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/17] swscale/graph: prefer bools to ints X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas This is more consistent with the rest of the newly added code, which universally switched to using bools for boolean values. --- libswscale/format.c | 2 +- libswscale/format.h | 6 ++++-- libswscale/graph.h | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libswscale/format.c b/libswscale/format.c index b859af7b04..e4c1348b90 100644 --- a/libswscale/format.c +++ b/libswscale/format.c @@ -483,7 +483,7 @@ static int infer_trc_ref(SwsColor *csp, const SwsColor *ref) return 1; } -int ff_infer_colors(SwsColor *src, SwsColor *dst) +bool ff_infer_colors(SwsColor *src, SwsColor *dst) { int incomplete = 0; diff --git a/libswscale/format.h b/libswscale/format.h index 11b4345f7c..3b6d745159 100644 --- a/libswscale/format.h +++ b/libswscale/format.h @@ -21,6 +21,8 @@ #ifndef SWSCALE_FORMAT_H #define SWSCALE_FORMAT_H +#include + #include "libavutil/csp.h" #include "libavutil/pixdesc.h" @@ -129,7 +131,7 @@ static inline int ff_fmt_align(enum AVPixelFormat fmt) int ff_test_fmt(const SwsFormat *fmt, int output); -/* Returns 1 if the formats are incomplete, 0 otherwise */ -int ff_infer_colors(SwsColor *src, SwsColor *dst); +/* Returns true if the formats are incomplete, false otherwise */ +bool ff_infer_colors(SwsColor *src, SwsColor *dst); #endif /* SWSCALE_FORMAT_H */ diff --git a/libswscale/graph.h b/libswscale/graph.h index 191734b794..97378afc72 100644 --- a/libswscale/graph.h +++ b/libswscale/graph.h @@ -21,6 +21,8 @@ #ifndef SWSCALE_GRAPH_H #define SWSCALE_GRAPH_H +#include + #include "libavutil/slicethread.h" #include "swscale.h" #include "format.h" @@ -108,8 +110,8 @@ typedef struct SwsGraph { SwsContext *ctx; AVSliceThread *slicethread; int num_threads; /* resolved at init() time */ - int incomplete; /* set during init() if formats had to be inferred */ - int noop; /* set during init() if the graph is a no-op */ + bool incomplete; /* set during init() if formats had to be inferred */ + bool noop; /* set during init() if the graph is a no-op */ /** Sorted sequence of filter passes to apply */ SwsPass **passes; -- 2.49.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".