From e2d70fff6b20f75193c0af672471607c0530e666 Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Thu, 21 Feb 2008 23:46:43 +0100 Subject: [PATCH] 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(+) diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c index 86222af18f3..eada7a54f07 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 56745dbbc2b..86e9c5e25d3 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 477df2479c1..d85528356e9 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'),