Skip to content

Commit

Permalink
vo_gpu: default to dscale=hermite
Browse files Browse the repository at this point in the history
This new filter is slightly sharper, and significantly faster, than
mitchell. It also tends to preserve detail better. All in all, there is
no reason not to use it by default, especially from a performance PoV.
(In vo_gpu_next, hermite is implemented efficiently using hardware
accelerated bilinear interpolation)

See-Also: https://code.videolan.org/videolan/libplacebo/-/commit/75b3947b2c07803456483ec6976c037bad91b5dd
  • Loading branch information
haasn committed Sep 20, 2023
1 parent 87baed0 commit c172a65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions DOCS/interface-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Interface changes
- change `--tscale` default to `oversample`
- change `--dither-depth` to `auto`
- deprecate `--profile=gpu-hq`, add `--profile=<fast|high-quality>`
- change `--dscale` default to `hermite`
--- mpv 0.36.0 ---
- add `--target-contrast`
- Target luminance value is now also applied when ICC profile is used.
Expand Down
6 changes: 3 additions & 3 deletions DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5282,13 +5282,13 @@ them.

``mitchell``
Mitchell-Netravali. The ``B`` and ``C`` parameters can be set with
``--scale-param1`` and ``--scale-param2``. This is the default for
``--dscale``.
``--scale-param1`` and ``--scale-param2``.

``hermite``
Hermite spline. Similar to ``bicubic`` but with ``B`` set to ``0.0``.
This filter has the special property of having a support of radius 1.0,
making it very fast in comparison, but prone to blocking.
making it very fast in comparison, but prone to blocking. This is the
default for ``--dscale``.

``catmull_rom``
Catmull-Rom. A Cubic filter in the same vein as ``mitchell``, where
Expand Down
2 changes: 1 addition & 1 deletion video/out/gpu/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static const struct gl_video_opts gl_video_opts_def = {
.scaler = {
{{"lanczos", .params={NAN, NAN}}, {.params = {NAN, NAN}},
.cutoff = 0.001}, // scale
{{"mitchell", .params={NAN, NAN}}, {.params = {NAN, NAN}},
{{"hermite", .params={NAN, NAN}}, {.params = {NAN, NAN}},
.cutoff = 0.001}, // dscale
{{NULL, .params={NAN, NAN}}, {.params = {NAN, NAN}},
.cutoff = 0.001}, // cscale
Expand Down

0 comments on commit c172a65

Please sign in to comment.