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.

101 lines
4.6 KiB

  1. /*----------------------------------------------------------------------+
  2. | decmprss.h - Microsoft Video 1 Compressor - decompress 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. // width and height of a compression blocks
  22. #define WIDTH_CBLOCK 4
  23. #define HEIGHT_CBLOCK 4
  24. #define EDGE_HEIGHT_CBLOCK 2
  25. #define EDGE_WIDTH_CBLOCK 2
  26. #define EDGE_SUBBLOCKS ((HEIGHT_CBLOCK * WIDTH_CBLOCK) / (EDGE_HEIGHT_CBLOCK * EDGE_WIDTH_CBLOCK))
  27. #define NEXT_BLOCK( row, bpr, height ) (((HPBYTE)row) + (bpr*height))
  28. #define NEXT_BYTE_ROW( row, bpr ) (((HPBYTE)row) + bpr)
  29. #define NEXT_RGBT_PIXEL_ROW( row, bpr ) ((HPRGBTRIPLE)(((HPBYTE)row) + bpr))
  30. #define NEXT_BLOCK_ROW( row, bpr, height ) ((HPRGBTRIPLE)NEXT_BLOCK( row, bpr, height ))
  31. typedef DWORD (FAR PASCAL *DECOMPPROC)(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  32. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  33. // in decmprss.c
  34. DWORD FAR PASCAL DecompressFrame24(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  35. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  36. // in decmprss.c
  37. DWORD FAR PASCAL DecompressFrame8(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  38. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  39. #ifndef _WIN32
  40. // in decram8.asm
  41. DWORD FAR PASCAL DecompressCram8(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  42. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  43. // in decram8.asm
  44. DWORD FAR PASCAL DecompressCram8x2(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  45. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  46. // in decram16.asm
  47. DWORD FAR PASCAL DecompressCram16(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  48. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  49. DWORD FAR PASCAL DecompressCram16x2(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  50. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  51. // in dcram168.asm
  52. DWORD FAR PASCAL DecompressCram168(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  53. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  54. // in decram32.asm
  55. DWORD FAR PASCAL DecompressCram32(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  56. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  57. DWORD FAR PASCAL DecompressCram32x2(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  58. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  59. // in dcram286.asm
  60. DWORD FAR PASCAL DecompressCram8_286(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  61. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  62. // in dcram286.asm
  63. DWORD FAR PASCAL DecompressCram16_286(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  64. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  65. #else
  66. // in decmprss.c
  67. DWORD FAR PASCAL DecompressFrame8X2C(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  68. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  69. // in decmprss.c
  70. DWORD FAR PASCAL DecompressFrame16To8C(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  71. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  72. // in decmprss.c
  73. DWORD FAR PASCAL DecompressFrame16To555C(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  74. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  75. DWORD FAR PASCAL DecompressFrame16To565C(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  76. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  77. // in decmprss.c
  78. DWORD FAR PASCAL DecompressFrame16To8X2C(LPBITMAPINFOHEADER lpbiIn, LPVOID lpIn,
  79. LPBITMAPINFOHEADER lpbiOut, LPVOID lpOut, LONG x, LONG y);
  80. #endif