Skip to content
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

vo_gpu: fix broken chroma plane for rotated semi-planar formats #13619

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

na-na-hi
Copy link
Contributor

@na-na-hi na-na-hi commented Mar 3, 2024

Fixes #8223.

Copy link

github-actions bot commented Mar 3, 2024

Download the artifacts for this pull request:

Windows
macOS

For image formats with 2 or more chroma planes such as YU12, there is
a plane merging pass for these planes calling finish_pass_tex which
does a format conversion. After this conversion, the cscale shader
afterwards works properly.

However, for image formats with only 1 chroma plane (semi-planar formats),
including NV12 and P010, this merging pass is never called, which breaks
the cscale shader afterwards if the video is rotated with subsampled
chroma.

Fix this by adding an explicit conversion pass if this situation is
detected after the pre-scale hooks, so if there are shaders hooking on
CHROMA (like the deband filter) and the conversion is done by pass_hook
already, this conversion won't be called.
@sfan5 sfan5 merged commit 27fb4c4 into mpv-player:master Mar 11, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--deband=no --cscale=spline36 breaks if video is metadata rotated and in nv12 format
3 participants