History

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.

Niklas Haas committed 1 year ago

Commit 6072e271 parent d9594473 files · +9 −5Browse files

Unified · Split

3 files
  1. libswscale/format.c +1 −1
  2. libswscale/format.h +4 −2
  3. libswscale/graph.h +4 −2
libswscale/format.c+1−1
@@ -483,7 +483,7 @@ static int infer_trc_ref(SwsColor *csp, const SwsColor *ref) · 482 unmodified lines
483 return 1;483 return 1;
484}484}
485 485
486int ff_infer_colors(SwsColor *src, SwsColor *dst)486bool ff_infer_colors(SwsColor *src, SwsColor *dst)
487{487{
488 int incomplete = 0;488 int incomplete = 0;
489 489
libswscale/format.h+4−2
@@ -21,6 +21,8 @@ · 20 unmodified lines
21#ifndef SWSCALE_FORMAT_H21#ifndef SWSCALE_FORMAT_H
22#define SWSCALE_FORMAT_H22#define SWSCALE_FORMAT_H
23 23
24#include <stdbool.h>
25
24#include "libavutil/csp.h"26#include "libavutil/csp.h"
25#include "libavutil/pixdesc.h"27#include "libavutil/pixdesc.h"
26 28
@@ -129,7 +131,7 @@ static inline int ff_fmt_align(enum AVPixelFormat fmt) · 102 unmodified lines
129 131
130int ff_test_fmt(const SwsFormat *fmt, int output);132int ff_test_fmt(const SwsFormat *fmt, int output);
131 133
132/* Returns 1 if the formats are incomplete, 0 otherwise */134/* Returns true if the formats are incomplete, false otherwise */
133int ff_infer_colors(SwsColor *src, SwsColor *dst);135bool ff_infer_colors(SwsColor *src, SwsColor *dst);
134 136
135#endif /* SWSCALE_FORMAT_H */137#endif /* SWSCALE_FORMAT_H */
libswscale/graph.h+4−2
@@ -21,6 +21,8 @@ · 20 unmodified lines
21#ifndef SWSCALE_GRAPH_H21#ifndef SWSCALE_GRAPH_H
22#define SWSCALE_GRAPH_H22#define SWSCALE_GRAPH_H
23 23
24#include <stdbool.h>
25
24#include "libavutil/slicethread.h"26#include "libavutil/slicethread.h"
25#include "swscale.h"27#include "swscale.h"
26#include "format.h"28#include "format.h"
@@ -109,8 +111,8 @@ typedef struct SwsGraph { · 82 unmodified lines
109 SwsContext *ctx;111 SwsContext *ctx;
110 AVSliceThread *slicethread;112 AVSliceThread *slicethread;
111 int num_threads; /* resolved at init() time */113 int num_threads; /* resolved at init() time */
112 int incomplete; /* set during init() if formats had to be inferred */114 bool incomplete; /* set during init() if formats had to be inferred */
113 int noop; /* set during init() if the graph is a no-op */115 bool noop; /* set during init() if the graph is a no-op */
114 116
115 /** Sorted sequence of filter passes to apply */117 /** Sorted sequence of filter passes to apply */
116 SwsPass **passes;118 SwsPass **passes;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t