The current YUV to RGB conversion provides values in studio-range [16-235], but full-range is required [0-255]. As a result, we currently write the value of 16 to represent black, and so we get gray instead.
This MR changes the coefficients used in the conversion so that the resultant output is in full-range. It actually uses two sets of coefficients as these differ between SD and HD.
Also included is a number of Direct Draw 7 tests.
The coefficients used are documented here: https://learn.microsoft.com/en-us/windows/win32/medfound/recommended-8-bit-y...
-- v7: wined3d: Use Microsoft provided coefficients for YUV to RGB conversion. ddraw/tests: Test yuv to rgb blt in ddraw7.
On Mon Feb 24 20:03:53 2025 +0000, Brendan McGrath wrote:
I don't think that it should be marked broken, no
I've redesigned the tests so we no longer need to mark any as broken. I also think they're a bit simpler now.
Actually - I just pushed a change small change. I was testing each pixel against the different implementations and counting any pixel that didn't pass all of them as an error.
But that has the same flaw as my previous tests. The color white could pass against the studio-range and black against full-range. So now I keep count of the pixels that don't pass studio-range vs don't pass full-range individually (ensuring we get a reasonable pass-rate on one or the other rather than a combination of both). This also resulted in the need to increase the tolerances slightly.
I've sent 7416 which should achieve about the same thing as this, modulo some tweaks and simplifications.
On Tue Feb 25 02:53:19 2025 +0000, Elizabeth Figura wrote:
I've sent 7416 which should achieve about the same thing as this, modulo some tweaks and simplifications.
OK, thanks @zfigura . I'll close this one off.
This merge request was closed by Brendan McGrath.