builtin.conf: modernize internal profiles

The goal is to provide simple to understand quality/performance level
profiles for the users.

Instead of default and gpu-hq profile. There main profiles were added:
    - fast: can run on any hardware
    - default: balanced profile between quality and performance
    - high-quality: out of the box high quality experience. Intended
      mostly for dGPU.

Summary of three profiles, including default one:

[fast]
scale=bilinear
cscale=bilinear (implicit)
dscale=bilinear
dither=no
correct-downscaling=no
linear-downscaling=no
sigmoid-upscaling=no
hdr-compute-peak=no

[default] (implicit mpv defaults)
scale=lanczos
cscale=lanczos
dscale=mitchell
dither-depth=auto
correct-downscaling=yes
linear-downscaling=yes
sigmoid-upscaling=yes
hdr-compute-peak=yes

[high-quality] (inherits default options)
scale=ewa_lanczossharp
cscale=ewa_lanczossharp (implicit)
hdr-peak-percentile=99.995
hdr-contrast-recovery=0.30
allow-delayed-peak-detect=no
deband=yes
scaler-lut-size=8
This commit is contained in:
Kacper Michajłow 2023-09-12 23:25:20 +02:00 committed by Niklas Haas
parent 7e692ee490
commit 703f158880
4 changed files with 32 additions and 25 deletions

View File

@ -66,6 +66,8 @@ Interface changes
- enable `--correct-downscaling`, `--linear-downscaling`, `--sigmoid-upscaling` - enable `--correct-downscaling`, `--linear-downscaling`, `--sigmoid-upscaling`
- `--cscale` defaults to `--scale` if not defined - `--cscale` defaults to `--scale` if not defined
- change `--tscale` default to `oversample` - change `--tscale` default to `oversample`
- change `--dither-depth` to `auto`
- deprecate `--profile=gpu-hq`, add `--profile=<fast|high-quality>`
--- mpv 0.36.0 --- --- mpv 0.36.0 ---
- add `--target-contrast` - add `--target-contrast`
- Target luminance value is now also applied when ICC profile is used. - Target luminance value is now also applied when ICC profile is used.

View File

@ -5252,17 +5252,16 @@ them.
The filter function to use when upscaling video. The filter function to use when upscaling video.
``bilinear`` ``bilinear``
Bilinear hardware texture filtering (fastest, very low quality). This Bilinear hardware texture filtering (fastest, very low quality). This is
is the default for compatibility reasons. the default when using the ``fast`` profile.
``spline36`` ``spline36``
Mid quality and speed. This is the default when using ``gpu-hq``. Mid quality and speed.
``lanczos`` ``lanczos``
Lanczos scaling. Provides mid quality and speed. Generally worse than Lanczos scaling. Provides good balance between quality and performance.
``spline36``, but it results in a slightly sharper image which is good This is the default for ``scale``. The number of taps can be controlled
for some content types. The number of taps can be controlled with with ``scale-radius``, but is best left unchanged.
``scale-radius``, but is best left unchanged.
(This filter is an alias for ``sinc``-windowed ``sinc``) (This filter is an alias for ``sinc``-windowed ``sinc``)
@ -5275,8 +5274,8 @@ them.
(This filter is an alias for ``jinc``-windowed ``jinc``) (This filter is an alias for ``jinc``-windowed ``jinc``)
``ewa_lanczossharp`` ``ewa_lanczossharp``
A slightly sharpened version of ewa_lanczos. If your hardware can run A slightly sharpened version of ewa_lanczos. This is the default when
it, this is probably what you should use by default. using the ``high-quality`` profile.
``ewa_lanczos4sharpest`` ``ewa_lanczos4sharpest``
Very sharp scaler, but also slightly slower than ``ewa_lanczossharp``. Very sharp scaler, but also slightly slower than ``ewa_lanczossharp``.
@ -5287,7 +5286,7 @@ them.
``mitchell`` ``mitchell``
Mitchell-Netravali. The ``B`` and ``C`` parameters can be set with Mitchell-Netravali. The ``B`` and ``C`` parameters can be set with
``--scale-param1`` and ``--scale-param2``. This filter is very good at ``--scale-param1`` and ``--scale-param2``. This filter is very good at
downscaling (see ``--dscale``). downscaling. This is the default for ``--dscale``.
``catmull_rom`` ``catmull_rom``
Catmull-Rom. A Cubic filter in the same vein as ``mitchell``, where Catmull-Rom. A Cubic filter in the same vein as ``mitchell``, where
@ -5318,8 +5317,7 @@ them.
the filter implied by ``--scale`` will be applied. the filter implied by ``--scale`` will be applied.
``--dscale=<filter>`` ``--dscale=<filter>``
Like ``--scale``, but apply these filters on downscaling instead. If this Like ``--scale``, but apply these filters on downscaling instead.
option is unset, the filter implied by ``--scale`` will be applied.
``--tscale=<filter>`` ``--tscale=<filter>``
The filter used for interpolating the temporal axis (frames). This is only The filter used for interpolating the temporal axis (frames). This is only
@ -5445,7 +5443,7 @@ them.
better than without it) since it will extend the size to match only the better than without it) since it will extend the size to match only the
milder of the scale factors between the axes. milder of the scale factors between the axes.
Note: this option is ignored when using bilinear downscaling (the default). Note: this option is ignored when using bilinear downscaling with ``--vo=gpu``.
``--linear-downscaling`` ``--linear-downscaling``
Scale in linear light when downscaling. It should only be used with a Scale in linear light when downscaling. It should only be used with a
@ -5528,7 +5526,7 @@ them.
might be slower or cause latency issues. might be slower or cause latency issues.
``--dither-depth=<N|no|auto>`` ``--dither-depth=<N|no|auto>``
Set dither target depth to N. Default: no. Set dither target depth to N. Default: auto.
no no
Disable any dithering done by mpv. Disable any dithering done by mpv.

View File

@ -46,18 +46,26 @@ vlang=
alang= alang=
slang= slang=
[gpu-hq] [fast]
scale=spline36 scale=bilinear
cscale=spline36 dscale=bilinear
dscale=mitchell dither=no
dither-depth=auto correct-downscaling=no
linear-downscaling=no
sigmoid-upscaling=no
hdr-compute-peak=no
[high-quality]
scale=ewa_lanczossharp
hdr-peak-percentile=99.995 hdr-peak-percentile=99.995
hdr-contrast-recovery=0.30 hdr-contrast-recovery=0.30
allow-delayed-peak-detect=no allow-delayed-peak-detect=no
correct-downscaling=yes
linear-downscaling=yes
sigmoid-upscaling=yes
deband=yes deband=yes
scaler-lut-size=8
# Deprecated alias
[gpu-hq]
profile=high-quality
[low-latency] [low-latency]
audio-buffer=0 # minimize extra audio buffer (can lead to dropouts) audio-buffer=0 # minimize extra audio buffer (can lead to dropouts)

View File

@ -295,7 +295,6 @@ struct gl_video {
static const struct gl_video_opts gl_video_opts_def = { static const struct gl_video_opts gl_video_opts_def = {
.dither_algo = DITHER_FRUIT, .dither_algo = DITHER_FRUIT,
.dither_depth = -1,
.dither_size = 6, .dither_size = 6,
.temporal_dither_period = 1, .temporal_dither_period = 1,
.error_diffusion = "sierra-lite", .error_diffusion = "sierra-lite",
@ -303,9 +302,9 @@ static const struct gl_video_opts gl_video_opts_def = {
.sigmoid_center = 0.75, .sigmoid_center = 0.75,
.sigmoid_slope = 6.5, .sigmoid_slope = 6.5,
.scaler = { .scaler = {
{{"bilinear", .params={NAN, NAN}}, {.params = {NAN, NAN}}, {{"lanczos", .params={NAN, NAN}}, {.params = {NAN, NAN}},
.cutoff = 0.001}, // scale .cutoff = 0.001}, // scale
{{NULL, .params={NAN, NAN}}, {.params = {NAN, NAN}}, {{"mitchell", .params={NAN, NAN}}, {.params = {NAN, NAN}},
.cutoff = 0.001}, // dscale .cutoff = 0.001}, // dscale
{{NULL, .params={NAN, NAN}}, {.params = {NAN, NAN}}, {{NULL, .params={NAN, NAN}}, {.params = {NAN, NAN}},
.cutoff = 0.001}, // cscale .cutoff = 0.001}, // cscale