Repository navigation
edid-parse: Read the low bits of red y - #903
Open
SyberHexen wants to merge 1 commit into
Open
SyberHexen wants to merge 1 commit into
SyberHexen wants to merge 1 commit into
Conversation
get_bits() takes the first and last bit; red y asked for bits 5 to 4, an empty range, so its two low bits were always 0 and red y up to 3/1024 low. The other chromaticities read theirs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Bug:
decode_color_characteristics()reads the two low bits of red y withget_bits (byte, 5, 4), butget_bits()takes the first and the last bit, so this is an empty range: those bits are always 0, and red y comes out up to 3/1024 too low. The other chromaticities read their low bits correctly.Reproduce: compare the red y Muffin parses for a monitor (for example via
MetaEdidInfo) withedid-decodeon the same EDID: for any EDID whose red-y low bits (byte 0x19, bits 5..4) aren't 00, Muffin's value is lower.Fix:
get_bits (byte, 4, 5), one line.Tested: a HISENSE TV whose EDID has red-y low bits
11(byte 0x19 = 0xb2):edid-decodegives red y 0.3115, Muffin parsed 0.3086; with the fix it reads 0.3115. A monitor whose low bits are00reads the same before and after.