[PATCHv5 3/3] d3d9/tests: Add tests for different YUV texture layouts
Martin Storsjö
martin at martin.st
Mon Feb 17 05:53:47 CST 2014
On Fri, 14 Feb 2014, Henri Verbeet wrote:
> On 13 February 2014 14:52, Martin Storsjo <martin at martin.st> wrote:
>
>> + BYTE Y = (color >> 16) & 0xff;
>> + BYTE U = (color >> 8) & 0xff;
>> + BYTE V = (color >> 0) & 0xff;
> It's probably just as easy to just store the separate components to begin with.
Actually, since color can either be test_data[i].color1 or
test_data[i].color2, splitting it per component would blow it up into
Y1/Y2, U1/U2, V1/V2, and duplicating the condition for selecting color
based on coordinate for all three components, so I think this format is
simpler in the end.
>> + hr = IDirect3DDevice9_StretchRect(device, surface, NULL, target, NULL, D3DTEXF_POINT);
>> + ok(hr == D3D_OK, "IDirect3DDevice9_StretchRect failed with %#x.\n", hr);
>> +
>> + /* Native D3D can't resist filtering the YUY surface, even though we asked it not to
>> + * do so above. To prevent running into precision problems, read at points with some
>> + * margin within the rect. */
> That's not technically true, no filtering would be D3DTEXF_NONE. I
> don't know if that's going to make a difference in practice though.
I tested that now as well, and there's no difference, the sharp edges in
the YUV texture are blurred when scaled up.
I applied the other changes you suggested, those changes will be part of
the next resend of the patchset.
// Martin
More information about the wine-devel
mailing list