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.

324 lines
12 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. //
  15. // $Author: JMCVEIGH $
  16. // $Date: 05 Feb 1997 12:14:22 $
  17. // $Archive: S:\h26x\src\common\cdrvcom.h_v $
  18. // $Header: S:\h26x\src\common\cdrvcom.h_v 1.21 05 Feb 1997 12:14:22 JMCVEIGH $
  19. // $Log: S:\h26x\src\common\cdrvcom.h_v $
  20. ;//
  21. ;// Rev 1.21 05 Feb 1997 12:14:22 JMCVEIGH
  22. ;// Support for improved PB-frames custom message handling.
  23. ;//
  24. ;// Rev 1.20 19 Dec 1996 16:44:08 MDUDA
  25. ;// Added custom messages to get machine type information.
  26. ;//
  27. ;// Rev 1.19 16 Dec 1996 17:36:46 JMCVEIGH
  28. ;// H.263+ custom message definitions.
  29. ;//
  30. ;// Rev 1.18 11 Dec 1996 14:56:08 JMCVEIGH
  31. ;//
  32. ;// Added H.263+ field lengths for EPTYPE and custom message definitions.
  33. ;//
  34. ;// Rev 1.17 09 Dec 1996 17:42:46 JMCVEIGH
  35. ;// Added support for arbitrary frame size support.
  36. ;//
  37. ;// Rev 1.16 09 Dec 1996 09:25:22 MDUDA
  38. ;//
  39. ;// Modified _CODEC_STATS stuff.
  40. ;//
  41. ;// Rev 1.15 11 Oct 1996 16:01:46 MDUDA
  42. ;//
  43. ;// Added initial _CODEC_STATS stuff.
  44. ;//
  45. ;// Rev 1.14 10 Sep 1996 16:13:04 KLILLEVO
  46. ;// added custom message in decoder to turn block edge filter on or off
  47. ;//
  48. ;// Rev 1.13 22 Jul 1996 14:44:36 BECHOLS
  49. ;// fixed last comment.
  50. ;//
  51. ;// Rev 1.12 22 Jul 1996 14:36:20 BECHOLS
  52. ;// Wrapped the comment section with /* ... */ /* so that Steve Ing won't
  53. ;// be hassled with changing this.
  54. ;//
  55. ;// Rev 1.11 22 May 1996 18:48:08 BECHOLS
  56. ;//
  57. ;// Added APPLICATION_IDENTIFICATION_CODE.
  58. ;//
  59. ;// Rev 1.10 06 May 1996 00:41:50 BECHOLS
  60. ;//
  61. ;// Added the necessary message constants to allow the app to control
  62. ;// the bit rate dialog stuff.
  63. ;//
  64. ;// Rev 1.9 26 Apr 1996 11:10:44 BECHOLS
  65. ;//
  66. ;// Added RTP stuff.
  67. ;//
  68. ;// Rev 1.8 27 Dec 1995 14:11:54 RMCKENZX
  69. ;// Added copyright notice
  70. ;//
  71. ;// Added CODEC_CUSTOM_ENCODER_CONTROL.
  72. ;// Integrate with build 29
  73. //
  74. ////////////////////////////////////////////////////////////////////////////
  75. // ---------------------------------------------------------------------
  76. // ?_CUSTOM_VIDEO_EFFECTS:
  77. // This header defines the flags passed to lParam1 to determine what
  78. // function the driver (capture/codec) performs. The actual message
  79. // is defined in a custom header provided by each driver team.
  80. //
  81. // Parameters:
  82. // hdrvr - Installable driver handle (must be the video in device
  83. // channel for capture driver)
  84. // lParam1 - function selector
  85. // lParam2 - value/address to return value
  86. //
  87. // HIWORD(lParam1) = VE_SET_CURRENT:
  88. // LOWORD(lParam1) = VE_CONTRAST, VE_HUE, VE_SATURATION, VE_BRIGHTNESS
  89. // lParam2 = value of corresponding value..
  90. //
  91. // HIWORD(lParam1) = VE_GET_FACTORY_DEFAULT:
  92. // LOWORD(lParam1) = VE_CONTRAST, VE_HUE, VE_SATURATION, VE_BRIGHTNESS
  93. // lParam2 = (WORD FAR *)Address of the return value.
  94. //
  95. // HIWORD(lParam1) = VE_GET_FACTORY_LIMITS:
  96. // LOWORD(lParam1) = VE_CONTRAST, VE_HUE, VE_SATURATION, VE_BRIGHTNESS
  97. // lParam2 = (DWORD FAR *)Address of the return value.
  98. // LOWORD(*lParam2) = lower limit
  99. // HIWORD(*lParam2) = upper limit
  100. //
  101. // HIWORD(lParam1) = VE_SET_INPUT_CONNECTOR:
  102. // LOWORD(lParam1) = VE_INPUT_COMPOSITE_1, VE_INPUT_SVIDEO_1
  103. // lParam2 = 0
  104. // ---------------------------------------------------------------------
  105. */
  106. // CUSTOM_VIDEO_EFFECTS: LOWORD(lParam1)
  107. #define VE_CONTRAST 0
  108. #define VE_HUE 1
  109. #define VE_SATURATION 2
  110. #define VE_BRIGHTNESS 3
  111. // CUSTOM_VIDEO_EFFECTS: HIWORD(lParam1)
  112. #define VE_SET_CURRENT 0
  113. #define VE_GET_FACTORY_DEFAULT 1
  114. #define VE_GET_FACTORY_LIMITS 2
  115. #define VE_SET_INPUT_CONNECTOR 3
  116. #define VE_RESET_CURRENT 4
  117. // CUSTOM_SET_INPUT_CONNECTOR: LOWORD(lParam1)
  118. #define VE_INPUT_COMPOSITE_1 0
  119. #define VE_INPUT_SVIDEO_1 1
  120. ////////////////////////////////////////////////////////////////////////////
  121. // ---------------------------------------------------------------------
  122. // ?_CUSTOM_ENCODER_CONTROL:
  123. // This header defines the flags passed to lParam1 to determine what
  124. // function the driver (capture/codec) performs. The actual message
  125. // is defined in a custom header provided by each driver team.
  126. //
  127. // Parameters:
  128. // hdrvr - Installable driver handle (must be the video in device
  129. // channel for capture driver)
  130. // lParam1 - function selector
  131. // lParam2 - value/address to return value
  132. //
  133. // HIWORD(lParam1) = EC_GET_FACTORY_DEFAULT:
  134. // LOWORD(lParam1) = EC_RTP_HEADER, EC_RESILIENCY, EC_BITRATE_CONTROL, EC_PACKET_SIZE, EC_PACKET_LOSS, EC_BITRATE
  135. // lParam2 = (DWORD FAR *)Address of the return value.
  136. //
  137. // HIWORD(lParam1) = VE_GET_FACTORY_LIMITS:
  138. // LOWORD(lParam1) = EC_PACKET_SIZE, EC_PACKET_LOSS, EC_BITRATE
  139. // lParam2 = (DWORD FAR *)Address of the return value.
  140. // LOWORD(*lParam2) = lower limit
  141. // HIWORD(*lParam2) = upper limit
  142. //
  143. // HIWORD(lParam1) = EC_GET_CURRENT:
  144. // LOWORD(lParam1) = EC_RTP_HEADER, EC_RESILIENCY, EC_BITRATE_CONTROL, EC_PACKET_SIZE, EC_PACKET_LOSS, EC_BITRATE
  145. // lParam2 = (DWORD FAR *)Address of the return value.
  146. //
  147. // HIWORD(lParam1) = EC_SET_CURRENT:
  148. // LOWORD(lParam1) = EC_RTP_HEADER, EC_RESILIENCY, EC_BITRATE_CONTROL, EC_PACKET_SIZE, EC_PACKET_LOSS, EC_BITRATE
  149. // lParam2 = value of corresponding value..
  150. // ---------------------------------------------------------------------
  151. // CUSTOM_ENCODER_CONTROL: LOWORD(lParam1)
  152. #define EC_RTP_HEADER 0
  153. #define EC_RESILIENCY 1
  154. #define EC_PACKET_SIZE 2
  155. #define EC_PACKET_LOSS 3
  156. #define EC_BITRATE_CONTROL 4
  157. #define EC_BITRATE 5
  158. #ifdef H263P
  159. // H.263+ options
  160. #define EC_H263_PLUS 1000 // Must be sent before any option messages sent
  161. // Numbering convention:
  162. // 1xxx: H.263+ option
  163. // xBBx: Bit number of option in extended PTYPE field
  164. // Numbers are spaced by 10 to allow for additional parameters related to each option
  165. //#define EC_ADVANCED_INTRA 1040
  166. #define EC_DEBLOCKING_FILTER 1050
  167. //#define EC_SLICE_STRUCTURED 1060
  168. //#define EC_CUSTOM_PCF 1070
  169. //#define EC_BACK_CHANNEL 1080
  170. //#define EC_SCALABILITY 1090
  171. //#define EC_TRUE_BFRAMES 1100
  172. //#define EC_REF_RESAMPLING 1110
  173. //#define EC_RES_UPDATE 1120
  174. #define EC_IMPROVED_PB_FRAMES 1130
  175. // Test support, stats monitoring, etc. messages are isolated here.
  176. #define EC_MACHINE_TYPE 2000
  177. // The use of the improved PB-frame mode is currently not signaled in the picture header.
  178. // We assume that if EPTYPE is present and the frame was signaled as a PB-frame
  179. // in PTYPE, then the improved PB-frame mode is used.
  180. // end H.263+ options
  181. #endif // H263P
  182. // CUSTOM_ENCODER_CONTROL: HIWORD(lParam1)
  183. #define EC_SET_CURRENT 0
  184. #define EC_GET_FACTORY_DEFAULT 1
  185. #define EC_GET_FACTORY_LIMITS 2
  186. #define EC_GET_CURRENT 3
  187. #define EC_RESET_TO_FACTORY_DEFAULTS 4
  188. ////////////////////////////////////////////////////////////////////////////
  189. // ---------------------------------------------------------------------
  190. // ?_CUSTOM_DECODER_CONTROL:
  191. // This header defines the flags passed to lParam1 to determine what
  192. // function the driver (capture/codec) performs. The actual message
  193. // is defined in a custom header provided by each driver team.
  194. //
  195. // Parameters:
  196. // hdrvr - Installable driver handle (must be the video in device
  197. // channel for capture driver)
  198. // lParam1 - function selector
  199. // lParam2 - value/address to return value
  200. //
  201. // HIWORD(lParam1) = DC_SET_CURRENT:
  202. // LOWORD(lParam1) = DC_BLOCK_EDGE_FILTER;
  203. // lParam2 = 0:off, 1:on
  204. // CUSTOM_DECODER_CONTROL: LOWORD(lParam1)
  205. #define DC_BLOCK_EDGE_FILTER 0
  206. #if defined(H263P)
  207. // Test support, stats monitoring, etc. messages are isolated here.
  208. #define DC_MACHINE_TYPE 2000
  209. #endif
  210. // CUSTOM_DECODER_CONTROL: HIWORD(lParam1)
  211. #define DC_SET_CURRENT 0
  212. #if defined(H263P)
  213. // This was added simply to provide a consistent way to access
  214. // machine type (see DC_MACHINE_TYPE).
  215. #define DC_GET_CURRENT 1
  216. #endif
  217. /*
  218. * Bit stream field sizes
  219. */
  220. #ifdef H261
  221. const unsigned int FIELDLEN_PSC = 20;
  222. const unsigned int FIELDLEN_TR = 5; // temporal reference
  223. const unsigned int FIELDLEN_PTYPE = 6; // picture type
  224. const unsigned int FIELDLEN_PTYPE_SPLIT = 1;
  225. const unsigned int FIELDLEN_PTYPE_DOC = 1;
  226. const unsigned int FIELDLEN_PTYPE_RELEASE = 1;
  227. const unsigned int FIELDLEN_PTYPE_SRCFORMAT = 1;
  228. const unsigned int FIELDLEN_PTYPE_STILL = 1;
  229. const unsigned int FIELDLEN_PTYPE_SPARE = 1;
  230. const unsigned int FIELDLEN_PEI = 1; // extra insertion information.
  231. const unsigned int FIELDLEN_PSPARE = 8; // spare information
  232. const unsigned int FIELDLEN_GBSC = 16;
  233. const unsigned int FIELDLEN_GN = 4;
  234. const unsigned int FIELDLEN_GQUANT = 5;
  235. const unsigned int FIELDLEN_GEI = 1;
  236. const unsigned int FIELDLEN_MQUANT = 5;
  237. const unsigned int FIELDLEN_MBA_STUFFING = 11;
  238. #else
  239. const unsigned int FIELDLEN_PSC = 22;
  240. const unsigned int FIELDLEN_TR = 8; // temporal reference
  241. const unsigned int FIELDLEN_PTYPE = 13; // picture type
  242. const unsigned int FIELDLEN_PTYPE_CONST = 2;
  243. const unsigned int FIELDLEN_PTYPE_SPLIT = 1;
  244. const unsigned int FIELDLEN_PTYPE_DOC = 1;
  245. const unsigned int FIELDLEN_PTYPE_RELEASE = 1;
  246. const unsigned int FIELDLEN_PTYPE_SRCFORMAT = 3;
  247. const unsigned int FIELDLEN_PTYPE_CODINGTYPE = 1;
  248. const unsigned int FIELDLEN_PTYPE_UMV = 1;
  249. const unsigned int FIELDLEN_PTYPE_SAC = 1;
  250. const unsigned int FIELDLEN_PTYPE_AP = 1;
  251. const unsigned int FIELDLEN_PTYPE_PB = 1;
  252. #ifdef H263P
  253. const unsigned int FIELDLEN_EPTYPE_SRCFORMAT = 3;
  254. const unsigned int FIELDLEN_EPTYPE_CPCF = 1;
  255. const unsigned int FIELDLEN_EPTYPE_AI = 1;
  256. const unsigned int FIELDLEN_EPTYPE_DF = 1;
  257. const unsigned int FIELDLEN_EPTYPE_SS = 1;
  258. const unsigned int FIELDLEN_EPTYPE_IPB = 1;
  259. const unsigned int FIELDLEN_EPTYPE_BCO = 1;
  260. const unsigned int FIELDLEN_EPTYPE_SCALE = 1;
  261. const unsigned int FIELDLEN_EPTYPE_TB = 1;
  262. const unsigned int FIELDLEN_EPTYPE_RPR = 1;
  263. const unsigned int FIELDLEN_EPTYPE_RRU = 1;
  264. const unsigned int FIELDLEN_EPTYPE_CONST = 5;
  265. const unsigned int FIELDLEN_CSFMT_PARC = 4;
  266. const unsigned int FIELDLEN_CSFMT_FWI = 9;
  267. const unsigned int FIELDLEN_CSFMT_CONST = 1;
  268. const unsigned int FIELDLEN_CSFMT_FHI = 9;
  269. const unsigned int FIELDLEN_EPAR_WIDTH = 8;
  270. const unsigned int FIELDLEN_EPAR_HEIGHT = 8;
  271. #endif
  272. const unsigned int FIELDLEN_PQUANT = 5; // picture quant value
  273. const unsigned int FIELDLEN_CPM = 1; // continuous presence multipoint indicator
  274. const unsigned int FIELDLEN_PLCI = 2; // picture logical channel indicator.
  275. const unsigned int FIELDLEN_TRB = 3; // temporal reference for B frames
  276. const unsigned int FIELDLEN_DBQUANT = 2;// B frame differential quant value
  277. const unsigned int FIELDLEN_PEI = 1; // extra insertion information.
  278. const unsigned int FIELDLEN_PSPARE = 8; // spare information
  279. const unsigned int FIELDLEN_GBSC = 17; // Group of blocks start code
  280. const unsigned int FIELDLEN_GN = 5; // GOB number.
  281. const unsigned int FIELDLEN_GLCI = 2; // GOB logical channel indicator
  282. const unsigned int FIELDLEN_GFID = 2; // GOB Frame ID
  283. const unsigned int FIELDLEN_GQUANT = 5; // GQUANT
  284. #endif
  285. /*
  286. * Bit stream field values
  287. */
  288. #ifdef H261
  289. const unsigned int FIELDVAL_PSC = 0x00010;
  290. const unsigned int FIELDVAL_GBSC = 0x0001;
  291. const unsigned int FIELDVAL_MBA_STUFFING = 0x00F;
  292. #else
  293. const unsigned int FIELDVAL_PSC = 0x000020;
  294. const unsigned int FIELDVAL_GBSC = 1;
  295. #endif