[1/6] wined3d: YUV formats are block-based

Stefan Dösinger stefan at codeweavers.com
Thu Oct 13 14:37:24 CDT 2011


On Thursday 13 October 2011 14:39:38 Henri Verbeet wrote:
> On 13 October 2011 01:07, Stefan Dösinger <stefan at codeweavers.com> wrote:
> > diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c
> > diff --git a/dlls/ddraw/tests/overlay.c b/dlls/ddraw/tests/overlay.c
> 
> These tests don't prove anything,  they pass on current Wine as well.
Because height=1 blocks are quite uninteresting. You notice the 2x1 blocks 
when you try to lock a rectangle with an odd left or right coordinate. But 
only with DEFAULT pool surfaces and not SCRATCH ones.

There are no DXTN default pool surfaces, and textures break the double unlock 
test. So the test needs splitting into a texture and surface part. Detours 
ftw.

> > +    {WINED3DFMT_YUY2,   2,  1,  4, FALSE    },
> > +    {WINED3DFMT_UYVY,   2,  1,  4, FALSE    },
> > +    /* YV12 actually has 2x2 blocks with 6 bytes per block, but the
> > blocks +     * are spread across the surface. */
> > +    {WINED3DFMT_YV12,   1,  1,  1, FALSE},
> 
> Blocks with 1 height aren't really blocks.
YV12 is a strange format in many ways. What I care about is that we don't 
write to it.

I'll write some more tests for YV12. If Windows rejects 1:1 blits, or blits 
only the luminance data that'd make things much simpler.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20111013/a7b2f28d/attachment.pgp>


More information about the wine-devel mailing list