forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 2c8e3aa151eb0ab655f319f6cdc69a4f66f2b3ffFiltered to crates/engine/tests/matrix_render.rsClear filter

2026-08-11

✨ feat(colorspace): a picture is converted in the matrix its own file names, not in BT.601Ahmet Kaan Gümüş · 55b1c8d
✨ feat(colorspace): a picture is converted in the matrix its own file names, not in BT.601

Every displayed frame went through one hardcoded integer matrix -- BT.601
limited, 298/409/-100/-208/516 -- whatever the stream said it was. An HD or
UHD file read that way shifts: BT.709's red weight is 0.2126 against 0.601's
0.299, which is a visible cast on faces and saturated colour.

The two converters now take the `ColorDescription` the demuxers already
resolved, and derive their 8.8 coefficients from that matrix's two luma
weights and its range once per frame, so the pixel loop is the same
multiply-and-shift it was. BT.601 limited rounds to exactly the integers that
were hardcoded, so SD material is byte for byte the picture it always was.

Stills keep BT.601 on purpose: `rgb_to_i420` writes them in it, and the pair
round-trips. Transfer curves are untouched -- a PQ or HLG stream gets the
BT.2020 matrix and is still shown as SDR, with the seam marked.