1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

swscale/graph: prefer bools to ints

This is more consistent with the rest of the newly added code, which
universally switched to using bools for boolean values.
This commit is contained in:
Niklas Haas
2025-03-06 10:37:40 +01:00
parent d95944786e
commit 6072e27e9a
3 changed files with 9 additions and 5 deletions

View File

@ -483,7 +483,7 @@ static int infer_trc_ref(SwsColor *csp, const SwsColor *ref)
return 1; return 1;
} }
int ff_infer_colors(SwsColor *src, SwsColor *dst) bool ff_infer_colors(SwsColor *src, SwsColor *dst)
{ {
int incomplete = 0; int incomplete = 0;

View File

@ -21,6 +21,8 @@
#ifndef SWSCALE_FORMAT_H #ifndef SWSCALE_FORMAT_H
#define SWSCALE_FORMAT_H #define SWSCALE_FORMAT_H
#include <stdbool.h>
#include "libavutil/csp.h" #include "libavutil/csp.h"
#include "libavutil/pixdesc.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); int ff_test_fmt(const SwsFormat *fmt, int output);
/* Returns 1 if the formats are incomplete, 0 otherwise */ /* Returns true if the formats are incomplete, false otherwise */
int ff_infer_colors(SwsColor *src, SwsColor *dst); bool ff_infer_colors(SwsColor *src, SwsColor *dst);
#endif /* SWSCALE_FORMAT_H */ #endif /* SWSCALE_FORMAT_H */

View File

@ -21,6 +21,8 @@
#ifndef SWSCALE_GRAPH_H #ifndef SWSCALE_GRAPH_H
#define SWSCALE_GRAPH_H #define SWSCALE_GRAPH_H
#include <stdbool.h>
#include "libavutil/slicethread.h" #include "libavutil/slicethread.h"
#include "swscale.h" #include "swscale.h"
#include "format.h" #include "format.h"
@ -109,8 +111,8 @@ typedef struct SwsGraph {
SwsContext *ctx; SwsContext *ctx;
AVSliceThread *slicethread; AVSliceThread *slicethread;
int num_threads; /* resolved at init() time */ int num_threads; /* resolved at init() time */
int incomplete; /* set during init() if formats had to be inferred */ bool incomplete; /* set during init() if formats had to be inferred */
int noop; /* set during init() if the graph is a no-op */ bool noop; /* set during init() if the graph is a no-op */
/** Sorted sequence of filter passes to apply */ /** Sorted sequence of filter passes to apply */
SwsPass **passes; SwsPass **passes;