-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Correct-downscaling causes ewa_lanczossharp to introduce a half-pixel shift when downsampling sometimes #13405
Comments
Update: After talking to @llyyr about this he couldn't reproduce it on his system and I couldn't reproduce it with Edit: Can confirm both Vulkan and OpenGL are working as intended on Linux. |
I couldn't reproduce this on X11/Wayland or with a Windows build running through wine. Seems to be driver/Windows related since Artoriuz can only reproduce it with d3d11/vulkan as well. |
~EDIT: Interesting. The gather version of polar sampling is indeed broken. Works fine with compute and direct sampling. Here is good read about gather issues with 16.8 fixed point conversion https://www.reedbeta.com/blog/texture-gathers-and-coordinate-precision/ but I must say, I couldn't make it work correctly even with this knowledge, still missing something. (edit: still interesting, but not really important in our case)
|
Will be fixed by https://code.videolan.org/videolan/libplacebo/-/merge_requests/647 |
To fit with reduced hardware limits on some devices. See-Also: mpv-player/mpv#13405
Important Information
Reproduction steps
magick convert rei.png -filter lanczossharp -distort resize 75% im_ewa_lanczossharp.png
mpv --no-config --vo=gpu-next --gpu-api=vulkan --no-hidpi-window-scale --pause=yes --screenshot-format=png --deband=no --dither-depth=no --screenshot-high-bit-depth=no --dscale=ewa_lanczossharp --linear-downscaling=no --window-scale=0.75 rei.png
mpv --no-config --vo=gpu-next --gpu-api=vulkan --no-hidpi-window-scale --pause=yes --screenshot-format=png --deband=no --dither-depth=no --screenshot-high-bit-depth=no --dscale=ewa_lanczossharp --linear-downscaling=no --window-scale=0.75 --correct-downscaling=no rei.png
Expected behavior
mpv's output should probably roughly match whatever ImageMagick is doing.
Actual behavior
mpv's output with
correct-downscaling
turned on appears to have a half-pixel shift towards the top-left corner (rounding issue somewhere?). Screenshot with it turned off also provided to show that there's no shift in this case, so the problem seems related to turning it on. Filters with integer supports seem fine as well.Log file
output.txt
Sample files
The text was updated successfully, but these errors were encountered: