Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
5.9 KiB

  1. /*----------------------------------------------------------------------+
  2. | msvidc.h - Microsoft Video 1 Compressor - header file |
  3. | |
  4. | Copyright (c) 1990-1994 Microsoft Corporation. |
  5. | Portions Copyright Media Vision Inc. |
  6. | All Rights Reserved. |
  7. | |
  8. | You have a non-exclusive, worldwide, royalty-free, and perpetual |
  9. | license to use this source code in developing hardware, software |
  10. | (limited to drivers and other software required for hardware |
  11. | functionality), and firmware for video display and/or processing |
  12. | boards. Microsoft makes no warranties, express or implied, with |
  13. | respect to the Video 1 codec, including without limitation warranties |
  14. | of merchantability or fitness for a particular purpose. Microsoft |
  15. | shall not be liable for any damages whatsoever, including without |
  16. | limitation consequential damages arising from your use of the Video 1 |
  17. | codec. |
  18. | |
  19. | |
  20. +----------------------------------------------------------------------*/
  21. #ifndef RC_INVOKED
  22. #ifndef _INC_COMPDDK
  23. #define _INC_COMPDDK 50 /* version number */
  24. #endif
  25. #include <vfw.h>
  26. #include "decmprss.h" // Must include DECMPRSS.H first
  27. #include "compress.h"
  28. #endif
  29. #define ID_SCROLL 100
  30. #define ID_TEXT 101
  31. #define IDS_DESCRIPTION 42
  32. #define IDS_NAME 43
  33. #define IDS_ABOUT 44
  34. extern HMODULE ghModule;
  35. #define ALIGNULONG(i) ((i+3)&(~3)) /* ULONG aligned ! */
  36. #define WIDTHBYTES(i) ((unsigned)((i+31)&(~31))/8) /* ULONG aligned ! */
  37. #define DIBWIDTHBYTES(bi) (int)WIDTHBYTES((int)(bi).biWidth * (int)(bi).biBitCount)
  38. #ifndef _WIN32
  39. extern long FAR PASCAL muldiv32(long, long, long);
  40. #endif
  41. // in invcmap.c
  42. LPVOID FAR PASCAL MakeITable(LPRGBQUAD lprgbq, int nColors);
  43. typedef WORD RGB555;
  44. typedef DWORD RGBDWORD;
  45. typedef BYTE HUGE *HPBYTE;
  46. typedef WORD HUGE *HPWORD;
  47. typedef LONG HUGE *HPLONG;
  48. typedef RGBDWORD HUGE *HPRGBDWORD;
  49. typedef RGB555 HUGE *HPRGB555;
  50. typedef RGBTRIPLE HUGE *HPRGBTRIPLE;
  51. typedef RGBQUAD HUGE *HPRGBQUAD;
  52. typedef struct {
  53. UINT wTemporalRatio; // 100 = 1.0, 50 = .50 etc...
  54. } ICSTATE;
  55. typedef struct {
  56. DWORD dwFlags; // flags from ICOPEN
  57. DECOMPPROC DecompressProc; // current decomp proc...
  58. DECOMPPROC DecompressTest; // decomp proc...
  59. ICSTATE CurrentState; // current state of compressor.
  60. int nCompress; // count of COMPRESS_BEGIN calls
  61. int nDecompress; // count of DECOMPRESS_BEGIN calls
  62. int nDraw; // count of DRAW_BEGIN calls
  63. LONG (CALLBACK *Status) (LPARAM lParam, UINT message, LONG l);
  64. LPARAM lParam;
  65. LPBYTE lpITable;
  66. RGBQUAD rgbqOut[256];
  67. } INSTINFO, *PINSTINFO;
  68. #ifdef _WIN32
  69. #define VideoLoad() TRUE
  70. #else
  71. BOOL NEAR PASCAL VideoLoad(void);
  72. #endif
  73. void NEAR PASCAL VideoFree(void);
  74. INSTINFO *NEAR PASCAL VideoOpen(ICOPEN FAR *icinfo);
  75. LONG NEAR PASCAL VideoClose(INSTINFO * pinst);
  76. LONG NEAR PASCAL GetState(INSTINFO * pinst, LPVOID pv, DWORD dwSize);
  77. LONG NEAR PASCAL SetState(INSTINFO * pinst, LPVOID pv, DWORD dwSize);
  78. LONG NEAR PASCAL GetInfo(INSTINFO * pinst, ICINFO FAR *icinfo, DWORD dwSize);
  79. #define QueryAbout(x) (TRUE)
  80. //BOOL NEAR PASCAL QueryAbout(INSTINFO * pinst);
  81. LONG NEAR PASCAL About(INSTINFO * pinst, HWND hwnd);
  82. #define QueryConfigure(x) (TRUE)
  83. //BOOL NEAR PASCAL QueryConfigure(INSTINFO * pinst);
  84. LONG NEAR PASCAL Configure(INSTINFO * pinst, HWND hwnd);
  85. LONG FAR PASCAL CompressBegin(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  86. LONG FAR PASCAL CompressQuery(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn,LPBITMAPINFOHEADER lpbiOut);
  87. LONG FAR PASCAL CompressGetFormat(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  88. LONG FAR PASCAL Compress(INSTINFO * pinst,ICCOMPRESS FAR *icinfo, DWORD dwSize);
  89. LONG FAR PASCAL CompressGetSize(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  90. LONG FAR PASCAL CompressEnd(INSTINFO * lpinst);
  91. LONG NEAR PASCAL DecompressGetFormat(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  92. LONG NEAR PASCAL DecompressGetPalette(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  93. LONG NEAR PASCAL DecompressBegin(INSTINFO * pinst, DWORD dwFlags, LPBITMAPINFOHEADER lpbiSrc, LPVOID pSrc, int xSrc, int ySrc, int dxSrc, int dySrc, LPBITMAPINFOHEADER lpbiDst, LPVOID pDst, int xDst, int yDst, int dxDst, int dyDst);
  94. LONG NEAR PASCAL DecompressQuery(INSTINFO * pinst, DWORD dwFlags, LPBITMAPINFOHEADER lpbiSrc, LPVOID pSrc, int xSrc, int ySrc, int dxSrc, int dySrc, LPBITMAPINFOHEADER lpbiDst, LPVOID pDst, int xDst, int yDst, int dxDst, int dyDst);
  95. LONG NEAR PASCAL Decompress(INSTINFO * pinst, DWORD dwFlags, LPBITMAPINFOHEADER lpbiSrc, LPVOID pSrc, int xSrc, int ySrc, int dxSrc, int dySrc, LPBITMAPINFOHEADER lpbiDst, LPVOID pDst, int xDst, int yDst, int dxDst, int dyDst);
  96. LONG NEAR PASCAL DecompressEnd(INSTINFO * pinst);
  97. LONG NEAR PASCAL DrawQuery(INSTINFO * pinst,ICDRAWBEGIN FAR *icinfo, DWORD dwSize);
  98. LONG NEAR PASCAL DrawBegin(INSTINFO * pinst,ICDRAWBEGIN FAR *icinfo, DWORD dwSize);
  99. LONG NEAR PASCAL Draw(INSTINFO * pinst,ICDRAW FAR *icinfo, DWORD dwSize);
  100. LONG NEAR PASCAL DrawEnd(INSTINFO * pinst);
  101. #ifdef DEBUG
  102. extern void FAR CDECL dprintf(LPSTR, ...);
  103. // Allow DPF statements to span multiple lines
  104. #define DPF( _x_ ) dprintf _x_
  105. #else
  106. #define DPF(x)
  107. #endif
  108. #ifdef DEBUG
  109. /* Assert() macros */
  110. #define Assert(expr) _Assert((expr), __FILE__, __LINE__)
  111. #define AssertEval(expr) _Assert((expr), __FILE__, __LINE__)
  112. /* prototypes */
  113. BOOL FAR PASCAL _Assert(BOOL fExpr, LPSTR szFile, int iLine);
  114. #else
  115. /* Assert() macros */
  116. #define Assert(expr) (TRUE)
  117. #define AssertEval(expr) (expr)
  118. #endif