Perform case-insensitive FOURCC comparison of built-in video codecs.
This commit is contained in:
parent
513a493f00
commit
e7c06ea6ae
@ -57,6 +57,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(iccvid);
|
|||||||
static HINSTANCE ICCVID_hModule;
|
static HINSTANCE ICCVID_hModule;
|
||||||
|
|
||||||
#define ICCVID_MAGIC mmioFOURCC('c', 'v', 'i', 'd')
|
#define ICCVID_MAGIC mmioFOURCC('c', 'v', 'i', 'd')
|
||||||
|
#define compare_fourcc(fcc1, fcc2) (((fcc1)^(fcc2))&~0x20202020)
|
||||||
|
|
||||||
#define DBUG 0
|
#define DBUG 0
|
||||||
#define MAX_STRIPS 32
|
#define MAX_STRIPS 32
|
||||||
@ -975,7 +976,7 @@ LRESULT WINAPI ICCVID_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg,
|
|||||||
|
|
||||||
TRACE("Opened\n");
|
TRACE("Opened\n");
|
||||||
|
|
||||||
if (icinfo && icinfo->fccType != ICTYPE_VIDEO) return 0;
|
if (icinfo && compare_fourcc(icinfo->fccType, ICTYPE_VIDEO)) return 0;
|
||||||
|
|
||||||
info = heap_alloc( sizeof (ICCVID_Info) );
|
info = heap_alloc( sizeof (ICCVID_Info) );
|
||||||
if( info )
|
if( info )
|
||||||
|
@ -34,6 +34,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msrle32);
|
|||||||
|
|
||||||
static HINSTANCE MSRLE32_hModule = 0;
|
static HINSTANCE MSRLE32_hModule = 0;
|
||||||
|
|
||||||
|
#define compare_fourcc(fcc1, fcc2) (((fcc1)^(fcc2))&~0x20202020)
|
||||||
|
|
||||||
#define ABS(a) ((a) < 0 ? -(a) : (a))
|
#define ABS(a) ((a) < 0 ? -(a) : (a))
|
||||||
#define SQR(a) ((a) * (a))
|
#define SQR(a) ((a) * (a))
|
||||||
|
|
||||||
@ -1114,7 +1116,7 @@ static CodecInfo* Open(LPICOPEN icinfo)
|
|||||||
return (LPVOID)0xFFFF0000;
|
return (LPVOID)0xFFFF0000;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icinfo->fccType != ICTYPE_VIDEO) return NULL;
|
if (compare_fourcc(icinfo->fccType, ICTYPE_VIDEO)) return NULL;
|
||||||
|
|
||||||
TRACE("(%p = {%u,0x%08X(%4.4s),0x%08X(%4.4s),0x%X,0x%X,...})\n", icinfo,
|
TRACE("(%p = {%u,0x%08X(%4.4s),0x%08X(%4.4s),0x%X,0x%X,...})\n", icinfo,
|
||||||
icinfo->dwSize, icinfo->fccType, (char*)&icinfo->fccType,
|
icinfo->dwSize, icinfo->fccType, (char*)&icinfo->fccType,
|
||||||
|
@ -42,12 +42,12 @@ static void test_OpenCase(void)
|
|||||||
ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
|
ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
|
||||||
}
|
}
|
||||||
h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS);
|
h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS);
|
||||||
todo_wine ok(0!=h,"ICOpen(VIDC.msvc) failed\n");
|
ok(0!=h,"ICOpen(VIDC.msvc) failed\n");
|
||||||
if (h) {
|
if (h) {
|
||||||
ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
|
ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
|
||||||
}
|
}
|
||||||
h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('M','S','V','C'),ICMODE_DECOMPRESS);
|
h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('M','S','V','C'),ICMODE_DECOMPRESS);
|
||||||
todo_wine ok(0!=h,"ICOpen(VIDC.MSVC) failed\n");
|
ok(0!=h,"ICOpen(VIDC.MSVC) failed\n");
|
||||||
if (h) {
|
if (h) {
|
||||||
ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
|
ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* License as published by the Free Software Foundation; either
|
* License as published by the Free Software Foundation; either
|
||||||
* version 2 of the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
@ -50,6 +50,7 @@ static HINSTANCE MSVIDC32_hModule;
|
|||||||
#define CRAM_MAGIC mmioFOURCC('C', 'R', 'A', 'M')
|
#define CRAM_MAGIC mmioFOURCC('C', 'R', 'A', 'M')
|
||||||
#define MSVC_MAGIC mmioFOURCC('M', 'S', 'V', 'C')
|
#define MSVC_MAGIC mmioFOURCC('M', 'S', 'V', 'C')
|
||||||
#define WHAM_MAGIC mmioFOURCC('W', 'H', 'A', 'M')
|
#define WHAM_MAGIC mmioFOURCC('W', 'H', 'A', 'M')
|
||||||
|
#define compare_fourcc(fcc1, fcc2) (((fcc1)^(fcc2))&~0x20202020)
|
||||||
|
|
||||||
#define PALETTE_COUNT 256
|
#define PALETTE_COUNT 256
|
||||||
#define LE_16(x) ((((const uint8_t *)(x))[1] << 8) | ((const uint8_t *)(x))[0])
|
#define LE_16(x) ((((const uint8_t *)(x))[1] << 8) | ((const uint8_t *)(x))[0])
|
||||||
@ -502,7 +503,7 @@ LRESULT WINAPI CRAM_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg,
|
|||||||
|
|
||||||
TRACE("Opened\n");
|
TRACE("Opened\n");
|
||||||
|
|
||||||
if (icinfo && icinfo->fccType != ICTYPE_VIDEO) return 0;
|
if (icinfo && compare_fourcc(icinfo->fccType, ICTYPE_VIDEO)) return 0;
|
||||||
|
|
||||||
info = HeapAlloc( GetProcessHeap(), 0, sizeof (Msvideo1Context) );
|
info = HeapAlloc( GetProcessHeap(), 0, sizeof (Msvideo1Context) );
|
||||||
if( info )
|
if( info )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user