Jan Schmidt : quartz: Images in Direct3D surfaces must be top-down.
Alexandre Julliard
julliard at winehq.org
Thu Jul 21 09:58:53 CDT 2016
Module: wine
Branch: master
Commit: b5a33f02d3ca63717b2e5f6751c556139467b276
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5a33f02d3ca63717b2e5f6751c556139467b276
Author: Jan Schmidt <jan at centricular.com>
Date: Wed Jul 20 14:37:10 2016 +1000
quartz: Images in Direct3D surfaces must be top-down.
Invert images when copying to a Direct3D surface if they are provided
bottom-up.
Signed-off-by: Jan Schmidt <jan at centricular.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/vmr9.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index f2c3d93..d590a71 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -255,7 +255,17 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *
return hr;
}
- if (lock.Pitch != width * bmiHeader->biBitCount / 8)
+ if (height > 0) {
+ /* Bottom up image needs inverting */
+ lock.pBits = (char *)lock.pBits + (height * lock.Pitch);
+ while (height--)
+ {
+ memcpy(lock.pBits, data, width * bmiHeader->biBitCount / 8);
+ data = data + width * bmiHeader->biBitCount / 8;
+ lock.pBits = (char *)lock.pBits - lock.Pitch;
+ }
+ }
+ else if (lock.Pitch != width * bmiHeader->biBitCount / 8)
{
WARN("Slow path! %u/%u\n", lock.Pitch, width * bmiHeader->biBitCount/8);
More information about the wine-cvs
mailing list