-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideal --scale-antiring value for ringy polar filters? #12750
Comments
I use 0.75 myself. Just because I've seen some artifacts above this value. But I don't generally pixel peep every video so ymmv |
I don't think there's any magic number. I'd say it depends on how good your eyes are and the scaler, some ring more than others. If you use a scaler that can cause ringing artifacts, and the ringing bothers you then start with a lower value and increase it gradually until you don't notice it anymore. "Until you don't notice it anymore" does a lot of heavy lifting here, because if you take screenshots and pixel peep at 500%, obviously you're going to notice it. When I make comparisons I only do it with screenshots at 100% zoom. If it passes that then it's highly unlikely I'll ever see anything during actual playback. If you still notice ringing at extremely high I know a lot of people have cargoculted 0.8 as a value due to ravu-zoom-ar and ewa_lanczos4sharpest using it, but some scalers cause more ringing than others. I don't use any antiring with chroma plane ringing doesn't exist, you didn't see anything. It's your imagination. |
Too strong antiring can create aliasing and an unnatural looking image: https://slow.pics/c/6RzExQBR. This sample is obviously exaggerated to show what kind of artifacts it can create, on real content it can still be noticeable but to a much lesser degree. Personally i've noticed that blurrier filters can get away with stronger antiringing without the issues becoming noticeable. |
I agree, though I think most people would agree that setting this to something absurd like
I'd say it more so depends on tolerance, and less on actual eyesight. Anybody can train themselves into noticing stuff like this, for better or worse. Ringing is definitely less noticeable on very grainy content, to a point where sweating over the AR value probably doesn't matter. But on content that has very flat colors and gradients, ringing is still pretty noticeable in my opinion. This pretty much only encapsulates animated content anyways, and animated content tends to have a lot of static shot and shot-reverse shot scenes. So the definition of "playback" here is also doing a lot of heavy-lifting, because if we're being honest, we're actually talking about scenes with a lot of motion in them.
Agreed, though I don't find this answer super satisfying just because it's a little hard to convince someone to holistically only use really heavy doublers, rather than utilize built-in functions like AR. And if I'm being honest, as someone who regularly utilizes said heavy doublers, the cost-benefit is still arguable because
Depends on the content, I suppose. But chroma benefits from AR as well from my experience. Or at the very least, when you encounter trivial content that really highlights it, it looks really, really ugly. |
I think it's important here to clarify whether or not AR actually creates the aliasing, or if the source was aliased to begin with, and overshoot was simply masking it. In practice, the difference probably doesn't really matter, but it can help clarify whether or not even tweaking the AR strength helps mitigate the issue. Obviously, as you already clarified, the example here is super exaggerated, and I've noticed these unnatural cut-off artifacts myself with similar test images. But I still think the difference here is pretty important.
Interesting, I actually haven't tested this out myself. Something like It seems like the general consensus here is leaning towards somewhere between 0.50-0.75 AR, which is pretty much where the discussion last thread ended. Right now, I'm most interested in a source where AR strength highlights aliasing, because that might lead us closer to a definitive answer. I think on relatively grainy and/or clean sources, the difference in AR strength is just a matter of pixel-peeping, which we could do until the end of time. I'm also curious if AR leads to those unnatural cut-off artifacts on realistic but still high scale factors (maybe like 4.5x with 480p -> 2160p?). I'm constrained to my own screen size here, so if anyone would like to chip into the discussion with that, it would be cool. |
I feel like this is one of those things that depend on too many factors:
You could perhaps try different strengths with different filters on different scaling factors, and assuming your "test dataset" covers most content types you could come up with an unbiased answer as long as you trust your quality metrics. This sounds like a good idea on paper, but in practice you'd just find a meaningless average because you tried to reconcile too many things at the same time... Edit: With that said though, my opinion is that
This is just a single test image and a single scaling factor, so it obviously doesn't get even close to covering all scenarios, but still... Unless you're pixel peeping at 500% zoom this is unlikely to matter. |
The cutoff artifacts you see in the example creates an aliased look on real content.
I don't know about haasnsoft but quadric windowed jinc definitely seems to respond better to stronger AR strengths compared to ewa_hanning/ewa_lanczos.
For me I start to notice issues with 480p -> 1440p (I tend to watch a lot of DVD only content). I don't know about 720p since I don't watch anything thats 720p. Seems unnoticeable at 1080p for the most part (but ringing is also less noticeable aswell, so I'm unsure if theres any legitimate justification to raise AR on smaller scale factors?). |
The point of any resizing for me would be to arrive at a clean and natural-looking output. I'm sure there are other users who share the same sentiment, even if some of the stuff being discussed here is extremely pedantic in practice, and wouldn't be visible from a sofa-to-TV viewing distance. But if the difference is trivial from such viewing distances anyways, why not just optimize for all viewing distances? What if I wanted to manipulate a screenshot I took in mpv with an image editor? There's still plenty of value in discussing this because you can't really achieve a clean picture with ringy scalers without some form of AR. Now, I could understand not wanting to use AR for performance reasons, as the performance cost is not trivial. But should you really be using polar filters if you care about performance? Maybe, maybe not.
I'll just use some comparisons here so that there's something tangible to anchor statements onto. The source is a bit grainy, but not enough to hide the ringing. The upscale here is fractional and I just used the default
An arbitrary collage for people who don't have enough time in their day to sear their eyeballs: I decided to exclude There are some subtle differences between the crops, but the main highlight here would be the unnatural gap in the linework around the bottom right of the crop. This gap is also visible at 100% zoom, but most people probably wouldn't notice this without having it explicitly pointed out beforehand. This does seem to be affected by AR strength. And as expected, NNEDI3 has no competition in this comparison outside of
For me, I feel like it starts being noticeable around 1.50x, but obviously everyone has different levels of tolerance for this kind of stuff. Feel free to share your thoughts or any other comparisons that really highlight the artifacting. I also tested |
Yes, the cutoff artifacts are the same, but blending is better with kernels that ring less to begin with. |
I will have to consider switching to Closing. I think I'm fairly comfortable with the discussion around AR now. |
Is this true for both upscaling and downscaling and is this also true for orthogonal filters like less ringy lanczos ginseng? Downscaling seems to be ringier. I've fully enabled anti-ringing downscale in the meantime because of that and since clamp seems to make downscaling softer. I get away with clamping upscale because I'm also using the shader Superres although there seems to be less ringing still that way. I reckon this is a sigmoid vs linear diff. Also, no disrespect but, are you talking to yourself? |
Title. What's a good value that doesn't lead to too much artifacting/detail loss? Just curious if anyone who has done more testing has arrived at a nice value, since the mpv/libplacebo documentation doesn't give any recommendations. Discuss :)
Pseudo-continuation of the discussion from #12384
The text was updated successfully, but these errors were encountered: