You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because of lines 86 through 88 in /ui/gl/gl_shader.cpp. The formula there is an extremely approximate variation of the Rec. 601 color matrix (except done using a separate component assignments instead of a proper matrix multiply).
It would be much more robust if instead there were multiple YUV matrices that could be used, and use metadata stored in the video files themselves to determine which to use. As a fallback, HD videos that are not tagged should be decoded with the Rec. 709 matrix, and non-HD videos that are not tagged should continue to be decoded with the Rec. 601 matrix.
As an aside, there's a typo in line 88; that second term should be 2.017, not 2.17. Or, well, technically it should be 2.0172321429, but I did say that these were very approximate. Apparently, back in 2022 I had written a few comments to the commit that introduced that typo. I'm a little short on time while I type this bug report, but I apparently wasn't back then and went into a lot more detail.
I will say that I'm noticing that I put .a at the end of the bits that read from the YUV texture planes, when I think that should probably be .r. I don't know what I was thinking.
Anyway, I figure it'd be more visible if I put this in a bug report instead of just some comments on an old commit.
The text was updated successfully, but these errors were encountered:
This is because of lines 86 through 88 in /ui/gl/gl_shader.cpp. The formula there is an extremely approximate variation of the Rec. 601 color matrix (except done using a separate component assignments instead of a proper matrix multiply).
It would be much more robust if instead there were multiple YUV matrices that could be used, and use metadata stored in the video files themselves to determine which to use. As a fallback, HD videos that are not tagged should be decoded with the Rec. 709 matrix, and non-HD videos that are not tagged should continue to be decoded with the Rec. 601 matrix.
As an aside, there's a typo in line 88; that second term should be
2.017
, not2.17
. Or, well, technically it should be2.0172321429
, but I did say that these were very approximate. Apparently, back in 2022 I had written a few comments to the commit that introduced that typo. I'm a little short on time while I type this bug report, but I apparently wasn't back then and went into a lot more detail.I will say that I'm noticing that I put
.a
at the end of the bits that read from the YUV texture planes, when I think that should probably be.r
. I don't know what I was thinking.Anyway, I figure it'd be more visible if I put this in a bug report instead of just some comments on an old commit.
The text was updated successfully, but these errors were encountered: