Skip to content

Commit

Permalink
vo: enable correct-downscaling, linear-downscaling, sigmoid-upscaling
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 authored and haasn committed Sep 19, 2023
1 parent 27a7827 commit 8121d41
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions DOCS/interface-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Interface changes
- remove `bcspline` filter (`bicubic` is now the same as `bcspline`)
- rename `--cache-dir` and `--cache-unlink-files` to `--demuxer-cache-dir` and
`--demuxer-cache-unlink-files`
- enable `--correct-downscaling`, `--linear-downscaling`, `--sigmoid-upscaling`
--- mpv 0.36.0 ---
- add `--target-contrast`
- Target luminance value is now also applied when ICC profile is used.
Expand Down
7 changes: 4 additions & 3 deletions DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5293,7 +5293,7 @@ them.
Catmull-Rom. A Cubic filter in the same vein as ``mitchell``, where
the ``B`` and ``C`` parameters are ``0.0`` and ``0.5`` respectively.
This filter is sharper than ``mitchell``, but it results in mild
ringing. Like ``mitchell``, this filter is good at downscaling (see
ringing. Like ``mitchell``, this filter is good at downscaling (see
``--dscale``).

``oversample``
Expand Down Expand Up @@ -5438,6 +5438,7 @@ them.
``--correct-downscaling``
When using convolution based filters, extend the filter size when
downscaling. Increases quality, but reduces performance while downscaling.
Enabled by default.

This will perform slightly sub-optimally for anamorphic video (but still
better than without it) since it will extend the size to match only the
Expand All @@ -5448,7 +5449,7 @@ them.
``--linear-downscaling``
Scale in linear light when downscaling. It should only be used with a
``--fbo-format`` that has at least 16 bit precision. This option
has no effect on HDR content.
has no effect on HDR content. Enabled by default.

``--linear-upscaling``
Scale in linear light when upscaling. Like ``--linear-downscaling``, it
Expand All @@ -5459,7 +5460,7 @@ them.

``--sigmoid-upscaling``
When upscaling, use a sigmoidal color transform to avoid emphasizing
ringing artifacts. This is incompatible with and replaces
ringing artifacts. Enabled by default. This is incompatible with and replaces
``--linear-upscaling``. (Note that sigmoidization also requires
linearization, so the ``LINEAR`` rendering step fires in both cases)

Expand Down
3 changes: 3 additions & 0 deletions video/out/gpu/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ static const struct gl_video_opts gl_video_opts_def = {
.clamp = 1, }, // tscale
},
.scaler_resizes_only = true,
.correct_downscaling = true,
.linear_downscaling = true,
.sigmoid_upscaling = true,
.scaler_lut_size = 6,
.interpolation_threshold = 0.01,
.alpha_mode = ALPHA_BLEND_TILES,
Expand Down

0 comments on commit 8121d41

Please sign in to comment.