Add support for CTRL_(key) on input.conf
[mplayer/kovensky.git] / drivers / tdfx_vid.h
blob434e734e46ed890e804446ff319adfcdf6d04699
1 /*
2 * Copyright (C) 2003 Alban Bedel
4 * This file is part of MPlayer.
6 * MPlayer is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * MPlayer is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef MPLAYER_TDFX_VID_H
22 #define MPLAYER_TDFX_VID_H
24 #define TDFX_VID_VERSION 1
26 #define TDFX_VID_MOVE_2_PACKED 0
27 #define TDFX_VID_MOVE_2_YUV 1
28 #define TDFX_VID_MOVE_2_3D 2
29 #define TDFX_VID_MOVE_2_TEXTURE 3
31 #define TDFX_VID_SRC_COLORKEY 0x1
32 #define TDFX_VID_DST_COLORKEY 0x2
34 #define TDFX_VID_ROP_COPY 0xcc // src
35 #define TDFX_VID_ROP_INVERT 0x55 // NOT dst
36 #define TDFX_VID_ROP_XOR 0x66 // src XOR dst
37 #define TDFX_VID_ROP_OR 0xee // src OR dst
39 #define TDFX_VID_FORMAT_BGR1 (('B'<<24)|('G'<<16)|('R'<<8)|1)
40 #define TDFX_VID_FORMAT_BGR8 (('B'<<24)|('G'<<16)|('R'<<8)|8)
41 #define TDFX_VID_FORMAT_BGR15 (('B'<<24)|('G'<<16)|('R'<<8)|15)
42 #define TDFX_VID_FORMAT_BGR16 (('B'<<24)|('G'<<16)|('R'<<8)|16)
43 #define TDFX_VID_FORMAT_BGR24 (('B'<<24)|('G'<<16)|('R'<<8)|24)
44 #define TDFX_VID_FORMAT_BGR32 (('B'<<24)|('G'<<16)|('R'<<8)|32)
46 #define TDFX_VID_FORMAT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y')
47 #define TDFX_VID_FORMAT_UYVY (('Y'<<24)|('V'<<16)|('Y'<<8)|'U')
49 #define TDFX_VID_FORMAT_YV12 0x32315659
50 #define TDFX_VID_FORMAT_IYUV (('I'<<24)|('Y'<<16)|('U'<<8)|'V')
51 #define TDFX_VID_FORMAT_I420 (('I'<<24)|('4'<<16)|('2'<<8)|'0')
53 #define TDFX_VID_YUV_STRIDE (1024)
54 #define TDFX_VID_YUV_PLANE_SIZE (0x0100000)
57 typedef struct tdfx_vid_blit_s {
58 uint32_t src;
59 uint32_t src_stride;
60 uint16_t src_x,src_y;
61 uint16_t src_w,src_h;
62 uint32_t src_format;
64 uint32_t dst;
65 uint32_t dst_stride;
66 uint16_t dst_x,dst_y;
67 uint16_t dst_w,dst_h;
68 uint32_t dst_format;
70 uint32_t src_colorkey[2];
71 uint32_t dst_colorkey[2];
73 uint8_t colorkey;
74 uint8_t rop[4];
75 } tdfx_vid_blit_t;
77 typedef struct tdfx_vid_config_s {
78 uint16_t version;
79 uint16_t card_type;
80 uint32_t ram_size;
81 uint16_t screen_width;
82 uint16_t screen_height;
83 uint16_t screen_stride;
84 uint32_t screen_format;
85 uint32_t screen_start;
86 } tdfx_vid_config_t;
88 typedef struct tdfx_vid_agp_move_s {
89 uint16_t move2;
90 uint16_t width,height;
92 uint32_t src;
93 uint32_t src_stride;
95 uint32_t dst;
96 uint32_t dst_stride;
97 } tdfx_vid_agp_move_t;
99 typedef struct tdfx_vid_yuv_s {
100 uint32_t base;
101 uint16_t stride;
102 } tdfx_vid_yuv_t;
104 typedef struct tdfx_vid_overlay_s {
105 uint32_t src[2]; // left and right buffer (2 buffer may be NULL)
106 uint16_t src_width,src_height;
107 uint16_t src_stride;
108 uint32_t format;
110 uint16_t dst_width,dst_height;
111 int16_t dst_x,dst_y;
113 uint8_t use_colorkey;
114 uint32_t colorkey[2]; // min/max
115 uint8_t invert_colorkey;
116 } tdfx_vid_overlay_t;
118 #define TDFX_VID_GET_CONFIG _IOR('J', 1, tdfx_vid_config_t)
119 #define TDFX_VID_AGP_MOVE _IOW('J', 2, tdfx_vid_agp_move_t)
120 #define TDFX_VID_BLIT _IOW('J', 3, tdfx_vid_blit_t)
121 #define TDFX_VID_SET_YUV _IOW('J', 4, tdfx_vid_blit_t)
122 #define TDFX_VID_GET_YUV _IOR('J', 5, tdfx_vid_blit_t)
123 #define TDFX_VID_BUMP0 _IOW('J', 6, u16)
124 #define TDFX_VID_SET_OVERLAY _IOW('J', 7, tdfx_vid_overlay_t)
125 #define TDFX_VID_OVERLAY_ON _IO ('J', 8)
126 #define TDFX_VID_OVERLAY_OFF _IO ('J', 9)
128 #endif /* MPLAYER_TDFX_VID_H */