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.

134 lines
4.9 KiB

  1. /******************************************************************************\
  2. *
  3. * Copyright (c) 1996-1997 Microsoft Corporation.
  4. * Copyright (c) 1996-1997 Cirrus Logic, Inc.
  5. *
  6. * Module Name:
  7. *
  8. * O V E R L A Y . H
  9. *
  10. * This module contains common function prototypes and defines needed for
  11. * overlay support
  12. *
  13. * Revision History:
  14. *
  15. * tao1 10-22-96 Added direct draw support for CL-GD7555
  16. * myf1 03-12-97 Change new bandwidth check for CL-GD755X
  17. * myf2 03-31-97 Added direct draw support VPE
  18. * chu01 03-26-97 Bandwidth equation for the CL-GD5480
  19. * chu02 04-02-97 More overlay capabilities
  20. *
  21. \******************************************************************************/
  22. /* FOURCC definitions ------------------------------------*/
  23. #define FOURCC_YUY2 '2YUY' // YUY2
  24. #define FOURCC_YUV422 'YVYU' // UYVY
  25. #define FOURCC_PACKJR 'RJLC' // CLJR
  26. #define FOURCC_YUVPLANAR 'LPLC' // CLPL
  27. #define FOURCC_YUV420 'LPLC' // CLPL
  28. /* surface flags -----------------------------------------*/
  29. #define OVERLAY_FLG_BEGIN_ACCESS (DWORD)0x00000001
  30. #define OVERLAY_FLG_ENABLED (DWORD)0x00000002
  31. #define OVERLAY_FLG_CONVERT_PACKJR (DWORD)0x00000004
  32. #define OVERLAY_FLG_MUST_RASTER (DWORD)0x00000008
  33. #define OVERLAY_FLG_TWO_MEG (DWORD)0x00000010
  34. #define OVERLAY_FLG_CHECK (DWORD)0x00000020
  35. #define OVERLAY_FLG_COLOR_KEY (DWORD)0x00000040
  36. #define OVERLAY_FLG_INTERPOLATE (DWORD)0x00000080
  37. #define OVERLAY_FLG_OVERLAY (DWORD)0x00000100
  38. #define OVERLAY_FLG_YUV422 (DWORD)0x00000200
  39. #define OVERLAY_FLG_PACKJR (DWORD)0x00000400
  40. #define OVERLAY_FLG_USE_OFFSET (DWORD)0x00000800
  41. #define OVERLAY_FLG_YUVPLANAR (DWORD)0x00001000
  42. #define OVERLAY_FLG_SRC_COLOR_KEY (DWORD)0x00002000
  43. #define OVERLAY_FLG_DECIMATE (DWORD)0x00004000
  44. #define OVERLAY_FLG_CAPTURE (DWORD)0x00008000 //myf2, VPE
  45. // chu02
  46. #define OVERLAY_FLG_DECIMATE4 (DWORD)0x00008000
  47. #define OVERLAY_FLG_YUY2 (DWORD)0x00010000
  48. #define OVERLAY_FLG_VW_PRIMARY (DWORD)0x00020000
  49. #define OVERLAY_FLG_VW_SECONDARY (DWORD)0x00040000
  50. #define OVERLAY_FLG_TWO_VIDEO (DWORD)0x00200000
  51. /* display types (for portables) -------------------------*/
  52. #define DTYPE_UNKNOWN (int)-1
  53. #define DTYPE_640_COLOR_SINGLE_STN 0
  54. #define DTYPE_640_MONO_DUAL_STN 1
  55. #define DTYPE_640_COLOR_DUAL_STN 2
  56. #define DTYPE_640_COLOR_SINGLE_TFT 3
  57. #define DTYPE_640_COLOR_DUAL_STN_SHARP 4
  58. #define DTYPE_800_COLOR_DUAL_STN 6
  59. #define DTYPE_800_COLOR_SINGLE_TFT 7
  60. #define DTYPE_CRT 32767
  61. //myf32 #define MIN_OLAY_WIDTH 4 //minium overlay window width
  62. #define OVERLAY_OLAY_SHOW 0x100 //overlay is hidden iff bit not set
  63. #define OVERLAY_OLAY_REENABLE 0x200 //overlay was fully clipped, need reenabling
  64. VOID GetFormatInfo(PDEV* ppdev, LPDDPIXELFORMAT lpFormat, LPDWORD lpFourcc,
  65. LPWORD lpBitCount);
  66. VOID RegInitVideo(PDEV* ppdev, PDD_SURFACE_LOCAL lpSurface);
  67. VOID DisableOverlay_544x(PDEV* ppdev);
  68. VOID EnableOverlay_544x(PDEV* ppdev);
  69. VOID RegMoveVideo(PDEV* ppdev, PDD_SURFACE_LOCAL lpSurface);
  70. VOID CalculateStretchCode (LONG srcLength, LONG dstLength, LPBYTE code);
  71. BYTE GetThresholdValue(VOID);
  72. BOOL MustLineReplicate (PDEV* ppdev, PDD_SURFACE_LOCAL lpSurface, WORD wVideoDepth);
  73. BOOL IsSufficientBandwidth(PDEV* ppdev, WORD wVideoDepth, LPRECTL lpSrc, LPRECTL lpDest, DWORD dwFlags);
  74. LONG GetVCLK(PDEV* ppdev);
  75. VOID EnableStartAddrDoubleBuffer(PDEV* ppdev);
  76. DWORD GetCurrentVLine(PDEV* ppdev);
  77. VOID ClearAltFIFOThreshold_544x(PDEV * ppdev);
  78. // chu01
  79. BOOL Is5480SufficientBandwidth(PDEV* ppdev, WORD wVideoDepth, LPRECTL lpSrc, LPRECTL lpDest, DWORD dwFlags);
  80. // curs //tao1
  81. typedef struct _BWREGS
  82. {
  83. BYTE bSR2F;
  84. BYTE bSR32;
  85. BYTE bSR34;
  86. BYTE bCR42;
  87. BYTE bCR51;
  88. BYTE bCR5A;
  89. BYTE bCR5D;
  90. BYTE bCR5F;
  91. }BWREGS, FAR *LPBWREGS;
  92. BWREGS Regs; //myf33
  93. //myf33 for panning scrolling enable & DirectDraw overlay use
  94. DWORD srcLeft_clip;
  95. DWORD srcTop_clip;
  96. BOOL bLeft_clip;
  97. BOOL bTop_clip;
  98. //myf33 end
  99. VOID RegInit7555Video (PDEV *,PDD_SURFACE_LOCAL);
  100. VOID RegMove7555Video (PDEV *,PDD_SURFACE_LOCAL);
  101. VOID DisableVideoWindow (PDEV * );
  102. VOID EnableVideoWindow (PDEV * );
  103. VOID ClearAltFIFOThreshold (PDEV * );
  104. BOOL Is7555SufficientBandwidth(PDEV* ppdev, WORD wVideoDepth, LPRECTL lpSrc, LPRECTL lpDest, DWORD dwFlags);
  105. DWORD Get7555MCLK (PDEV *);
  106. BOOL IsDSTN(PDEV * );
  107. BOOL IsXGA (PDEV * );
  108. VOID PanOverlay1_Init(PDEV *,PDD_SURFACE_LOCAL, LPRECTL, LPRECTL, LPRECTL,
  109. DWORD, WORD); //myf33, DD init overlay data
  110. VOID PanOverlay7555 (PDEV *,LONG ,LONG); //myf33
  111. BOOL PanOverlay1_7555(PDEV *,LPRECTL); //myf33, PanOverlay7555 call
  112. // end curs //tao1
  113.