Skip to content

filters: automatically flip video if displaymatrix indicates so #16090

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

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

Traneptora
Copy link
Member

Currently we check AV_FRAME_DATA_DISPLAYMATRIX for its rotation factor but not for its flip factor, which could happen with some input files. This commit adds and autovflip filter, which is applied before the autorotate filter to flip vertically before rotating. It also changes the displaymatrix reading code to output to mp_image->params.vflip so it can be autoinserted as necessary.

@Traneptora
Copy link
Member Author

Note: Orientation files tested with: https://github.com/ianare/exif-samples/tree/master/jpg/orientation but I wasn't able to test on dmabuf_wayland. If someone could test that when reviewing that would be great.

Copy link

github-actions bot commented Mar 22, 2025

Download the artifacts for this pull request:

Windows
macOS

Currently we check AV_FRAME_DATA_DISPLAYMATRIX for its rotation factor
but not for its flip factor, which could happen with some input files.
This commit adds and autovflip filter, which is applied before the
autorotate filter to flip vertically before rotating. It also changes
the displaymatrix reading code to output to mp_image->params.vflip so
it can be autoinserted as necessary.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
@Traneptora Traneptora merged commit 5870c95 into mpv-player:master Mar 31, 2025
26 checks passed
@Traneptora Traneptora deleted the patch-1 branch March 31, 2025 18:07
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.

4 participants