1/* Header: //Mercury/Projects/archives/XFree86/4.0/smi_video.h.-arc 1.8 27 Nov 2000 15:46:06 Frido $ */ 2 3/* 4Copyright (C) 1994-1999 The XFree86 Project, Inc. All Rights Reserved. 5Copyright (C) 2000 Silicon Motion, Inc. All Rights Reserved. 6 7Permission is hereby granted, free of charge, to any person obtaining a copy of 8this software and associated documentation files (the "Software"), to deal in 9the Software without restriction, including without limitation the rights to 10use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 11of the Software, and to permit persons to whom the Software is furnished to do 12so, subject to the following conditions: 13 14The above copyright notice and this permission notice shall be included in all 15copies or substantial portions of the Software. 16 17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- 19NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 24Except as contained in this notice, the names of the XFree86 Project and 25Silicon Motion shall not be used in advertising or otherwise to promote the 26sale, use or other dealings in this Software without prior written 27authorization from the XFree86 Project and silicon Motion. 28*/ 29 30#ifndef _SMI_VIDEO_H 31#define _SMI_VIDEO_H 32 33#include "fourcc.h" 34 35#define SMI_VIDEO_VIDEO 0 36#define SMI_VIDEO_IMAGE 1 37 38#define FOURCC_RV15 0x35315652 39#define FOURCC_RV16 0x36315652 40#define FOURCC_RV24 0x34325652 41#define FOURCC_RV32 0x32335652 42 43#define OFF_DELAY 200 /* milliseconds */ 44#define FREE_DELAY 60000 /* milliseconds */ 45 46#define OFF_TIMER 0x01 47#define FREE_TIMER 0x02 48#define CLIENT_VIDEO_ON 0x04 49#define TIMER_MASK (OFF_TIMER | FREE_TIMER) 50 51#define SAA7110 0x9C 52#define SAA7111 0x48 53 54/* 55 * Attributes 56 */ 57 58#define N_ATTRS 8 59 60#define XV_ENCODING 0 61#define XV_BRIGHTNESS 1 62#define XV_CAPTURE_BRIGHTNESS 2 63#define XV_CONTRAST 3 64#define XV_SATURATION 4 65#define XV_HUE 5 66#define XV_COLORKEY 6 67#define XV_INTERLACED 7 68 69typedef struct 70{ 71 RegionRec clip; 72 /* Attributes */ 73 CARD32 Attribute[N_ATTRS]; 74 CARD32 videoStatus; 75 Time offTime; 76 Time freeTime; 77 I2CDevRec I2CDev; 78 79 /* Memory */ 80 int size; 81 void *video_memory; 82 int video_offset; 83 84 /* Encodings */ 85 XF86VideoEncodingPtr enc; 86 int *input; 87 int *norm; 88 int *channel; 89 int nenc,cenc; 90 91} SMI_PortRec, *SMI_PortPtr; 92 93typedef struct 94{ 95 void *surface_memory; 96 Bool isOn; 97 98} SMI_OffscreenRec, *SMI_OffscreenPtr; 99 100typedef struct 101{ 102 CARD8 address; 103 CARD8 data; 104 105} SMI_I2CDataRec, *SMI_I2CDataPtr; 106 107#endif /* _SMI_VIDEO_H */ 108