Skip to content

edid-parse: Read the low bits of red y - #903

Open
SyberHexen wants to merge 1 commit into
linuxmint:masterfrom
SyberHexen:6.8.6/edid-red-y
Open

SyberHexen wants to merge 1 commit into
linuxmint:masterfrom
SyberHexen:6.8.6/edid-red-y

Conversation

@SyberHexen

Copy link
Copy Markdown

Bug: decode_color_characteristics() reads the two low bits of red y with get_bits (byte, 5, 4), but get_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) with edid-decode on 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-decode gives red y 0.3115, Muffin parsed 0.3086; with the fix it reads 0.3115. A monitor whose low bits are 00 reads the same before and after.

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>
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.

1 participant