Source code of Windows XP (NT5)
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.

253 lines
7.2 KiB

  1. /**************************************************************************
  2. *
  3. * $RCSfile: Avwinwdm.h $
  4. * $Source: u:/si/VXP/Wdm/Encore/52x/Avwinwdm.h $
  5. * $Author: Max $
  6. * $Date: 1999/02/19 00:10:32 $
  7. * $Revision: 1.4 $
  8. *
  9. * PURPOSE: AVWINWDM definition file
  10. *
  11. *
  12. ***************************************************************************
  13. *
  14. * Copyright (C) 1993, 1998 AuraVision Corporation. All rights reserved.
  15. *
  16. * AuraVision Corporation makes no warranty of any kind, express or
  17. * implied, with regard to this software. In no event shall AuraVision
  18. * Corporation be liable for incidental or consequential damages in
  19. * connection with or arising from the furnishing, performance, or use of
  20. * this software.
  21. *
  22. ***************************************************************************/
  23. #ifndef AVWINWDM_H
  24. #define AVWINWDM_H
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #ifndef FAR
  29. #define FAR
  30. #endif
  31. #ifndef PASCAL
  32. #define PASCAL _stdcall
  33. #endif
  34. #ifndef APIENTRY
  35. #define APIENTRY FAR PASCAL
  36. #endif
  37. #define _AVEXPORT
  38. #define AVEXPORT( TYPE ) _AVEXPORT TYPE APIENTRY
  39. #ifndef BOOL
  40. #define BOOL int
  41. #endif
  42. #ifndef SINT
  43. typedef signed int SINT;
  44. #endif
  45. //////////////////////////////////////
  46. // Parameter entries equate
  47. //////////////////////////////////////
  48. #define AVXPOSITION 0
  49. #define AVYPOSITION 1
  50. #define AVCROPLEFT 2
  51. #define AVCROPTOP 3
  52. #define AVCROPRIGHT 4
  53. #define AVCROPBOTTOM 5
  54. #define AVDUMMY 6
  55. #define AVIRQLEVEL 7
  56. #define AVPLAYBACK 8
  57. #define AVREDLOW 9
  58. #define AVREDHIGH 10
  59. #define AVGREENLOW 11
  60. #define AVGREENHIGH 12
  61. #define AVBLUELOW 13
  62. #define AVBLUEHIGH 14
  63. #define AVNUMCOLORS 15
  64. #define AVVLBUS 16 // Do not use
  65. #define AVINITIALIZED 17
  66. #define AVCOLORKEY 18
  67. #define AVADDRESS 19
  68. #define AVPORT 20
  69. #define AVSELECTOR 21
  70. #define AVBRIGHTNESS 22
  71. #define AVCONTRAST 23
  72. #define AVSATURATION 24
  73. #define AVSOURCE 25
  74. #define AVFREEZESTATE 26
  75. #define AVHUE 27
  76. #define AVINPUTFORMAT 28
  77. #define AVINTERLACEOUTPUT 29
  78. #define AVQFACTOR 30
  79. #define AVINTERLEAVE 31
  80. #define AVCOLORKEYENABLE 32
  81. #define AVMEMORYSIZE 33
  82. #define AVBUFFERING 34 // Do not use
  83. #define AVVGACONTROL 35
  84. #define AVCHROMA 36
  85. #define AVGAMMA 37
  86. #define AVNEGATIVE 38
  87. #define AVSOLARIZATION 39
  88. #define AVALIGNDELAY 40
  89. #define AVCLKDELAY 41 // Do not use. Use AVSKEWRISE instead
  90. #define AVPULSEWIDTH 42 // Do not use. Use AVDUTYCYCLEHILO
  91. #define AVSHARP 43
  92. #define AVVGAPATH 44 // Do not use
  93. #define AVONTOP 45
  94. #define AVDIGITALMUX 46
  95. #define AVSKEWRISE 47
  96. #define AVSKEWFALL 48
  97. #define AVDUTYCYCLEHILO 49
  98. #define AVBLANKDELAY 50
  99. #define AVRVOLUME 51
  100. #define AVLVOLUME 52
  101. #define AVCOLORKEY1 53
  102. #define AVCOLORKEY2 54
  103. #define AVCOLORKEY3 55
  104. #define AVRISEINGFALLING 56
  105. #define AVINALIGN 57
  106. #define AVCROPLEFTOFFSET 58
  107. #define AVCROPTOPOFFSET 59
  108. #define AVCROPRIGHTOFFSET 60
  109. #define AVCROPBOTTOMOFFSET 61
  110. #define AVAUDIO 62
  111. #define AVFRAMEBUFFER 63
  112. #define DOVE_PRESENCE 64
  113. #define DOVE_RATIO 65
  114. #define DOVE_VERT_RATE 66
  115. #define DOVE_HORIZ_RATE 67
  116. #define DOVE_AUTO 68
  117. #define AVAVICOLOR 69 // Control AVI playback to use natural color or not
  118. #define NUMPARAMS 70 // Total number of Parameters.
  119. /////////////////////////////////////////////////////////////////////
  120. //
  121. // Macro definitions for control parameters
  122. //
  123. /////////////////////////////////////////////////////////////////////
  124. #define DOVEREDHIGH 0
  125. #define DOVEREDLOW 1
  126. #define DOVEGREENHIGH 2
  127. #define DOVEGREENLOW 3
  128. #define DOVEBLUEHIGH 4
  129. #define DOVEBLUELOW 5
  130. #define RESOLUTION_WIDTH 6
  131. #define RESOLUTION_HEIGHT 7
  132. #define RESOLUTION_DEPTH 8
  133. #define RESOLUTION_PLANE 9
  134. #define DACRED 11
  135. #define DACGREEN 12
  136. #define DACBLUE 13
  137. #define COMMONGAIN 14
  138. #define AVFADING 15
  139. #define BLANKWIDTH 16
  140. #define BLANKSTART 17
  141. #define ALPHA 18
  142. #define WIDTH_RATIO 19
  143. #define CLOCK_DELAY 20
  144. #define KEYRED 21
  145. #define KEYGREEN 22
  146. #define KEYBLUE 23
  147. #define RED_REFERENCE 24
  148. #define GREEN_REFERENCE 25
  149. #define BLUE_REFERENCE 26
  150. #define KEYMODE 27
  151. #define HORIZ_TOTAL 28
  152. #define VERT_TOTAL 29
  153. #define DFILTER 31
  154. #define AFILTER 32
  155. #define RED_LOW_REF 33
  156. #define GREEN_LOW_REF 34
  157. #define BLUE_LOW_REF 35
  158. #define RED_HIGH_REF 36
  159. #define GREEN_HIGH_REF 37
  160. #define BLUE_HIGH_REF 38
  161. #define DOVEPARAM 39
  162. // Automatic procedure(s) flags:
  163. #define AP_NEWVGA (-1) // New VGA detected. Perform full setup
  164. #define AP_NEWVGAAFTERFIRSTSTEP (-2) // Internal flag - set after VGA detection is half-way
  165. #define AP_NEWVGAAFTERSECONDSTEP (-3) // Internal flag - set after VGA detection is completed
  166. #define AP_NEWMODE 0 // New display mode. Perform autoalignment
  167. #define AP_KNOWNMODE 1 // Known mode. No setup is nessessary
  168. #define AP_NEWMODEAFTERFIRSTSTEP 2 // Internal flag - set after blue color key is detected
  169. #define AP_NEWMODEAFTERSECONDSTEP 3 // Internal flag - set after alignment is finished
  170. ///////////////////////////////////////////////////////////
  171. // Functions that export from AV WDM driver
  172. ///////////////////////////////////////////////////////////
  173. VOID AV_SetContextHandle( PVOID hHandle, PVOID pDeviceObj );
  174. BOOL AV_LoadConfiguration();
  175. BOOL AV_SaveConfiguration();
  176. UINT AV_Initialize();
  177. VOID AV_SetVxpConfig( LPVOID BaseAddr );
  178. BOOL AV_EnableVideo();
  179. BOOL AV_DisableVideo();
  180. BOOL AV_CreateWindow( SINT X, SINT Y, SINT W, SINT H, BOOL Flag );
  181. BOOL AV_DWSetColorKey( DWORD Value );
  182. DWORD AV_DWRequestColorKey();
  183. BOOL AV_Exit();
  184. VOID AV_UpdateVideo();
  185. BOOL AV_DisplayChange();
  186. VOID DoveGetReferenceStep1();
  187. VOID DoveGetReferenceStep2();
  188. BOOL DoveAutoColorKey();
  189. BOOL DoveAutoColorKey2();
  190. BOOL DoveAutoAlign();
  191. BOOL DoveAutoConfig();
  192. // 1 - OK
  193. // 0 - known VGA, new mode
  194. // -1 - new VGA
  195. int AV_SetNewVGAMode( PWCHAR wszDriver, ULONG ulWidth, ULONG ulHeight, ULONG ulBits );
  196. //////////////////////////////////////////////////////////////////////////////
  197. // AV_SetParameters //
  198. // Return: UINT //
  199. // Bit 0 TRUE/FALSE indicates if the function is //
  200. // successful //
  201. // 0 Fail 1 OK //
  202. // Bit 1 Indicates if you need to do av_updatevideo //
  203. // 0 No 1 Yes //
  204. //////////////////////////////////////////////////////////////////////////////
  205. UINT AV_SetParameter( UINT Index, UINT Value );
  206. UINT AV_GetParameter( UINT Index );
  207. /////////////////////////////////////////////////////////////
  208. // Keying modes used by AV_SetKeyMode() and AV_GetKeyMode();
  209. #ifndef KEY_NONE
  210. #define KEY_NONE 0
  211. #define KEY_COLOR 1 // Color Keying mode
  212. #define KEY_CHROMA 2 // Chroma Keying mode
  213. #define KEY_POT 4 // Picture-On-Top mode
  214. #endif
  215. /////////////////////////////////////////////////////////////
  216. VOID AV_SetKeyMode( UINT mode, BOOL save );
  217. UINT AV_GetKeyMode();
  218. WORD DOVE_SetParam( WORD id, WORD value );
  219. WORD DOVE_GetParam( WORD id );
  220. VOID AV_SetChromaRange
  221. (
  222. UINT wRedLow,
  223. UINT wRedHigh,
  224. UINT wGreenLow,
  225. UINT wGreenHigh,
  226. UINT wBlueLow,
  227. UINT wBlueHigh
  228. );
  229. UINT AV_SetTScaleMode( int mode );
  230. VOID DoveSetColorRange( WORD RH, WORD RL, WORD GH, WORD GL, WORD BH, WORD BL );
  231. VOID DoveSetAlphaMix( WORD AlphaValue );
  232. VOID DoveFadeIn( WORD ntime );
  233. VOID DoveFadeOut( WORD ntime );
  234. VOID DoveSetDAC( WORD Red, WORD Green, WORD Blue, WORD CGain );
  235. WORD HW_GetExternalRegister( UINT, WORD, WORD );
  236. WORD HW_SetExternalRegister( UINT,WORD, WORD, WORD );
  237. #ifdef __cplusplus
  238. }
  239. #endif
  240. #endif