mpv-player / mpv-player/mpv

gpu-next: orthogonal antiringing should be made less aggressive

Open
#14,855 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta:feature-request vo:gpu-next
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Expected behavior of the wanted feature

I want to preface this by saying that I actually think mpv has one of the better antiringing filters for tensor/ortho kernels. Most AR filters offered by other programs are usually low quality and contain sharp cutoffs, which creates some unnatural artifacts while scaling. I prefer mpv's approach to AR, where the ringing is more smoothly tapered off, rather than just abruptly chopped off.

That being said, even though mpv's ortho AR does some things that I like, it still suffers from a couple of quality issues; those being excessive blurring and aliasing. It goes without saying that whenever you're using any AR filter, you're going to add in some of these artifacts as a natural consequence of using the filter, since mild ringing actually helps counteract both blurring and aliasing. But mpv's ortho AR goes a little too far in some places, and it results in quality issues. Polar AR went through similar-ish struggles to ortho AR, where the implementation was excessively blurry and was not usable while downscaling, but those issues have since been addressed (see: https://github.com/haasn/libplacebo/commit/7fb12078b8f0e212f1cc3f5631fb891b3a08ca1c, https://github.com/haasn/libplacebo/commit/132a828fabce4cc6c78840d3e33736ca76c1255f).

When upscaling, ortho AR is consistently more artifact-ridden than polar AR at similar strengths. A good way to A-B-X test this is with ewa_lanczos4sharpest, which is more similar to tensor lanczos than ewa_lanczossharp. However, the more concerning issue is with downscaling, where the filter produces a lot of aliasing. Since https://github.com/haasn/libplacebo/commit/9855b663f1da050c36dd2278ceb372044c44fc73, ortho AR has been explicitly disabled for downscaling for this reason. This issue could be addressed if the ortho AR filter was relaxed somewhat, leading to better results for both upscaling and downscaling, and bringing the filter more on par with its polar counterpart in terms of quality.

Alternative behavior of the wanted feature

No response

Log File

No response

Sample Files

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by reviewing the referenced libplacebo commits and locating mpv’s orthogonal and polar antiringing filter paths. Compare their upscaling and downscaling behavior, then validate that a less aggressive orthogonal filter reduces aliasing and blur and can be used for downscaling without the reported artifacts.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-graphics
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.