annotate vidix/vidix.h @ 5889:111d2406a87a

do cpudetect before anything else
author arpi
date Sun, 28 Apr 2002 17:48:45 +0000
parents 939eacee89ab
children c5a45e3d6d16
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
1 /*
dcc632dd2097 preliminary version
nick
parents:
diff changeset
2 * vidix.h
dcc632dd2097 preliminary version
nick
parents:
diff changeset
3 * VIDIX - VIDeo Interface for *niX
dcc632dd2097 preliminary version
nick
parents:
diff changeset
4 * This interface is introduced as universal one to MPEG decoder,
dcc632dd2097 preliminary version
nick
parents:
diff changeset
5 * BES == Back End Scaler and YUV2RGB hw accelerators.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
6 * In the future it may be expanded up to capturing and audio things.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
7 * Main goal of this this interface imlpementation is providing DGA
dcc632dd2097 preliminary version
nick
parents:
diff changeset
8 * everywhere where it's possible (unlike X11 and other).
dcc632dd2097 preliminary version
nick
parents:
diff changeset
9 * Copyright 2002 Nick Kurshev
dcc632dd2097 preliminary version
nick
parents:
diff changeset
10 * Licence: GPL
dcc632dd2097 preliminary version
nick
parents:
diff changeset
11 * This interface is based on v4l2, fbvid.h, mga_vid.h projects
dcc632dd2097 preliminary version
nick
parents:
diff changeset
12 * and personally my ideas.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
13 * NOTE: This interface is introduces as driver interface.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
14 * Don't use it for APP.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
15 */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
16 #ifndef VIDIX_H
dcc632dd2097 preliminary version
nick
parents:
diff changeset
17 #define VIDIX_H
dcc632dd2097 preliminary version
nick
parents:
diff changeset
18
dcc632dd2097 preliminary version
nick
parents:
diff changeset
19 #ifdef __cplusplus
dcc632dd2097 preliminary version
nick
parents:
diff changeset
20 extern "C" {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
21 #endif
dcc632dd2097 preliminary version
nick
parents:
diff changeset
22
dcc632dd2097 preliminary version
nick
parents:
diff changeset
23 #define VIDIX_VERSION 100
dcc632dd2097 preliminary version
nick
parents:
diff changeset
24
dcc632dd2097 preliminary version
nick
parents:
diff changeset
25 /* returns driver version */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
26 extern unsigned vixGetVersion( void );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
27
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
28 #define PROBE_NORMAL 0 /* normal probing */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
29 #define PROBE_FORCE 1 /* ignore device_id but recognize device if it's known */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
30 /* Probes video hw.
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
31 verbose - specifies verbose level.
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
32 force - specifies force mode - driver should ignore
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
33 device_id (danger but useful for new devices)
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
34 Returns 0 if ok else errno */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
35 extern int vixProbe( int verbose, int force );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
36 /* Initializes driver. Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
37 extern int vixInit( void );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
38 /* Destroys driver */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
39 extern void vixDestroy( void );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
40
dcc632dd2097 preliminary version
nick
parents:
diff changeset
41 typedef struct vidix_capability_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
42 {
4323
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
43 char name[64]; /* Driver name */
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
44 char author[64]; /* Author name */
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
45 #define TYPE_OUTPUT 0x00000000 /* Is a video playback device */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
46 #define TYPE_CAPTURE 0x00000001 /* Is a capture device */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
47 #define TYPE_CODEC 0x00000002 /* Device supports hw (de)coding */
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
48 #define TYPE_FX 0x00000004 /* Is a video effects device */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
49 int type; /* Device type, see below */
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
50 unsigned reserved0[4];
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
51 int maxwidth;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
52 int maxheight;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
53 int minwidth;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
54 int minheight;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
55 int maxframerate; /* -1 if unlimited */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
56 #define FLAG_NONE 0x00000000 /* No flags defined */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
57 #define FLAG_DMA 0x00000001 /* Card can use DMA */
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
58 #define FLAG_EQ_DMA 0x00000002 /* Card can use DMA only if src pitch == dest pitch */
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
59 #define FLAG_UPSCALER 0x00000010 /* Card supports hw upscaling */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
60 #define FLAG_DOWNSCALER 0x00000020 /* Card supports hw downscaling */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
61 #define FLAG_SUBPIC 0x00001000 /* Card supports DVD subpictures */
4263
03879e356f6d added flag_equalizer
alex
parents: 4191
diff changeset
62 #define FLAG_EQUALIZER 0x00002000 /* Card supports equalizer */
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
63 unsigned flags; /* Feature flags, see above */
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
64 unsigned short vendor_id;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
65 unsigned short device_id;
4323
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
66 unsigned reserved1[4];
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
67 }vidix_capability_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
68
dcc632dd2097 preliminary version
nick
parents:
diff changeset
69 /* Should fill at least type before init.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
70 Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
71 extern int vixGetCapability(vidix_capability_t *);
dcc632dd2097 preliminary version
nick
parents:
diff changeset
72
dcc632dd2097 preliminary version
nick
parents:
diff changeset
73 typedef struct vidix_fourcc_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
74 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
75 unsigned fourcc;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
76 #define VID_DEPTH_NONE 0x0000
dcc632dd2097 preliminary version
nick
parents:
diff changeset
77 #define VID_DEPTH_1BPP 0x0001
dcc632dd2097 preliminary version
nick
parents:
diff changeset
78 #define VID_DEPTH_2BPP 0x0002
dcc632dd2097 preliminary version
nick
parents:
diff changeset
79 #define VID_DEPTH_4BPP 0x0004
dcc632dd2097 preliminary version
nick
parents:
diff changeset
80 #define VID_DEPTH_8BPP 0x0008
dcc632dd2097 preliminary version
nick
parents:
diff changeset
81 #define VID_DEPTH_12BPP 0x0010
dcc632dd2097 preliminary version
nick
parents:
diff changeset
82 #define VID_DEPTH_15BPP 0x0020
dcc632dd2097 preliminary version
nick
parents:
diff changeset
83 #define VID_DEPTH_16BPP 0x0040
dcc632dd2097 preliminary version
nick
parents:
diff changeset
84 #define VID_DEPTH_24BPP 0x0080
dcc632dd2097 preliminary version
nick
parents:
diff changeset
85 #define VID_DEPTH_32BPP 0x0100
dcc632dd2097 preliminary version
nick
parents:
diff changeset
86 unsigned depth;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
87 #define VID_CAP_NONE 0x0000
dcc632dd2097 preliminary version
nick
parents:
diff changeset
88 #define VID_CAP_EXPAND 0x0001 /* if overlay can be bigger than source */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
89 #define VID_CAP_SHRINK 0x0002 /* if overlay can be smaller than source */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
90 #define VID_CAP_BLEND 0x0004 /* if overlay can be blended with framebuffer */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
91 #define VID_CAP_COLORKEY 0x0008 /* if overlay can be restricted to a colorkey */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
92 #define VID_CAP_ALPHAKEY 0x0010 /* if overlay can be restricted to an alpha channel */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
93 #define VID_CAP_COLORKEY_ISRANGE 0x0020 /* if the colorkey can be a range */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
94 #define VID_CAP_ALPHAKEY_ISRANGE 0x0040 /* if the alphakey can be a range */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
95 #define VID_CAP_COLORKEY_ISMAIN 0x0080 /* colorkey is checked against framebuffer */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
96 #define VID_CAP_COLORKEY_ISOVERLAY 0x0100 /* colorkey is checked against overlay */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
97 #define VID_CAP_ALPHAKEY_ISMAIN 0x0200 /* alphakey is checked against framebuffer */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
98 #define VID_CAP_ALPHAKEY_ISOVERLAY 0x0400 /* alphakey is checked against overlay */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
99 unsigned flags;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
100 }vidix_fourcc_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
101
dcc632dd2097 preliminary version
nick
parents:
diff changeset
102 /* Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
103 extern int vixQueryFourcc(vidix_fourcc_t *);
dcc632dd2097 preliminary version
nick
parents:
diff changeset
104
dcc632dd2097 preliminary version
nick
parents:
diff changeset
105 typedef struct vidix_yuv_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
106 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
107 unsigned y,u,v;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
108 }vidix_yuv_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
109
dcc632dd2097 preliminary version
nick
parents:
diff changeset
110 typedef struct vidix_rect_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
111 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
112 unsigned x,y,w,h; /* in pixels */
4008
a37207881d10 minor interface changing and verbosing
nick
parents: 3995
diff changeset
113 vidix_yuv_t pitch; /* line-align in bytes */
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
114 }vidix_rect_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
115
dcc632dd2097 preliminary version
nick
parents:
diff changeset
116 typedef struct vidix_color_key_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
117 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
118 #define CKEY_FALSE 0
dcc632dd2097 preliminary version
nick
parents:
diff changeset
119 #define CKEY_TRUE 1
dcc632dd2097 preliminary version
nick
parents:
diff changeset
120 #define CKEY_EQ 2
dcc632dd2097 preliminary version
nick
parents:
diff changeset
121 #define CKEY_NEQ 3
dcc632dd2097 preliminary version
nick
parents:
diff changeset
122 unsigned op; /* defines logical operation */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
123 unsigned char red;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
124 unsigned char green;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
125 unsigned char blue;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
126 unsigned char reserved;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
127 }vidix_ckey_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
128
dcc632dd2097 preliminary version
nick
parents:
diff changeset
129 typedef struct vidix_video_key_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
130 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
131 #define VKEY_FALSE 0
dcc632dd2097 preliminary version
nick
parents:
diff changeset
132 #define VKEY_TRUE 1
dcc632dd2097 preliminary version
nick
parents:
diff changeset
133 #define VKEY_EQ 2
dcc632dd2097 preliminary version
nick
parents:
diff changeset
134 #define VKEY_NEQ 3
dcc632dd2097 preliminary version
nick
parents:
diff changeset
135 unsigned op; /* defines logical operation */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
136 unsigned char key[8];
dcc632dd2097 preliminary version
nick
parents:
diff changeset
137 }vidix_vkey_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
138
dcc632dd2097 preliminary version
nick
parents:
diff changeset
139 typedef struct vidix_playback_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
140 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
141 unsigned fourcc; /* app -> driver: movies's fourcc */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
142 unsigned capability; /* app -> driver: what capability to use */
4323
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
143 unsigned blend_factor; /* app -> driver: blending factor */
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
144 vidix_rect_t src; /* app -> driver: original movie size */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
145 vidix_rect_t dest; /* app -> driver: destinition movie size. driver->app dest_pitch */
4323
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
146 #define VID_PLAY_INTERLEAVED_UV 0x00000001 /* driver -> app: interleaved UV planes */
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
147 #define INTERLEAVING_UV 0x00001000 /* UVUVUVUVUV used by Matrox G200 */
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
148 #define INTERLEAVING_VU 0x00001001 /* VUVUVUVUVU */
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
149 int flags;
3995
0d9de811e312 minor interface changing
nick
parents: 3991
diff changeset
150 /* memory model */
4323
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
151 unsigned frame_size; /* driver -> app: destinition frame size */
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
152 unsigned num_frames; /* app -> driver: after call: driver -> app */
4929
939eacee89ab Use as much buffers as possible
nick
parents: 4323
diff changeset
153 #define VID_PLAY_MAXFRAMES 64 /* reasonable limitation for decoding ahead */
4323
fa8ba116a716 some typos fixed ;), added author to capabilites and extended name to 64 bytes. added interleaved uv planes support
alex
parents: 4318
diff changeset
154 unsigned offsets[VID_PLAY_MAXFRAMES]; /* driver -> app */
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
155 vidix_yuv_t offset; /* driver -> app: relative offsets within frame for yuv planes */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
156 void* dga_addr; /* driver -> app: linear address */
3995
0d9de811e312 minor interface changing
nick
parents: 3991
diff changeset
157 }vidix_playback_t;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
158
dcc632dd2097 preliminary version
nick
parents:
diff changeset
159 /* Returns 0 if ok else errno */
3995
0d9de811e312 minor interface changing
nick
parents: 3991
diff changeset
160 extern int vixConfigPlayback(vidix_playback_t *);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
161
dcc632dd2097 preliminary version
nick
parents:
diff changeset
162 /* Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
163 extern int vixPlaybackOn( void );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
164
dcc632dd2097 preliminary version
nick
parents:
diff changeset
165 /* Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
166 extern int vixPlaybackOff( void );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
167
dcc632dd2097 preliminary version
nick
parents:
diff changeset
168 /* Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
169 extern int vixPlaybackFrameSelect( unsigned frame_idx );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
170
4070
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
171 typedef struct vidix_grkey_s
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
172 {
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
173 vidix_ckey_t ckey; /* app -> driver: color key */
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
174 vidix_vkey_t vkey; /* app -> driver: video key */
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
175 #define KEYS_PUT 0
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
176 #define KEYS_AND 1
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
177 #define KEYS_OR 2
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
178 #define KEYS_XOR 3
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
179 unsigned key_op; /* app -> driver: keys operations */
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
180 }vidix_grkey_t;
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
181
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
182 /* Returns 0 if ok else errno */
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
183 extern int vixGetGrKeys( vidix_grkey_t * );
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
184
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
185 /* Returns 0 if ok else errno */
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
186 extern int vixSetGrKeys( const vidix_grkey_t * );
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
187
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 4008
diff changeset
188
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
189 typedef struct vidix_video_eq_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
190 {
4318
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
191 #define VEQ_CAP_NONE 0x00000000UL
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
192 #define VEQ_CAP_BRIGHTNESS 0x00000001UL
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
193 #define VEQ_CAP_CONTRAST 0x00000002UL
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
194 #define VEQ_CAP_SATURATION 0x00000004UL
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
195 #define VEQ_CAP_HUE 0x00000008UL
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
196 #define VEQ_CAP_RGB_INTENSITY 0x00000010UL
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
197 int cap; /* on get_eq should contain capability of equalizer
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
198 on set_eq should contain using fields */
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
199 /* end-user app can have presets like: cold-normal-hot picture and so on */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
200 int brightness; /* -1000 : +1000 */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
201 int contrast; /* -1000 : +1000 */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
202 int saturation; /* -1000 : +1000 */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
203 int hue; /* -1000 : +1000 */
4318
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
204 int red_intensity; /* -1000 : +1000 */
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
205 int green_intensity;/* -1000 : +1000 */
693e4cfd2b84 intense -> intensity + capability extension
nick
parents: 4263
diff changeset
206 int blue_intensity; /* -1000 : +1000 */
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
207 #define VEQ_FLG_ITU_R_BT_601 0x00000000 /* ITU-R BT.601 colour space (default) */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
208 #define VEQ_FLG_ITU_R_BT_709 0x00000001 /* ITU-R BT.709 colour space */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
209 #define VEQ_FLG_ITU_MASK 0x0000000f
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
210 int flags; /* currently specifies ITU YCrCb color space to use */
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
211 }vidix_video_eq_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
212
dcc632dd2097 preliminary version
nick
parents:
diff changeset
213 /* Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
214 extern int vixPlaybackGetEq( vidix_video_eq_t * );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
215
dcc632dd2097 preliminary version
nick
parents:
diff changeset
216 /* Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
217 extern int vixPlaybackSetEq( const vidix_video_eq_t * );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
218
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
219 typedef struct vidix_deinterlace_s
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
220 {
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
221 #define CFG_NON_INTERLACED 0x00000000 /* stream is not interlaced */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
222 #define CFG_INTERLACED 0x00000001 /* stream is interlaced */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
223 #define CFG_EVEN_ODD_INTERLACING 0x00000002 /* first frame contains even fields but second - odd */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
224 #define CFG_ODD_EVEN_INTERLACING 0x00000004 /* first frame contains odd fields but second - even */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
225 #define CFG_UNIQUE_INTERLACING 0x00000008 /* field deinterlace_pattern is valid */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
226 #define CFG_UNKNOWN_INTERLACING 0x0000000f /* unknown deinterlacing - use adaptive if it's possible */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
227 unsigned flags;
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
228 unsigned deinterlace_pattern; /* app -> driver: deinterlace pattern if flag CFG_UNIQUE_INTERLACING is set */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
229 }vidix_deinterlace_t;
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
230
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
231 /* Returns 0 if ok else errno */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
232 extern int vixPlaybackGetDeint( vidix_deinterlace_t * );
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
233
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
234 /* Returns 0 if ok else errno */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
235 extern int vixPlaybackSetDeint( const vidix_deinterlace_t * );
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
236
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
237 typedef struct vidix_slice_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
238 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
239 void* address; /* app -> driver */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
240 unsigned size; /* app -> driver */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
241 vidix_rect_t slice; /* app -> driver */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
242 }vidix_slice_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
243
dcc632dd2097 preliminary version
nick
parents:
diff changeset
244 typedef struct vidix_dma_s
dcc632dd2097 preliminary version
nick
parents:
diff changeset
245 {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
246 vidix_slice_t src; /* app -> driver */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
247 vidix_slice_t dest; /* app -> driver */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
248 #define LVO_DMA_NOSYNC 0
dcc632dd2097 preliminary version
nick
parents:
diff changeset
249 #define LVO_DMA_SYNC 1 /* means: wait vsync or hsync */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
250 unsigned flags; /* app -> driver */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
251 }vidix_dma_t;
dcc632dd2097 preliminary version
nick
parents:
diff changeset
252
dcc632dd2097 preliminary version
nick
parents:
diff changeset
253 /* Returns 0 if ok else errno */
dcc632dd2097 preliminary version
nick
parents:
diff changeset
254 extern int vixPlaybackCopyFrame( const vidix_dma_t * );
dcc632dd2097 preliminary version
nick
parents:
diff changeset
255
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
256 /*
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
257 This structure is introdused to support OEM effects like:
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
258 - sharpness
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
259 - exposure
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
260 - (auto)gain
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
261 - H(V)flip
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
262 - black level
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
263 - white balance
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
264 and many other
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
265 */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
266 typedef struct vidix_oem_fx_s
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
267 {
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
268 #define FX_TYPE_BOOLEAN 0x00000000
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
269 #define FX_TYPE_INTEGER 0x00000001
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
270 int type; /* type of effects */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
271 int num; /* app -> driver: effect number. From 0 to max number of effects */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
272 int minvalue; /* min value of effect. 0 - for boolean */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
273 int maxvalue; /* max value of effect. 1 - for boolean */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
274 int value; /* current value of effect on 'get'; required on set */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
275 char * name[80]; /* effect name to display */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
276 }vidix_oem_fx_t;
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
277
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
278 /* Returns 0 if ok else errno */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
279 extern int vixQueryNumOemEffects( unsigned * number );
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
280
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
281 /* Returns 0 if ok else errno */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
282 extern int vixGetOemEffect( vidix_oem_fx_t * );
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
283
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
284 /* Returns 0 if ok else errno */
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
285 extern int vixSetOemEffect( const vidix_oem_fx_t * );
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
286
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
287 #ifdef __cplusplus
dcc632dd2097 preliminary version
nick
parents:
diff changeset
288 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
289 #endif
dcc632dd2097 preliminary version
nick
parents:
diff changeset
290
dcc632dd2097 preliminary version
nick
parents:
diff changeset
291 #endif