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.

121 lines
2.8 KiB

  1. // $Header: G:/SwDev/WDM/Video/bt848/rcs/Scaler.h 1.2 1998/04/29 22:43:41 tomz Exp $
  2. #ifndef __SCALER_H
  3. #define __SCALER_H
  4. #include "mytypes.h"
  5. #ifndef __COMPREG_H
  6. #include "compreg.h"
  7. #endif
  8. #define HDROP HANDLE
  9. #include "viddefs.h"
  10. // structure contains video information
  11. struct VideoInfoStruct
  12. {
  13. WORD Clkx1_HACTIVE;
  14. WORD Clkx1_HDELAY;
  15. WORD Min_Pixels;
  16. WORD Active_lines_per_field;
  17. WORD Min_UncroppedPixels;
  18. WORD Max_Pixels;
  19. WORD Min_Lines;
  20. WORD Max_Lines;
  21. WORD Max_VFilter1_Pixels;
  22. WORD Max_VFilter2_Pixels;
  23. WORD Max_VFilter3_Pixels;
  24. WORD Max_VFilter1_Lines;
  25. WORD Max_VFilter2_Lines;
  26. WORD Max_VFilter3_Lines;
  27. };
  28. /////////////////////////////////////////////////////////////////
  29. //
  30. // for pisces, instantiate as ...
  31. //
  32. // Scaler evenScaler( VF_Even );
  33. // Scaler oddScaler( VF_Odd );
  34. //
  35. /////////////////////////////////////////////////////////////////
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CLASS Scaler
  38. //
  39. // Description:
  40. // This class encapsulates the register fields in the scaler portion of
  41. // the Bt848.
  42. // A complete set of functions are developed to manipulate all the
  43. // register fields in the scaler registers for the Bt848.
  44. //
  45. // Methods:
  46. // See below
  47. //
  48. // Note:
  49. // For Bt848, instantiate as ...
  50. // Scaler evenScaler( VF_Even );
  51. // Scaler oddScaler( VF_Odd );
  52. //
  53. /////////////////////////////////////////////////////////////////////////////
  54. class Scaler
  55. {
  56. public:
  57. Scaler( VidField );
  58. ~Scaler();
  59. void VideoFormatChanged( VideoFormat );
  60. void TurnVFilter( State st ) { VFilterFlag_ = st; }
  61. void Scale( MRect & );
  62. ErrorCode SetAnalogWin( const MRect & );
  63. void GetAnalogWin( MRect & ) const;
  64. ErrorCode SetDigitalWin( const MRect & );
  65. void GetDigitalWin( MRect & ) const;
  66. protected:
  67. #include "S_declar.h"
  68. VideoInfoStruct * m_ptrVideoIn;
  69. MRect AnalogWin_;
  70. MRect DigitalWin_;
  71. // member functions to set scaling registers
  72. virtual void SetHActive( MRect & );
  73. virtual void SetHDelay( void );
  74. virtual void SetHScale( void );
  75. virtual void SetHFilter( void );
  76. virtual void SetVActive( void );
  77. virtual void SetVDelay( void );
  78. virtual void SetVScale( MRect & );
  79. virtual void SetVFilter( void );
  80. private:
  81. VideoFormat m_videoFormat; // video format
  82. // this is to battle junk lines at the top of the video
  83. State VFilterFlag_;
  84. WORD m_HActive; // calcuated intermediate value
  85. WORD m_pixels; // calcuated intermediate value
  86. WORD m_lines; // calcuated intermediate value
  87. WORD m_VFilter; // calcuated intermediate value
  88. };
  89. #endif __SCALER_H