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.

136 lines
4.5 KiB

  1. /* *************************************************************************
  2. ** INTEL Corporation Proprietary Information
  3. **
  4. ** This listing is supplied under the terms of a license
  5. ** agreement with INTEL Corporation and may not be copied
  6. ** nor disclosed except in accordance with the terms of
  7. ** that agreement.
  8. **
  9. ** Copyright (c) 1995 Intel Corporation.
  10. ** All Rights Reserved.
  11. **
  12. ** *************************************************************************
  13. */
  14. // $Author: RMCKENZX $
  15. // $Date: 27 Dec 1995 14:11:58 $
  16. // $Archive: S:\h26x\src\common\cldebug.h_v $
  17. // $Header: S:\h26x\src\common\cldebug.h_v 1.6 27 Dec 1995 14:11:58 RMCKENZX $
  18. // $Log: S:\h26x\src\common\cldebug.h_v $
  19. ;//
  20. ;// Rev 1.6 27 Dec 1995 14:11:58 RMCKENZX
  21. ;//
  22. ;// Added copyright notice
  23. //
  24. // Rev 1.5 17 Nov 1995 15:13:02 BECHOLS
  25. //
  26. // Made modifications for ring 0.
  27. //
  28. // Rev 1.4 16 Nov 1995 17:34:08 AGANTZX
  29. // Added TOUT macro to output timing data
  30. //
  31. // Rev 1.3 12 Sep 1995 15:44:50 DBRUCKS
  32. // add H261 ifdef for debug statements
  33. //
  34. // Rev 1.2 03 Aug 1995 14:57:02 DBRUCKS
  35. // Add ASSERT macro
  36. //
  37. // Rev 1.1 01 Aug 1995 12:24:40 DBRUCKS
  38. // added TBD()
  39. //
  40. // Rev 1.0 31 Jul 1995 12:56:16 DBRUCKS
  41. // rename files
  42. //
  43. // Rev 1.0 17 Jul 1995 14:44:04 CZHU
  44. // Initial revision.
  45. //
  46. // Rev 1.0 17 Jul 1995 14:14:48 CZHU
  47. // Initial revision.
  48. /*
  49. * Copyright (C) 1992, 1993 Intel Corporation.
  50. */
  51. extern UINT DebugH26x;
  52. extern void AssertFailed(void FAR * fpFileName, int iLine, void FAR * fpExp);
  53. #ifndef __CLDEBUG_H__
  54. #define __CLDEBUG_H__
  55. #ifdef _DEBUG
  56. #ifdef RING0
  57. #define DBOUT(x) {SYS_printf(x);}
  58. #define TOUT(x) {SYS_printf(x);}
  59. #else
  60. #ifdef H261
  61. #define DBOUT(x) { if (DebugH26x) { \
  62. OutputDebugString((LPSTR)"M261 : "); \
  63. OutputDebugString((LPSTR)x); \
  64. OutputDebugString((LPSTR)"\n"); }}
  65. #else
  66. #define DBOUT(x) { if (DebugH26x) { \
  67. OutputDebugString((LPSTR)"M263 : "); \
  68. OutputDebugString((LPSTR)x); \
  69. OutputDebugString((LPSTR)"\n"); }}
  70. #endif
  71. #define TOUT(x) { if (DebugH26x) { \
  72. OutputDebugString((LPSTR)"TIMING : "); \
  73. OutputDebugString((LPSTR)x); \
  74. OutputDebugString((LPSTR)"\n"); }}
  75. #endif //RING0
  76. #ifdef ASSERT
  77. #undef ASSERT
  78. #endif
  79. #define ASSERT(x) { if(!(x)) AssertFailed(__FILE__,__LINE__,#x); }
  80. #else
  81. #define TOUT(x) { } // /##/
  82. #define DBOUT(x) { } // /##/
  83. #ifdef ASSERT
  84. #undef ASSERT
  85. #endif
  86. #define ASSERT(x) { } // /##/
  87. #endif
  88. #define TBD(s) DBOUT(s)
  89. #ifdef _DEBUG // { _DEBUG
  90. int WINAPI H263DbgPrintf ( LPTSTR lpszFormat, ... );
  91. extern HDBGZONE ghDbgZoneH263;
  92. #define ZONE_INIT (GETMASK(ghDbgZoneH263) & 0x0001)
  93. #define ZONE_ICM_MESSAGES (GETMASK(ghDbgZoneH263) & 0x0002)
  94. #define ZONE_DECODE_MB_HEADER (GETMASK(ghDbgZoneH263) & 0x0004)
  95. #define ZONE_DECODE_GOB_HEADER (GETMASK(ghDbgZoneH263) & 0x0008)
  96. #define ZONE_DECODE_PICTURE_HEADER (GETMASK(ghDbgZoneH263) & 0x0010)
  97. #define ZONE_DECODE_COMPUTE_MOTION_VECTORS (GETMASK(ghDbgZoneH263) & 0x0020)
  98. #define ZONE_DECODE_RTP (GETMASK(ghDbgZoneH263) & 0x0040)
  99. #define ZONE_DECODE_DETAILS (GETMASK(ghDbgZoneH263) & 0x0080)
  100. #define ZONE_BITRATE_CONTROL (GETMASK(ghDbgZoneH263) & 0x0100)
  101. #define ZONE_BITRATE_CONTROL_DETAILS (GETMASK(ghDbgZoneH263) & 0x0200)
  102. #define ZONE_ENCODE_MB (GETMASK(ghDbgZoneH263) & 0x0400)
  103. #define ZONE_ENCODE_GOB (GETMASK(ghDbgZoneH263) & 0x0800)
  104. #define ZONE_ENCODE_MV (GETMASK(ghDbgZoneH263) & 0x1000)
  105. #define ZONE_ENCODE_RTP (GETMASK(ghDbgZoneH263) & 0x2000)
  106. #define ZONE_ENCODE_DETAILS (GETMASK(ghDbgZoneH263) & 0x4000)
  107. #ifndef DEBUGMSG // { DEBUGMSG
  108. #define DEBUGMSG(z,s) ( (z) ? (H263DbgPrintf s ) : 0)
  109. #endif // } DEBUGMSG
  110. #ifndef FX_ENTRY // { FX_ENTRY
  111. #define FX_ENTRY(s) static TCHAR _this_fx_ [] = (s);
  112. #define _fx_ ((LPTSTR) _this_fx_)
  113. #endif // } FX_ENTRY
  114. #define ERRORMESSAGE(m) (H263DbgPrintf m)
  115. #else // }{ _DEBUG
  116. #ifndef FX_ENTRY // { FX_ENTRY
  117. #define FX_ENTRY(s)
  118. #endif // } FX_ENTRY
  119. #ifndef DEBUGMSG // { DEBUGMSG
  120. #define DEBUGMSG(z,s)
  121. #define ERRORMESSAGE(m)
  122. #endif // } DEBUGMSG
  123. #define _fx_
  124. #define ERRORMESSAGE(m)
  125. #endif // } _DEBUG
  126. #endif /* multi-inclusion protection */