Repository navigation
Conversation
meh7an
force-pushed
the
fix/hd-video-colors
branch
from
October 12, 2026 08:03
cb9d285 to
25fd303
Compare
meh7an
force-pushed
the
fix/hd-video-colors
branch
from
October 22, 2026 13:33
25fd303 to
95bfc9a
Compare
meh7an
force-pushed
the
fix/hd-video-colors
branch
from
October 22, 2026 21:05
95bfc9a to
7e79521
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #31407 and needs desktop-app/lib_ui#381; only the last commit is new here.
Every YUV to RGB conversion assumes BT.601 limited range, whatever the video says. HD videos use the BT.709 matrix, so their colors shift (red turns orange, green turns yellow). Full range videos, common from phone cameras and screen recordings, come out with crushed blacks and clipped whites. Re-encoded videos also keep tags that no longer match their samples.
The matrix and range now follow the video's tags. Untagged videos use BT.709 when they are at least 1280 wide or taller than 576 and BT.601 otherwise, which is what other players do:
sws_setColorspaceDetails(), with the same table on both sides so a YUV to YUV scale keeps its matrix instead of being converted to BT.601 through RGB.Testing
Tested on macOS 27.0, in a Debug build: