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