22#define WIN32_LEAN_AND_MEAN
39 ok(0!=
h,
"ICOpen(vidc.0) failed\n");
48 ok(0!=
h ||
broken(
h == 0),
"ICOpen(vidc.0) failed\n");
61 ok(0!=
h,
"ICOpen(vidc.msvc) failed\n");
66 ok(0!=
h,
"ICOpen(vidc.MSVC) failed\n");
71 ok(0!=
h,
"ICOpen(VIDC.msvc) failed\n");
76 ok(0!=
h,
"ICOpen(VIDC.MSVC) failed\n");
81 ok(0!=
h,
"ICOpen(vidc.mSvC) failed\n");
86 ok(0!=
h,
"ICOpen(vIdC.msvc) failed\n");
94 static BITMAPINFOHEADER bi = {
sizeof(
BITMAPINFOHEADER),32,8, 1,8,
BI_RLE8, 0,100000,100000, 0,0};
95 static BITMAPINFOHEADER bo = {
sizeof(
BITMAPINFOHEADER),32,8, 1,8,
BI_RGB, 0,100000,100000, 0,0};
107 ok(
h != 0,
"RLE8->RGB failed\n");
112 ok(
h == 0,
"RLE8->RGB height<0 succeeded\n");
118 if (
h == 0)
win_skip(
"Cinepak/ICCVID codec not found\n");
185 ok(
h != 0,
"cvid->RGB16 failed\n");
189 ok(
h != 0,
"cvid->RGB16 height<0 failed\n");
195 ok(
h != 0,
"cvid->RGB32 failed\n");
199 ok(
h != 0,
"cvid->RGB32 height<0 failed\n");
206 ok(
h == 0,
"CVID->RGB32 upper case succeeded\n");
214 ok(
h != 0,
"MSVC->RGB16 failed\n");
225 ok(
h == 0,
"MSVC->RGB16 height too small succeeded\n");
232 ok(
h == 0,
"msvc->RGB16 succeeded\n");
237 ok(
h != 0,
"No MSVC codec installed!?\n");
304 ok(
h != 0,
"RGB8->RGB identity failed\n");
309 ok(
h != 0,
"RLE8->RGB again failed\n");
327 input_header = { {
sizeof(
BITMAPINFOHEADER), 32, 1, 1, 8, 0, 32*8, 0, 0, 256, 256},
328 {{255,0,0}, {0,255,0}, {0,0,255}, {255,255,255}}};
330 static BYTE input[32] = {1,2,3,3,3,3,2,3,1};
331 static const BYTE output_kf[] = {1,1,1,2,4,3,0,3,2,3,1,0,23,0,0,0,0,1},
332 output_nkf[] = {0,0,0,1};
335 ok(
h !=
NULL,
"Expected non-NULL\n");
357 for(
i = 0;
i < 9;
i++)
361 ok(frame !=
NULL,
"Frame[%d]: Expected non-NULL\n",
i);
362 if (frame_len ==
sizeof(output_nkf))
363 ok(!
memcmp(output_nkf, frame, frame_len),
"Frame[%d]: Contents do not match\n",
i);
364 else if (frame_len ==
sizeof(output_kf))
365 ok(!
memcmp(output_kf, frame, frame_len),
"Frame[%d]: Contents do not match\n",
i);
367 ok(0,
"Unknown frame size of %d byten\n", frame_len);
384 ok(!
id,
"Got unexpected id %#lx.\n",
id);
387 ok(lparam2 ==
sizeof(
ICINFO),
"Got lparam2 %ld.\n", lparam2);
389 ok(!
info->fccType,
"Got unexpected type %#x.\n",
info->fccType);
390 ok(!
info->fccHandler,
"Got unexpected handler %#x.\n",
info->fccHandler);
391 ok(!
info->dwFlags,
"Got unexpected flags %#x.\n",
info->dwFlags);
392 ok(!
info->dwVersion,
"Got unexpected version %#x.\n",
info->dwVersion);
393 ok(
info->dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#x.\n",
info->dwVersionICM);
398 info->dwVersion = 0xdeadbeef;
404 static const WCHAR bogusW[] = {
'b',
'o',
'g',
'u',
's',0};
423 ok(
info.fccType,
"Expected nonzero type.\n");
424 ok(
info.fccHandler,
"Expected nonzero handler.\n");
425 ok(!
info.dwFlags,
"Got unexpected flags %#x.\n",
info.dwFlags);
426 ok(!
info.dwVersion,
"Got unexpected version %#x.\n",
info.dwVersion);
427 ok(
info.dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#x.\n",
info.dwVersionICM);
432 "ICInfo failed on fcc 0x%08x\n",
info.fccHandler);
434 fcc = (
unsigned char *)&
info.fccHandler;
441 "ICInfo failed on fcc 0x%08x\n",
info.fccHandler);
443 ok(found != 0,
"expected at least one codec\n");
450 ok(!
info.dwFlags,
"Got unexpected flags %#x.\n",
info.dwFlags);
451 ok(!
info.dwVersion,
"Got unexpected version %#x.\n",
info.dwVersion);
452 ok(
info.dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#x.\n",
info.dwVersionICM);
461 ok(
ret,
"Failed to install driver.\n");
465 ok(!
res,
"Failed to query value, error %d.\n",
res);
472 ok(
info.fccHandler == test_handler,
"Got unexpected handler %#x.\n",
info.fccHandler);
473 ok(!
info.dwFlags,
"Got unexpected flags %#x.\n",
info.dwFlags);
474 ok(!
info.dwVersion,
"Got unexpected version %#x.\n",
info.dwVersion);
475 ok(
info.dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#x.\n",
info.dwVersionICM);
485 ok(
ret,
"Failed to remove driver.\n");
492 win_skip(
"Not enough permissions to register codec drivers.\n");
500 ok(
info.fccHandler == test_handler,
"Got unexpected handler %#x.\n",
info.fccHandler);
501 ok(!
info.dwFlags,
"Got unexpected flags %#x.\n",
info.dwFlags);
502 ok(!
info.dwVersion,
"Got unexpected version %#x.\n",
info.dwVersion);
503 ok(
info.dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#x.\n",
info.dwVersionICM);
513 ok(
ret,
"Failed to remove INI entry.\n");
517 ok(
ret,
"Failed to install driver.\n");
545 ok(
ret,
"Failed to remove driver.\n");
569 trace(
"(%#lx, %p, %#x, %#lx, %#lx)\n",
id,
driver,
msg, lparam1, lparam2);
590 ok(
out->biSize ==
sizeof(*
out),
"got size %d\n",
out->biSize);
592 ok(
out->biSizeImage == expected_size,
"expected image size %d, got %d\n",
593 expected_size,
out->biSizeImage);
595 ok(
out->biPlanes == 0xcccc,
"got planes %d\n",
out->biPlanes);
596 ok(
out->biXPelsPerMeter == 0xcccccccc &&
out->biYPelsPerMeter == 0xcccccccc,
597 "got resolution %dx%d\n",
out->biXPelsPerMeter,
out->biYPelsPerMeter);
598 ok(
out->biClrUsed == 0xcccccccc,
"got biClrUsed %u\n",
out->biClrUsed);
599 ok(
out->biClrImportant == 0xcccccccc,
"got biClrImportant %u\n",
out->biClrImportant);
606 if (
out->biWidth == 30 &&
out->biHeight == 40 &&
out->biCompression ==
BI_RGB &&
out->biBitCount == 16)
614 if (
out->biWidth == 30 &&
out->biHeight == 40 &&
out->biCompression ==
BI_RGB &&
out->biBitCount == 24)
618 if (
out->biWidth == 30 &&
out->biHeight == 40 &&
out->biCompression ==
BI_RGB &&
out->biBitCount == 32)
622 if (
out->biWidth == 10 &&
out->biHeight == 20 &&
out->biCompression ==
BI_RGB &&
out->biBitCount == 32)
643 out->biBitCount = 0xdead;
644 out->biCompression = 0xbeef;
645 out->biSizeImage = 0;
659 out->bmiHeader.biClrUsed = 1;
677#define check_bitmap_header(a,b,c,d,e) check_bitmap_header_(__LINE__,a,b,c,d,e)
700 ok(
ret,
"ICInstall failed\n");
703 ok(
ret,
"ICOpen failed\n");
705 memset(outbuf, 0,
sizeof(outbuf));
711 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
716 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
721 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
726 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
731 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
736 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
743 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
749 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
754 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
761 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
765 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
769 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
773 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
778 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
785 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
790 "got wrong colour\n");
796 ok(
ret,
"ICRemove failed\n");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define RegCloseKey(hKey)
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t compression
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
BOOL WINAPI DECLSPEC_HOTPATCH WritePrivateProfileStringA(LPCSTR section, LPCSTR entry, LPCSTR string, LPCSTR filename)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
GLint GLint GLsizei GLsizei GLsizei depth
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLenum GLenum input
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define mmioFOURCC(c0, c1, c2, c3)
#define ERROR_FILE_NOT_FOUND
static BG_JOB_TYPE test_type
struct @1679::@1680 driver
static void test_ICGetDisplayFormat(void)
static int get_stride(int width, int depth)
static const RGBQUAD color_yellow
static void test_ICSeqCompress(void)
static LRESULT CALLBACK gdf_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg, LPARAM lparam1, LPARAM lparam2)
static void test_OpenCase(void)
static void test_ICInfo(void)
static BITMAPINFOHEADER * gdf_out
static int get_display_format_test
static void check_bitmap_header_(int line, BITMAPINFOHEADER *header, LONG width, LONG height, WORD depth, DWORD compression)
#define check_bitmap_header(a, b, c, d, e)
static void test_Locate(void)
static LRESULT CALLBACK enum_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg, LPARAM lparam1, LPARAM lparam2)
static BITMAPINFOHEADER gdf_in
static DWORD get_size_image(LONG width, LONG height, WORD depth)
HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
BOOL VFWAPI ICInstall(DWORD type, DWORD handler, LPARAM lparam, char *desc, UINT flags)
BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
LRESULT VFWAPI ICGetInfo(HIC hic, ICINFO *picinfo, DWORD cb)
HIC VFWAPI ICLocate(DWORD type, DWORD handler, BITMAPINFOHEADER *in, BITMAPINFOHEADER *out, WORD mode)
void VFWAPI ICCompressorFree(PCOMPVARS pc)
HIC VFWAPI ICGetDisplayFormat(HIC hic, BITMAPINFOHEADER *in, BITMAPINFOHEADER *out, int depth, int width, int height)
void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc)
BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info)
LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits, BOOL *pfKey, LONG *plSize)
LRESULT WINAPI ICClose(HIC hic)
BOOL VFWAPI ICRemove(DWORD type, DWORD handler, UINT flags)
#define FIELD_OFFSET(t, f)
#define ICMODE_DECOMPRESS
#define ICDecompressQuery(hic, lpbiInput, lpbiOutput)
#define ICQUALITY_DEFAULT
#define ICM_DECOMPRESS_GET_PALETTE
#define ICM_DECOMPRESS_QUERY
#define ICM_DECOMPRESS_GET_FORMAT
#define ICMF_COMPVARS_VALID
#define ICINSTALL_FUNCTION
#define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput)
struct tagBITMAPINFO * PBITMAPINFO
#define HKEY_LOCAL_MACHINE