Module: wine Branch: master Commit: e2d70fff6b20f75193c0af672471607c0530e666 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e2d70fff6b20f75193c0af6724...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Thu Feb 21 23:46:43 2008 +0100
ddraw: Add yv12 detection support.
---
dlls/ddraw/utils.c | 5 +++++ dlls/wined3d/utils.c | 1 + include/wine/wined3d_types.h | 1 + 3 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c index 86222af..eada7a5 100644 --- a/dlls/ddraw/utils.c +++ b/dlls/ddraw/utils.c @@ -250,6 +250,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
case WINED3DFMT_UYVY: case WINED3DFMT_YUY2: + case WINED3DFMT_YV12: case WINED3DFMT_DXT1: case WINED3DFMT_DXT2: case WINED3DFMT_DXT3: @@ -553,6 +554,10 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat) { return WINED3DFMT_YUY2; } + if(DDPixelFormat->dwFourCC == MAKEFOURCC('Y', 'V', '1', '2')) + { + return WINED3DFMT_YV12; + } if(DDPixelFormat->dwFourCC == MAKEFOURCC('D', 'X', 'T', '1')) { return WINED3DFMT_DXT1; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 56745db..86e9c5e 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -43,6 +43,7 @@ static const StaticPixelFormatDesc formats[] = { /* FourCC formats, kept here to have WINED3DFMT_R8G8B8(=20) at position 20 */ {WINED3DFMT_UYVY ,0x0 ,0x0 ,0x0 ,0x0 ,1/*?*/ ,0 ,0 ,TRUE }, {WINED3DFMT_YUY2 ,0x0 ,0x0 ,0x0 ,0x0 ,1/*?*/ ,0 ,0 ,TRUE }, + {WINED3DFMT_YV12 ,0x0 ,0x0 ,0x0 ,0x0 ,1/*?*/ ,0 ,0 ,TRUE }, {WINED3DFMT_DXT1 ,0x0 ,0x0 ,0x0 ,0x0 ,1 ,0 ,0 ,TRUE }, {WINED3DFMT_DXT2 ,0x0 ,0x0 ,0x0 ,0x0 ,1 ,0 ,0 ,TRUE }, {WINED3DFMT_DXT3 ,0x0 ,0x0 ,0x0 ,0x0 ,1 ,0 ,0 ,TRUE }, diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 477df24..d855283 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -266,6 +266,7 @@ typedef enum _WINED3DFORMAT {
WINED3DFMT_UYVY = WINEMAKEFOURCC('U', 'Y', 'V', 'Y'), WINED3DFMT_YUY2 = WINEMAKEFOURCC('Y', 'U', 'Y', '2'), + WINED3DFMT_YV12 = WINEMAKEFOURCC('Y', 'V', '1', '2'), WINED3DFMT_DXT1 = WINEMAKEFOURCC('D', 'X', 'T', '1'), WINED3DFMT_DXT2 = WINEMAKEFOURCC('D', 'X', 'T', '2'), WINED3DFMT_DXT3 = WINEMAKEFOURCC('D', 'X', 'T', '3'),