3
* Copyright (c) 1998-2003 by The XFree86 Project, Inc.
5
* Permission is hereby granted, free of charge, to any person obtaining a
6
* copy of this software and associated documentation files (the "Software"),
7
* to deal in the Software without restriction, including without limitation
8
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
* and/or sell copies of the Software, and to permit persons to whom the
10
* Software is furnished to do so, subject to the following conditions:
12
* The above copyright notice and this permission notice shall be included in
13
* all copies or substantial portions of the Software.
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21
* OTHER DEALINGS IN THE SOFTWARE.
23
* Except as contained in this notice, the name of the copyright holder(s)
24
* and author(s) shall not be used in advertising or otherwise to promote
25
* the sale, use or other dealings in this Software without prior written
26
* authorization from the copyright holder(s) and author(s).
35
#define VIDEO_NO_CLIPPING 0x00000001
36
#define VIDEO_INVERT_CLIPLIST 0x00000002
37
#define VIDEO_OVERLAID_IMAGES 0x00000004
38
#define VIDEO_OVERLAID_STILLS 0x00000008
39
#define VIDEO_CLIP_TO_VIEWPORT 0x00000010
45
unsigned char guid[16];
50
/* for RGB formats only */
52
unsigned int red_mask;
53
unsigned int green_mask;
54
unsigned int blue_mask;
56
/* for YUV formats only */
57
unsigned int y_sample_bits;
58
unsigned int u_sample_bits;
59
unsigned int v_sample_bits;
60
unsigned int horz_y_period;
61
unsigned int horz_u_period;
62
unsigned int horz_v_period;
63
unsigned int vert_y_period;
64
unsigned int vert_u_period;
65
unsigned int vert_v_period;
66
char component_order[32];
68
} XF86ImageRec, *XF86ImagePtr;
74
unsigned short width, height;
75
int *pitches; /* bytes */
76
int *offsets; /* in bytes from start of framebuffer */
78
} XF86SurfaceRec, *XF86SurfacePtr;
81
typedef int (* PutVideoFuncPtr)( ScrnInfoPtr pScrn,
82
short vid_x, short vid_y, short drw_x, short drw_y,
83
short vid_w, short vid_h, short drw_w, short drw_h,
84
RegionPtr clipBoxes, pointer data, DrawablePtr pDraw );
85
typedef int (* PutStillFuncPtr)( ScrnInfoPtr pScrn,
86
short vid_x, short vid_y, short drw_x, short drw_y,
87
short vid_w, short vid_h, short drw_w, short drw_h,
88
RegionPtr clipBoxes, pointer data, DrawablePtr pDraw );
89
typedef int (* GetVideoFuncPtr)( ScrnInfoPtr pScrn,
90
short vid_x, short vid_y, short drw_x, short drw_y,
91
short vid_w, short vid_h, short drw_w, short drw_h,
92
RegionPtr clipBoxes, pointer data, DrawablePtr pDraw );
93
typedef int (* GetStillFuncPtr)( ScrnInfoPtr pScrn,
94
short vid_x, short vid_y, short drw_x, short drw_y,
95
short vid_w, short vid_h, short drw_w, short drw_h,
96
RegionPtr clipBoxes, pointer data, DrawablePtr pDraw );
97
typedef void (* StopVideoFuncPtr)(ScrnInfoPtr pScrn, pointer data, Bool Exit);
98
typedef int (* SetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute,
99
INT32 value, pointer data);
100
typedef int (* GetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute,
101
INT32 *value, pointer data);
102
typedef void (* QueryBestSizeFuncPtr)(ScrnInfoPtr pScrn, Bool motion,
103
short vid_w, short vid_h, short drw_w, short drw_h,
104
unsigned int *p_w, unsigned int *p_h, pointer data);
105
typedef int (* PutImageFuncPtr)( ScrnInfoPtr pScrn,
106
short src_x, short src_y, short drw_x, short drw_y,
107
short src_w, short src_h, short drw_w, short drw_h,
108
int image, unsigned char* buf, short width, short height, Bool Sync,
109
RegionPtr clipBoxes, pointer data, DrawablePtr pDraw );
110
typedef int (* ReputImageFuncPtr)( ScrnInfoPtr pScrn, short drw_x, short drw_y,
111
RegionPtr clipBoxes, pointer data, DrawablePtr pDraw );
112
typedef int (*QueryImageAttributesFuncPtr)(ScrnInfoPtr pScrn,
113
int image, unsigned short *width, unsigned short *height,
114
int *pitches, int *offsets);
122
/*** this is what the driver needs to fill out ***/
127
unsigned short width, height;
129
} XF86VideoEncodingRec, *XF86VideoEncodingPtr;
134
} XF86VideoFormatRec, *XF86VideoFormatPtr;
141
} XF86AttributeRec, *XF86AttributePtr;
148
XF86VideoEncodingPtr pEncodings;
150
XF86VideoFormatPtr pFormats;
152
DevUnion *pPortPrivates;
154
XF86AttributePtr pAttributes;
156
XF86ImagePtr pImages;
157
PutVideoFuncPtr PutVideo;
158
PutStillFuncPtr PutStill;
159
GetVideoFuncPtr GetVideo;
160
GetStillFuncPtr GetStill;
161
StopVideoFuncPtr StopVideo;
162
SetPortAttributeFuncPtr SetPortAttribute;
163
GetPortAttributeFuncPtr GetPortAttribute;
164
QueryBestSizeFuncPtr QueryBestSize;
165
PutImageFuncPtr PutImage;
166
ReputImageFuncPtr ReputImage;
167
QueryImageAttributesFuncPtr QueryImageAttributes;
168
} XF86VideoAdaptorRec, *XF86VideoAdaptorPtr;
173
int (*alloc_surface)(ScrnInfoPtr pScrn,
175
unsigned short width,
176
unsigned short height,
177
XF86SurfacePtr surface);
178
int (*free_surface)(XF86SurfacePtr surface);
179
int (*display) (XF86SurfacePtr surface,
180
short vid_x, short vid_y,
181
short drw_x, short drw_y,
182
short vid_w, short vid_h,
183
short drw_w, short drw_h,
184
RegionPtr clipBoxes);
185
int (*stop) (XF86SurfacePtr surface);
186
int (*getAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 *value);
187
int (*setAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 value);
191
XF86AttributePtr attributes;
192
} XF86OffscreenImageRec, *XF86OffscreenImagePtr;
197
XF86VideoAdaptorPtr *Adaptors,
201
typedef int (* xf86XVInitGenericAdaptorPtr)(ScrnInfoPtr pScrn,
202
XF86VideoAdaptorPtr **Adaptors);
205
xf86XVRegisterGenericAdaptorDriver(
206
xf86XVInitGenericAdaptorPtr InitFunc
210
xf86XVListGenericAdaptors(
212
XF86VideoAdaptorPtr **Adaptors
216
xf86XVRegisterOffscreenImages(
218
XF86OffscreenImagePtr images,
222
XF86OffscreenImagePtr
223
xf86XVQueryOffscreenImages(
228
XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn);
230
void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr);
233
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
236
xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes);
239
xf86XVClipVideoHelper(
251
xf86XVCopyYUV12ToPacked(
273
#endif /* _XF86XV_H_ */