summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-28 21:39:17 +0100
committerwm4 <wm4@nowhere>2013-03-28 21:46:18 +0100
commit2585baa649afdda14069aa1d20d32706bb97b8f9 (patch)
tree61192e0a31cbb9b4997543e1dc5200560b2f7794 /video
parent8d7858dd9d10181e4cb812827f1f631d06fc779e (diff)
downloadmpv-2585baa649afdda14069aa1d20d32706bb97b8f9.tar.bz2
mpv-2585baa649afdda14069aa1d20d32706bb97b8f9.tar.xz
gl_video: use choice option type for dither-depth suboption
Replaces the numeric magic values -1 and 0 with "no" and "auto". The numeric values are still allowed for compatibility.
Diffstat (limited to 'video')
-rw-r--r--video/out/gl_video.c3
-rw-r--r--video/out/vo_opengl.c12
2 files changed, 8 insertions, 7 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 5b98e42d56..22f4100e9a 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -256,7 +256,8 @@ const struct m_sub_options gl_video_conf = {
{"rgba16", GL_RGBA16},
{"rgba16f", GL_RGBA16F},
{"rgba32f", GL_RGBA32F})),
- OPT_INTRANGE("dither-depth", dither_depth, 0, -1, 16),
+ OPT_CHOICE_OR_INT("dither-depth", dither_depth, 0, -1, 16,
+ ({"no", -1}, {"auto", 0})),
OPT_FLAG("alpha", enable_alpha, 0),
{0}
},
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index ba31e0cbf5..3469cae794 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -390,7 +390,7 @@ const struct vo_driver video_out_opengl_hq = {
.priv_size = sizeof(struct gl_priv),
.options = options,
.help_text = help_text,
- .init_option_string = "lscale=lanczos2:dither-depth=0:pbo:fbo-format=rgb16",
+ .init_option_string = "lscale=lanczos2:dither-depth=auto:pbo:fbo-format=rgb16",
};
static const char help_text[] =
@@ -431,11 +431,11 @@ static const char help_text[] =
" sporadic and temporary image corruption.\n"
" dither-depth=<n>\n"
" Positive non-zero values select the target bit depth.\n"
-" -1: Disable any dithering done by mpv.\n"
-" 0: Automatic selection. If output bit depth can't be detected,\n"
-" 8 bits per component are assumed.\n"
-" 8: Dither to 8 bit output.\n"
-" Default: -1.\n"
+" no: Disable any dithering done by mpv.\n"
+" auto: Automatic selection. If output bit depth can't be detected,\n"
+" 8 bits per component are assumed.\n"
+" 8: Dither to 8 bit output.\n"
+" Default: no.\n"
" debug\n"
" Check for OpenGL errors, i.e. call glGetError(). Also request a\n"
" debug OpenGL context.\n"