summaryrefslogtreecommitdiffstats
path: root/video/out/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gpu')
-rw-r--r--video/out/gpu/context.c4
-rw-r--r--video/out/gpu/context.h4
-rw-r--r--video/out/gpu/lcms.c4
-rw-r--r--video/out/gpu/lcms.h4
-rw-r--r--video/out/gpu/user_shaders.c1
-rw-r--r--video/out/gpu/video.c33
-rw-r--r--video/out/gpu/video.h26
7 files changed, 38 insertions, 38 deletions
diff --git a/video/out/gpu/context.c b/video/out/gpu/context.c
index a145e2dc98..e41dd99476 100644
--- a/video/out/gpu/context.c
+++ b/video/out/gpu/context.c
@@ -269,8 +269,8 @@ const struct m_sub_options ra_ctx_conf = {
{"gpu-api",
OPT_STRING_VALIDATE(context_type, ra_ctx_validate_api),
.help = ra_ctx_api_help},
- {"gpu-debug", OPT_FLAG(debug)},
- {"gpu-sw", OPT_FLAG(allow_sw)},
+ {"gpu-debug", OPT_BOOL(debug)},
+ {"gpu-sw", OPT_BOOL(allow_sw)},
{0}
},
.size = sizeof(struct ra_ctx_opts),
diff --git a/video/out/gpu/context.h b/video/out/gpu/context.h
index dae95fa666..a7510c2afd 100644
--- a/video/out/gpu/context.h
+++ b/video/out/gpu/context.h
@@ -6,9 +6,9 @@
#include "ra.h"
struct ra_ctx_opts {
- int allow_sw; // allow software renderers
+ bool allow_sw; // allow software renderers
int want_alpha; // create an alpha framebuffer if possible
- int debug; // enable debugging layers/callbacks etc.
+ bool debug; // enable debugging layers/callbacks etc.
bool probing; // the backend was auto-probed
char *context_name; // filter by `ra_ctx_fns.name`
char *context_type; // filter by `ra_ctx_fns.type`
diff --git a/video/out/gpu/lcms.c b/video/out/gpu/lcms.c
index 3df5eba5f2..bbf857d968 100644
--- a/video/out/gpu/lcms.c
+++ b/video/out/gpu/lcms.c
@@ -491,9 +491,9 @@ static int validate_3dlut_size_opt(struct mp_log *log, const m_option_t *opt,
#define OPT_BASE_STRUCT struct mp_icc_opts
const struct m_sub_options mp_icc_conf = {
.opts = (const m_option_t[]) {
- {"use-embedded-icc-profile", OPT_FLAG(use_embedded)},
+ {"use-embedded-icc-profile", OPT_BOOL(use_embedded)},
{"icc-profile", OPT_STRING(profile), .flags = M_OPT_FILE},
- {"icc-profile-auto", OPT_FLAG(profile_auto)},
+ {"icc-profile-auto", OPT_BOOL(profile_auto)},
{"icc-cache-dir", OPT_STRING(cache_dir), .flags = M_OPT_FILE},
{"icc-intent", OPT_INT(intent)},
{"icc-force-contrast", OPT_CHOICE(contrast, {"no", 0}, {"inf", -1}),
diff --git a/video/out/gpu/lcms.h b/video/out/gpu/lcms.h
index 62b2437194..bd4b16175a 100644
--- a/video/out/gpu/lcms.h
+++ b/video/out/gpu/lcms.h
@@ -10,9 +10,9 @@
extern const struct m_sub_options mp_icc_conf;
struct mp_icc_opts {
- int use_embedded;
+ bool use_embedded;
char *profile;
- int profile_auto;
+ bool profile_auto;
char *cache_dir;
char *size_str;
int intent;
diff --git a/video/out/gpu/user_shaders.c b/video/out/gpu/user_shaders.c
index 708de87485..03842377f8 100644
--- a/video/out/gpu/user_shaders.c
+++ b/video/out/gpu/user_shaders.c
@@ -170,7 +170,6 @@ static bool parse_hook(struct mp_log *log, struct bstr *body,
*out = (struct gl_user_shader_hook){
.pass_desc = bstr0("(unknown)"),
.offset = identity_trans,
- .align_offset = false,
.width = {{ SZEXP_VAR_W, { .varname = bstr0("HOOKED") }}},
.height = {{ SZEXP_VAR_H, { .varname = bstr0("HOOKED") }}},
.cond = {{ SZEXP_CONST, { .cval = 1.0 }}},
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c
index b94f4d85be..90b22dab23 100644
--- a/video/out/gpu/video.c
+++ b/video/out/gpu/video.c
@@ -25,6 +25,7 @@
#include <libavutil/common.h>
#include <libavutil/lfg.h>
+#include "options/m_option.h"
#include "video.h"
#include "misc/bstr.h"
@@ -312,7 +313,7 @@ static const struct gl_video_opts gl_video_opts_def = {
{{"mitchell", .params={NAN, NAN}}, {.params = {NAN, NAN}},
.clamp = 1, }, // tscale
},
- .scaler_resizes_only = 1,
+ .scaler_resizes_only = true,
.scaler_lut_size = 6,
.interpolation_threshold = 0.01,
.alpha_mode = ALPHA_BLEND_TILES,
@@ -368,7 +369,7 @@ const struct m_sub_options gl_video_conf = {
{"auto", 0}, {"yes", 1}, {"no", -1})},
{"gamma-factor", OPT_FLOAT(gamma), M_RANGE(0.1, 2.0),
.deprecation_message = "no replacement"},
- {"gamma-auto", OPT_FLAG(gamma_auto),
+ {"gamma-auto", OPT_BOOL(gamma_auto),
.deprecation_message = "no replacement"},
{"target-prim", OPT_CHOICE_C(target_prim, mp_csp_prim_names)},
{"target-trc", OPT_CHOICE_C(target_trc, mp_csp_trc_names)},
@@ -388,7 +389,7 @@ const struct m_sub_options gl_video_conf = {
{"st2094-40", TONE_MAPPING_ST2094_40},
{"st2094-10", TONE_MAPPING_ST2094_10})},
{"tone-mapping-param", OPT_FLOATDEF(tone_map.curve_param)},
- {"inverse-tone-mapping", OPT_FLAG(tone_map.inverse)},
+ {"inverse-tone-mapping", OPT_BOOL(tone_map.inverse)},
{"tone-mapping-crosstalk", OPT_FLOAT(tone_map.crosstalk),
M_RANGE(0.0, 0.3)},
{"tone-mapping-max-boost", OPT_FLOAT(tone_map.max_boost),
@@ -399,7 +400,7 @@ const struct m_sub_options gl_video_conf = {
{"max", TONE_MAP_MODE_MAX},
{"hybrid", TONE_MAP_MODE_HYBRID},
{"luma", TONE_MAP_MODE_LUMA})},
- {"tone-mapping-visualize", OPT_FLAG(tone_map.visualize)},
+ {"tone-mapping-visualize", OPT_BOOL(tone_map.visualize)},
{"gamut-mapping-mode", OPT_CHOICE(tone_map.gamut_mode,
{"auto", GAMUT_AUTO},
{"clip", GAMUT_CLIP},
@@ -416,17 +417,17 @@ const struct m_sub_options gl_video_conf = {
M_RANGE(0, 20.0)},
{"hdr-scene-threshold-high", OPT_FLOAT(tone_map.scene_threshold_high),
M_RANGE(0, 20.0)},
- {"opengl-pbo", OPT_FLAG(pbo)},
+ {"opengl-pbo", OPT_BOOL(pbo)},
SCALER_OPTS("scale", SCALER_SCALE),
SCALER_OPTS("dscale", SCALER_DSCALE),
SCALER_OPTS("cscale", SCALER_CSCALE),
SCALER_OPTS("tscale", SCALER_TSCALE),
{"scaler-lut-size", OPT_INT(scaler_lut_size), M_RANGE(4, 10)},
- {"scaler-resizes-only", OPT_FLAG(scaler_resizes_only)},
- {"correct-downscaling", OPT_FLAG(correct_downscaling)},
- {"linear-downscaling", OPT_FLAG(linear_downscaling)},
- {"linear-upscaling", OPT_FLAG(linear_upscaling)},
- {"sigmoid-upscaling", OPT_FLAG(sigmoid_upscaling)},
+ {"scaler-resizes-only", OPT_BOOL(scaler_resizes_only)},
+ {"correct-downscaling", OPT_BOOL(correct_downscaling)},
+ {"linear-downscaling", OPT_BOOL(linear_downscaling)},
+ {"linear-upscaling", OPT_BOOL(linear_upscaling)},
+ {"sigmoid-upscaling", OPT_BOOL(sigmoid_upscaling)},
{"sigmoid-center", OPT_FLOAT(sigmoid_center), M_RANGE(0.0, 1.0)},
{"sigmoid-slope", OPT_FLOAT(sigmoid_slope), M_RANGE(1.0, 20.0)},
{"fbo-format", OPT_STRING(fbo_format)},
@@ -438,7 +439,7 @@ const struct m_sub_options gl_video_conf = {
{"error-diffusion", DITHER_ERROR_DIFFUSION},
{"no", DITHER_NONE})},
{"dither-size-fruit", OPT_INT(dither_size), M_RANGE(2, 8)},
- {"temporal-dither", OPT_FLAG(temporal_dither)},
+ {"temporal-dither", OPT_BOOL(temporal_dither)},
{"temporal-dither-period", OPT_INT(temporal_dither_period),
M_RANGE(1, 128)},
{"error-diffusion",
@@ -448,9 +449,9 @@ const struct m_sub_options gl_video_conf = {
{"yes", ALPHA_YES},
{"blend", ALPHA_BLEND},
{"blend-tiles", ALPHA_BLEND_TILES})},
- {"opengl-rectangle-textures", OPT_FLAG(use_rectangle)},
+ {"opengl-rectangle-textures", OPT_BOOL(use_rectangle)},
{"background", OPT_COLOR(background)},
- {"interpolation", OPT_FLAG(interpolation)},
+ {"interpolation", OPT_BOOL(interpolation)},
{"interpolation-threshold", OPT_FLOAT(interpolation_threshold)},
{"blend-subtitles", OPT_CHOICE(blend_subs,
{"no", BLEND_SUBS_NO},
@@ -459,7 +460,7 @@ const struct m_sub_options gl_video_conf = {
{"glsl-shaders", OPT_PATHLIST(user_shaders), .flags = M_OPT_FILE},
{"glsl-shader", OPT_CLI_ALIAS("glsl-shaders-append")},
{"glsl-shader-opts", OPT_KEYVALUELIST(user_shader_opts)},
- {"deband", OPT_FLAG(deband)},
+ {"deband", OPT_BOOL(deband)},
{"deband", OPT_SUBSTRUCT(deband_opts, deband_conf)},
{"sharpen", OPT_FLOAT(unsharp)},
{"gpu-tex-pad-x", OPT_INT(tex_pad_x), M_RANGE(0, 4096)},
@@ -3876,7 +3877,7 @@ static void check_gl_features(struct gl_video *p)
// p->opts is a copy => we can just mess with it.
p->opts.scaler[n].kernel.name = "bilinear";
if (n == SCALER_TSCALE)
- p->opts.interpolation = 0;
+ p->opts.interpolation = false;
}
}
}
@@ -3900,7 +3901,7 @@ static void check_gl_features(struct gl_video *p)
MP_WARN(p, "Disabling color management (GLSL version too old).\n");
}
if (!have_mglsl && p->opts.deband) {
- p->opts.deband = 0;
+ p->opts.deband = false;
MP_WARN(p, "Disabling debanding (GLSL version too old).\n");
}
}
diff --git a/video/out/gpu/video.h b/video/out/gpu/video.h
index 692d261584..0ef4618790 100644
--- a/video/out/gpu/video.h
+++ b/video/out/gpu/video.h
@@ -122,7 +122,7 @@ struct gl_tone_map_opts {
int curve;
float curve_param;
float max_boost;
- int inverse;
+ bool inverse;
float crosstalk;
int mode;
int compute_peak;
@@ -130,7 +130,7 @@ struct gl_tone_map_opts {
float scene_threshold_low;
float scene_threshold_high;
int gamut_mode;
- int visualize;
+ bool visualize;
};
struct gl_video_opts {
@@ -138,35 +138,35 @@ struct gl_video_opts {
struct scaler_config scaler[4];
int scaler_lut_size;
float gamma;
- int gamma_auto;
+ bool gamma_auto;
int target_prim;
int target_trc;
int target_peak;
struct gl_tone_map_opts tone_map;
- int correct_downscaling;
- int linear_downscaling;
- int linear_upscaling;
- int sigmoid_upscaling;
+ bool correct_downscaling;
+ bool linear_downscaling;
+ bool linear_upscaling;
+ bool sigmoid_upscaling;
float sigmoid_center;
float sigmoid_slope;
- int scaler_resizes_only;
- int pbo;
+ bool scaler_resizes_only;
+ bool pbo;
int dither_depth;
int dither_algo;
int dither_size;
- int temporal_dither;
+ bool temporal_dither;
int temporal_dither_period;
char *error_diffusion;
char *fbo_format;
int alpha_mode;
- int use_rectangle;
+ bool use_rectangle;
struct m_color background;
- int interpolation;
+ bool interpolation;
float interpolation_threshold;
int blend_subs;
char **user_shaders;
char **user_shader_opts;
- int deband;
+ bool deband;
struct deband_opts *deband_opts;
float unsharp;
int tex_pad_x, tex_pad_y;