mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
8d7858dd9d
commit
2585baa649
|
@ -319,12 +319,12 @@ opengl
|
|||
Enable use of PBOs. This is faster, but can sometimes lead to
|
||||
sporadic and temporary image corruption.
|
||||
|
||||
dither-depth=<n>
|
||||
Positive non-zero values select the target bit depth. Default: 0.
|
||||
dither-depth=<N|no|auto>
|
||||
Set dither target depth to N. Default: auto.
|
||||
|
||||
\-1
|
||||
no
|
||||
Disable any dithering done by mpv.
|
||||
0
|
||||
auto
|
||||
Automatic selection. If output bit depth can't be detected,
|
||||
8 bits per component are assumed.
|
||||
8
|
||||
|
@ -444,10 +444,10 @@ opengl-hq
|
|||
|
||||
This is equivalent to:
|
||||
|
||||
| --vo=opengl:lscale=lanczos2:dither-depth=0:pbo:fbo-format=rgb16
|
||||
| --vo=opengl:lscale=lanczos2:dither-depth=auto:pbo:fbo-format=rgb16
|
||||
|
||||
Note that some cheaper LCDs do dithering that gravely interferes with
|
||||
vo_opengl's dithering. Disabling dithering with ``dither-depth=-1`` helps.
|
||||
vo_opengl's dithering. Disabling dithering with ``dither-depth=no`` helps.
|
||||
|
||||
Unlike ``opengl``, ``opengl-hq`` makes use of FBOs by default. Sometimes you
|
||||
can achieve better quality or performance by changing the fbo-format
|
||||
|
|
|
@ -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}
|
||||
},
|
||||
|
|
|
@ -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"
|
||||
" 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: -1.\n"
|
||||
" Default: no.\n"
|
||||
" debug\n"
|
||||
" Check for OpenGL errors, i.e. call glGetError(). Also request a\n"
|
||||
" debug OpenGL context.\n"
|
||||
|
|
Loading…
Reference in New Issue