[PATCH 2/4] quartz: Images in Direct3D surfaces must be top-down

Jan Schmidt jan at centricular.com
Wed Jul 20 04:48:10 CDT 2016



On 20/07/16 18:47, Henri Verbeet wrote:
> On 20 July 2016 at 06:37, Jan Schmidt <jan at centricular.com> wrote:
>> Invert images when copying to a Direct3D surface if
>> they are provided bottom-up.
>>
> Is that observable behaviour? I.e., could you write a test that
> verifies where the data ends up in the surface?

I think one could construct a test. It'd be slightly elaborate -
Configure a Quartz VMR9 renderer to use a custom D3D allocator /
presenter, feeding a video buffer media sample to it, and then read the
D3D surface contents and verify that the received D3D surface is the
right way up.

I'm not entirely sure how to write that test yet though - I'm a
GStreamer dev, and I've only ever looked at Wine code in the last 5 days.

> If it isn't, it may be better to just flip the image when presenting it.

Do you mean when presenting inside D3D? I think achieving that would be
tricky - you'd need to mark the surface as vertically inverted and
handle that anywhere the contents might be accessed inside D3D, or when
handing out pointers to the data via API like
IDirect3DSurface9_LockRect. I'm guessing though - I don't really know
much about D3D - I based this patch off
https://msdn.microsoft.com/en-us/library/windows/desktop/aa473780(v=vs.85).aspx
which says "any image that is contained in a Direct3D surface must be
top-down"

- Jan.
-- 
Jan Schmidt, Centricular Ltd - http://centricular.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160720/2667794a/attachment-0001.sig>


More information about the wine-devel mailing list