1ffec4cb1Sshadow303 /****************************************************************************** 2ffec4cb1Sshadow303 / 3ffec4cb1Sshadow303 / File: Theater.h 4ffec4cb1Sshadow303 / 5ffec4cb1Sshadow303 / Description: ATI Rage Theater Video Decoder interface. 6ffec4cb1Sshadow303 / 7ffec4cb1Sshadow303 / Copyright 2001, Carlos Hasan 8ffec4cb1Sshadow303 / 9ffec4cb1Sshadow303 *******************************************************************************/ 10ffec4cb1Sshadow303 #ifndef __THEATER_H__ 11ffec4cb1Sshadow303 #define __THEATER_H__ 12ffec4cb1Sshadow303 13ffec4cb1Sshadow303 #include "Radeon.h" 14ffec4cb1Sshadow303 #include "VIPPort.h" 15ffec4cb1Sshadow303 16ffec4cb1Sshadow303 enum theater_identifier { 17*863634b8SAxel Dörfler // C_THEATER_VIP_VENDOR_ID = 0x1002, 18*863634b8SAxel Dörfler C_THEATER100_VIP_DEVICE_ID = 0x4D541002, 19*863634b8SAxel Dörfler C_THEATER200_VIP_DEVICE_ID = 0x4d4a1002 20ffec4cb1Sshadow303 }; 21ffec4cb1Sshadow303 22ffec4cb1Sshadow303 23ffec4cb1Sshadow303 enum theater_standard { 24ffec4cb1Sshadow303 // TK: rearranged to match spec order 25ffec4cb1Sshadow303 C_THEATER_NTSC = 0, 26ffec4cb1Sshadow303 C_THEATER_NTSC_JAPAN = 1, 27ffec4cb1Sshadow303 C_THEATER_NTSC_443 = 2, 28ffec4cb1Sshadow303 C_THEATER_PAL_M = 3, 29ffec4cb1Sshadow303 C_THEATER_PAL_N = 4, 30ffec4cb1Sshadow303 C_THEATER_PAL_NC = 5, 31ffec4cb1Sshadow303 C_THEATER_PAL_BDGHI = 6, 32ffec4cb1Sshadow303 C_THEATER_PAL_60 = 7, 33ffec4cb1Sshadow303 C_THEATER_SECAM = 8 34ffec4cb1Sshadow303 }; 35ffec4cb1Sshadow303 36ffec4cb1Sshadow303 enum theater_source { 37ffec4cb1Sshadow303 C_THEATER_TUNER = 0, 38ffec4cb1Sshadow303 C_THEATER_COMPOSITE = 1, 39ffec4cb1Sshadow303 C_THEATER_SVIDEO = 2 40ffec4cb1Sshadow303 }; 41ffec4cb1Sshadow303 42ffec4cb1Sshadow303 class CTheater { 43ffec4cb1Sshadow303 public: 44*863634b8SAxel Dörfler CTheater(CRadeon & radeon, int device); 45ffec4cb1Sshadow303 46*863634b8SAxel Dörfler virtual ~CTheater(); 47ffec4cb1Sshadow303 48*863634b8SAxel Dörfler virtual status_t InitCheck() const = 0; 49ffec4cb1Sshadow303 50*863634b8SAxel Dörfler virtual void Reset() = 0; 51ffec4cb1Sshadow303 52*863634b8SAxel Dörfler virtual void SetEnable(bool enable, bool vbi) = 0; 53ffec4cb1Sshadow303 54*863634b8SAxel Dörfler virtual void SetStandard(theater_standard standard, theater_source source) = 0; 55ffec4cb1Sshadow303 56*863634b8SAxel Dörfler virtual void SetSize(int hactive, int vactive) = 0; 57ffec4cb1Sshadow303 58*863634b8SAxel Dörfler virtual void SetDeinterlace(bool deinterlace) = 0; 59ffec4cb1Sshadow303 60*863634b8SAxel Dörfler virtual void SetSharpness(int sharpness) = 0; 61ffec4cb1Sshadow303 62*863634b8SAxel Dörfler virtual void SetBrightness(int brightness) = 0; 63ffec4cb1Sshadow303 64*863634b8SAxel Dörfler virtual void SetContrast(int contrast) = 0; 65ffec4cb1Sshadow303 66*863634b8SAxel Dörfler virtual void SetSaturation(int saturation) = 0; 67ffec4cb1Sshadow303 68*863634b8SAxel Dörfler virtual void SetHue(int hue) = 0; 69ffec4cb1Sshadow303 70*863634b8SAxel Dörfler virtual int CurrentLine() = 0; 71ffec4cb1Sshadow303 72*863634b8SAxel Dörfler virtual void getActiveRange( theater_standard standard, CRadeonRect &rect ) = 0; 73ffec4cb1Sshadow303 74*863634b8SAxel Dörfler virtual void getVBIRange( theater_standard standard, CRadeonRect &rect ) = 0; 75ffec4cb1Sshadow303 76*863634b8SAxel Dörfler virtual void PrintToStream() = 0; 77ffec4cb1Sshadow303 78*863634b8SAxel Dörfler uint32 Capabilities() const; 79ffec4cb1Sshadow303 80ffec4cb1Sshadow303 public: 81ffec4cb1Sshadow303 int Register(int index); 82ffec4cb1Sshadow303 83ffec4cb1Sshadow303 int Register(int index, int mask); 84ffec4cb1Sshadow303 85ffec4cb1Sshadow303 void SetRegister(int index, int value); 86ffec4cb1Sshadow303 87ffec4cb1Sshadow303 void SetRegister(int index, int mask, int value); 88ffec4cb1Sshadow303 89*863634b8SAxel Dörfler protected: 90ffec4cb1Sshadow303 CVIPPort fPort; 91ffec4cb1Sshadow303 int fDevice; 92ffec4cb1Sshadow303 radeon_video_clock fClock; 93ffec4cb1Sshadow303 int fTunerPort; 94ffec4cb1Sshadow303 int fCompositePort; 95ffec4cb1Sshadow303 int fSVideoPort; 96ffec4cb1Sshadow303 theater_standard fStandard; 97ffec4cb1Sshadow303 theater_source fSource; 98ffec4cb1Sshadow303 int fBrightness; 99ffec4cb1Sshadow303 int fContrast; 100ffec4cb1Sshadow303 int fSaturation; 101ffec4cb1Sshadow303 int fHue; 102ffec4cb1Sshadow303 int fHActive; 103ffec4cb1Sshadow303 int fVActive; 104ffec4cb1Sshadow303 bool fDeinterlace; 105ffec4cb1Sshadow303 }; 106ffec4cb1Sshadow303 107ffec4cb1Sshadow303 #endif 108