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");
196 ok(
h == 0,
"cvid->UYVY succeeded\n");
202 ok(
h != 0,
"cvid->RGB32 failed\n");
206 ok(
h != 0,
"cvid->RGB32 height<0 failed\n");
213 ok(
h == 0,
"CVID->RGB32 upper case succeeded\n");
221 ok(
h != 0,
"MSVC->RGB16 failed\n");
232 ok(
h == 0,
"MSVC->RGB16 height too small succeeded\n");
239 ok(
h == 0,
"msvc->RGB16 succeeded\n");
244 ok(
h != 0,
"No MSVC codec installed!?\n");
311 ok(
h != 0,
"RGB8->RGB identity failed\n");
316 ok(
h != 0,
"RLE8->RGB again failed\n");
334 input_header = { {
sizeof(
BITMAPINFOHEADER), 32, 1, 1, 8, 0, 32*8, 0, 0, 256, 256},
335 {{255,0,0}, {0,255,0}, {0,0,255}, {255,255,255}}};
337 static BYTE input[32] = {1,2,3,3,3,3,2,3,1};
338 static const BYTE output_kf[] = {1,1,1,2,4,3,0,3,2,3,1,0,23,0,0,0,0,1},
339 output_nkf[] = {0,0,0,1};
342 ok(
h !=
NULL,
"Expected non-NULL\n");
364 for(
i = 0;
i < 9;
i++)
368 ok(frame !=
NULL,
"Frame[%ld]: Expected non-NULL\n",
i);
369 if (frame_len ==
sizeof(output_nkf))
370 ok(!
memcmp(output_nkf, frame, frame_len),
"Frame[%ld]: Contents do not match\n",
i);
371 else if (frame_len ==
sizeof(output_kf))
372 ok(!
memcmp(output_kf, frame, frame_len),
"Frame[%ld]: Contents do not match\n",
i);
374 ok(0,
"Unknown frame size of %ld byten\n", frame_len);
391 ok(!
id,
"Got unexpected id %#Ix.\n",
id);
394 ok(lparam2 ==
sizeof(
ICINFO),
"Got lparam2 %Id.\n", lparam2);
396 ok(!
info->fccType,
"Got unexpected type %#lx.\n",
info->fccType);
397 ok(!
info->fccHandler,
"Got unexpected handler %#lx.\n",
info->fccHandler);
398 ok(!
info->dwFlags,
"Got unexpected flags %#lx.\n",
info->dwFlags);
399 ok(!
info->dwVersion,
"Got unexpected version %#lx.\n",
info->dwVersion);
400 ok(
info->dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#lx.\n",
info->dwVersionICM);
405 info->dwVersion = 0xdeadbeef;
429 ok(
info.fccType,
"Expected nonzero type.\n");
430 ok(
info.fccHandler,
"Expected nonzero handler.\n");
431 ok(!
info.dwFlags,
"Got unexpected flags %#lx.\n",
info.dwFlags);
432 ok(!
info.dwVersion,
"Got unexpected version %#lx.\n",
info.dwVersion);
433 ok(
info.dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#lx.\n",
info.dwVersionICM);
438 "ICInfo failed on fcc 0x%08lx\n",
info.fccHandler);
440 fcc = (
unsigned char *)&
info.fccHandler;
447 "ICInfo failed on fcc 0x%08lx\n",
info.fccHandler);
449 ok(found != 0,
"expected at least one codec\n");
456 ok(!
info.dwFlags,
"Got unexpected flags %#lx.\n",
info.dwFlags);
457 ok(!
info.dwVersion,
"Got unexpected version %#lx.\n",
info.dwVersion);
458 ok(
info.dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#lx.\n",
info.dwVersionICM);
467 ok(
ret,
"Failed to install driver.\n");
471 ok(!
res,
"Failed to query value, error %ld.\n",
res);
479 ok(!
info.dwFlags,
"Got unexpected flags %#lx.\n",
info.dwFlags);
480 ok(!
info.dwVersion,
"Got unexpected version %#lx.\n",
info.dwVersion);
481 ok(
info.dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#lx.\n",
info.dwVersionICM);
491 ok(
ret,
"Failed to remove driver.\n");
498 win_skip(
"Not enough permissions to register codec drivers.\n");
507 ok(!
info.dwFlags,
"Got unexpected flags %#lx.\n",
info.dwFlags);
508 ok(!
info.dwVersion,
"Got unexpected version %#lx.\n",
info.dwVersion);
509 ok(
info.dwVersionICM ==
ICVERSION,
"Got unexpected ICM version %#lx.\n",
info.dwVersionICM);
519 ok(
ret,
"Failed to remove INI entry.\n");
523 ok(
ret,
"Failed to install driver.\n");
551 ok(
ret,
"Failed to remove driver.\n");
575 trace(
"(%#Ix, %p, %#x, %#Ix, %#Ix)\n",
id,
driver,
msg, lparam1, lparam2);
596 ok(
out->biSize ==
sizeof(*
out),
"got size %ld\n",
out->biSize);
598 ok(
out->biSizeImage == expected_size,
"expected image size %ld, got %ld\n",
599 expected_size,
out->biSizeImage);
601 ok(
out->biPlanes == 0xcccc,
"got planes %d\n",
out->biPlanes);
602 ok(
out->biXPelsPerMeter == 0xcccccccc &&
out->biYPelsPerMeter == 0xcccccccc,
603 "got resolution %ldx%ld\n",
out->biXPelsPerMeter,
out->biYPelsPerMeter);
604 ok(
out->biClrUsed == 0xcccccccc,
"got biClrUsed %lu\n",
out->biClrUsed);
605 ok(
out->biClrImportant == 0xcccccccc,
"got biClrImportant %lu\n",
out->biClrImportant);
612 if (
out->biWidth == 30 &&
out->biHeight == 40 &&
out->biCompression ==
BI_RGB &&
out->biBitCount == 16)
620 if (
out->biWidth == 30 &&
out->biHeight == 40 &&
out->biCompression ==
BI_RGB &&
out->biBitCount == 24)
624 if (
out->biWidth == 30 &&
out->biHeight == 40 &&
out->biCompression ==
BI_RGB &&
out->biBitCount == 32)
628 if (
out->biWidth == 10 &&
out->biHeight == 20 &&
out->biCompression ==
BI_RGB &&
out->biBitCount == 32)
649 out->biBitCount = 0xdead;
650 out->biCompression = 0xbeef;
651 out->biSizeImage = 0;
665 out->bmiHeader.biClrUsed = 1;
683#define check_bitmap_header(a,b,c,d,e) check_bitmap_header_(__LINE__,a,b,c,d,e)
706 ok(
ret,
"ICInstall failed\n");
709 ok(
ret,
"ICOpen failed\n");
711 memset(outbuf, 0,
sizeof(outbuf));
717 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
722 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
727 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
732 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
737 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
742 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
749 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
755 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
760 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
767 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
771 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
775 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
779 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
784 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
791 ok(hic !=
NULL,
"ICGetDisplayFormat failed\n");
796 "got wrong colour\n");
802 ok(
ret,
"ICRemove failed\n");
#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)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
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
static const DWORD test_handler
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)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
static WORD const char * driver
struct tagBITMAPINFO * PBITMAPINFO
#define HKEY_LOCAL_MACHINE