1/********************************************************************** 2Copyright 2002 by Shigehiro Nomura. 3 4 All Rights Reserved 5 6Permission to use, copy, modify, distribute, and sell this software and 7its documentation for any purpose is hereby granted without fee, 8provided that the above copyright notice appear in all copies and that 9both that copyright notice and this permission notice appear in 10supporting documentation, and that the name of Shigehiro Nomura not be 11used in advertising or publicity pertaining to distribution of the 12software without specific, written prior permission. Shigehiro Nomura 13and its suppliers make no representations about the suitability of this 14software for any purpose. It is provided "as is" without express or 15implied warranty. 16 17SHIGEHIRO NOMURA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 18INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 19EVENT SHALL SHIGEHIRO NOMURA AND/OR ITS SUPPLIERS BE LIABLE FOR ANY 20SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 21RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 22CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 23CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 24**********************************************************************/ 25 26#ifndef _NEO_VIDEO_H 27#define _NEO_VIDEO_H 28 29#define ACC_MMIO 30 31#include "vgaHW.h" 32#include "fourcc.h" 33#include <X11/extensions/Xv.h> 34 35#define NEO_VIDEO_VIDEO 0 36#define NEO_VIDEO_IMAGE 1 37 38#define FOURCC_RV15 0x35315652 39#define FOURCC_RV16 0x36315652 40 41#define OFF_DELAY 200 /* milliseconds */ 42#define FREE_DELAY 60000 /* milliseconds */ 43 44#define OFF_TIMER 0x01 45#define FREE_TIMER 0x02 46#define CLIENT_VIDEO_ON 0x04 47#define TIMER_MASK (OFF_TIMER | FREE_TIMER) 48 49typedef struct 50{ 51 FBLinearPtr linear; 52 RegionRec clip; 53 CARD32 colorKey; 54 CARD32 interlace; 55 CARD32 brightness; 56 CARD32 videoStatus; 57 Time offTime; 58 Time freeTime; 59} NEOPortRec, *NEOPortPtr; 60 61typedef struct 62{ 63 FBLinearPtr linear; 64 Bool isOn; 65} NEOOffscreenRec, *NEOOffscreenPtr; 66 67/* I/O Functions */ 68# define OUTGR(idx,dat) \ 69 if (nPtr->NeoMMIOBase2) \ 70 (*(unsigned short *)(nPtr->NeoMMIOBase2+VGA_GRAPH_INDEX)\ 71 =(idx)|((dat)<<8));\ 72 else \ 73 VGAwGR((idx),(dat)); 74 75# define OUTSR(idx,dat) \ 76if (nPtr->NeoMMIOBase2) \ 77 (*(unsigned short *)(nPtr->NeoMMIOBase2+VGA_SEQ_INDEX)=(idx)|((dat)<<8));\ 78else \ 79 VGAwSR((idx),(dat)); 80 81# define VGA_HWP(x) vgaHWPtr hwp = VGAHWPTR(x) 82 83#endif /* _NEO_VIDEO_H */ 84