On Fri Mar 27 23:01:19 2026 +0000, Esme Povirk wrote:
I'm not sure about the generic fallback for Gray16. We should probably preserve the 16-bit precision in intermediate steps. Windows does the same for the case I tested: converting 24bppBGR to Gray16 gives byte pairs like 04 04, 08 08, 0C 0C, which is the val\*257 pattern from an 8-bit intermediate step.
Test output on Windows (24bppBGR -\> Gray16 first row): 00 00 04 04 08 08 0C 0C 10 10 14 14 18 18 1C 1C I only tested with 24bppBGR as source, so I should probably test a few more cases with higher bit depth sources. Unfortunately I just broke my Windows partition (0x69 boot error, no system image), so it will take a bit untill I can set this up again. The implementation reuses the existing copypixels_to_8bppGray as intermediate step, same as the other converters in the file do. Do you want me to add a dedicated higher precision intermediate path for Gray16 instead, or is matching the Windows behavior sufficient here? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10412#note_134176