diff options
Diffstat (limited to 'hw/xfree86/common/xf86xv.h')
-rw-r--r-- | hw/xfree86/common/xf86xv.h | 365 |
1 files changed, 173 insertions, 192 deletions
diff --git a/hw/xfree86/common/xf86xv.h b/hw/xfree86/common/xf86xv.h index f0d8495c6..2db00a83f 100644 --- a/hw/xfree86/common/xf86xv.h +++ b/hw/xfree86/common/xf86xv.h @@ -43,83 +43,89 @@ #define VIDEO_CLIP_TO_VIEWPORT 0x00000010 typedef struct { - int id; - int type; - int byte_order; - unsigned char guid[16]; - int bits_per_pixel; - int format; - int num_planes; - - /* for RGB formats only */ - int depth; - unsigned int red_mask; - unsigned int green_mask; - unsigned int blue_mask; - - /* for YUV formats only */ - unsigned int y_sample_bits; - unsigned int u_sample_bits; - unsigned int v_sample_bits; - unsigned int horz_y_period; - unsigned int horz_u_period; - unsigned int horz_v_period; - unsigned int vert_y_period; - unsigned int vert_u_period; - unsigned int vert_v_period; - char component_order[32]; - int scanline_order; -} XF86ImageRec, *XF86ImagePtr; - + int id; + int type; + int byte_order; + unsigned char guid[16]; + int bits_per_pixel; + int format; + int num_planes; + + /* for RGB formats only */ + int depth; + unsigned int red_mask; + unsigned int green_mask; + unsigned int blue_mask; + + /* for YUV formats only */ + unsigned int y_sample_bits; + unsigned int u_sample_bits; + unsigned int v_sample_bits; + unsigned int horz_y_period; + unsigned int horz_u_period; + unsigned int horz_v_period; + unsigned int vert_y_period; + unsigned int vert_u_period; + unsigned int vert_v_period; + char component_order[32]; + int scanline_order; +} XF86ImageRec, *XF86ImagePtr; typedef struct { - ScrnInfoPtr pScrn; - int id; - unsigned short width, height; - int *pitches; /* bytes */ - int *offsets; /* in bytes from start of framebuffer */ - DevUnion devPrivate; + ScrnInfoPtr pScrn; + int id; + unsigned short width, height; + int *pitches; /* bytes */ + int *offsets; /* in bytes from start of framebuffer */ + DevUnion devPrivate; } XF86SurfaceRec, *XF86SurfacePtr; - -typedef int (* PutVideoFuncPtr)( ScrnInfoPtr pScrn, - short vid_x, short vid_y, short drw_x, short drw_y, - short vid_w, short vid_h, short drw_w, short drw_h, - RegionPtr clipBoxes, pointer data, DrawablePtr pDraw ); -typedef int (* PutStillFuncPtr)( ScrnInfoPtr pScrn, - short vid_x, short vid_y, short drw_x, short drw_y, - short vid_w, short vid_h, short drw_w, short drw_h, - RegionPtr clipBoxes, pointer data, DrawablePtr pDraw ); -typedef int (* GetVideoFuncPtr)( ScrnInfoPtr pScrn, - short vid_x, short vid_y, short drw_x, short drw_y, - short vid_w, short vid_h, short drw_w, short drw_h, - RegionPtr clipBoxes, pointer data, DrawablePtr pDraw ); -typedef int (* GetStillFuncPtr)( ScrnInfoPtr pScrn, - short vid_x, short vid_y, short drw_x, short drw_y, - short vid_w, short vid_h, short drw_w, short drw_h, - RegionPtr clipBoxes, pointer data, DrawablePtr pDraw ); -typedef void (* StopVideoFuncPtr)(ScrnInfoPtr pScrn, pointer data, Bool Exit); -typedef int (* SetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, pointer data); -typedef int (* GetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, pointer data); -typedef void (* QueryBestSizeFuncPtr)(ScrnInfoPtr pScrn, Bool motion, - short vid_w, short vid_h, short drw_w, short drw_h, - unsigned int *p_w, unsigned int *p_h, pointer data); -typedef int (* PutImageFuncPtr)( ScrnInfoPtr pScrn, - short src_x, short src_y, short drw_x, short drw_y, - short src_w, short src_h, short drw_w, short drw_h, - int image, unsigned char* buf, short width, short height, Bool Sync, - RegionPtr clipBoxes, pointer data, DrawablePtr pDraw ); -typedef int (* ReputImageFuncPtr)( ScrnInfoPtr pScrn, - short src_x, short src_y, short drw_x, short drw_y, - short src_w, short src_h, short drw_w, short drw_h, - RegionPtr clipBoxes, pointer data, DrawablePtr pDraw ); -typedef int (*QueryImageAttributesFuncPtr)(ScrnInfoPtr pScrn, - int image, unsigned short *width, unsigned short *height, - int *pitches, int *offsets); -typedef void (*ClipNotifyFuncPtr)(ScrnInfoPtr pScrn, pointer data, - WindowPtr window, int dx, int dy); +typedef int (*PutVideoFuncPtr) (ScrnInfoPtr pScrn, + short vid_x, short vid_y, short drw_x, + short drw_y, short vid_w, short vid_h, + short drw_w, short drw_h, RegionPtr clipBoxes, + pointer data, DrawablePtr pDraw); +typedef int (*PutStillFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y, + short drw_x, short drw_y, short vid_w, + short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data, + DrawablePtr pDraw); +typedef int (*GetVideoFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y, + short drw_x, short drw_y, short vid_w, + short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data, + DrawablePtr pDraw); +typedef int (*GetStillFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y, + short drw_x, short drw_y, short vid_w, + short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data, + DrawablePtr pDraw); +typedef void (*StopVideoFuncPtr) (ScrnInfoPtr pScrn, pointer data, Bool Exit); +typedef int (*SetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute, + INT32 value, pointer data); +typedef int (*GetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute, + INT32 *value, pointer data); +typedef void (*QueryBestSizeFuncPtr) (ScrnInfoPtr pScrn, Bool motion, + short vid_w, short vid_h, short drw_w, + short drw_h, unsigned int *p_w, + unsigned int *p_h, pointer data); +typedef int (*PutImageFuncPtr) (ScrnInfoPtr pScrn, short src_x, short src_y, + short drw_x, short drw_y, short src_w, + short src_h, short drw_w, short drw_h, + int image, unsigned char *buf, short width, + short height, Bool Sync, RegionPtr clipBoxes, + pointer data, DrawablePtr pDraw); +typedef int (*ReputImageFuncPtr) (ScrnInfoPtr pScrn, short src_x, short src_y, + short drw_x, short drw_y, short src_w, + short src_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data, + DrawablePtr pDraw); +typedef int (*QueryImageAttributesFuncPtr) (ScrnInfoPtr pScrn, int image, + unsigned short *width, + unsigned short *height, + int *pitches, int *offsets); +typedef void (*ClipNotifyFuncPtr) (ScrnInfoPtr pScrn, pointer data, + WindowPtr window, int dx, int dy); typedef enum { XV_OFF, @@ -130,160 +136,135 @@ typedef enum { /*** this is what the driver needs to fill out ***/ typedef struct { - int id; - char *name; - unsigned short width, height; - XvRationalRec rate; + int id; + char *name; + unsigned short width, height; + XvRationalRec rate; } XF86VideoEncodingRec, *XF86VideoEncodingPtr; typedef struct { - char depth; - short class; + char depth; + short class; } XF86VideoFormatRec, *XF86VideoFormatPtr; typedef struct { - int flags; - int min_value; - int max_value; - char *name; + int flags; + int min_value; + int max_value; + char *name; } XF86AttributeRec, *XF86AttributePtr; typedef struct { - unsigned int type; - int flags; - char *name; - int nEncodings; - XF86VideoEncodingPtr pEncodings; - int nFormats; - XF86VideoFormatPtr pFormats; - int nPorts; - DevUnion *pPortPrivates; - int nAttributes; - XF86AttributePtr pAttributes; - int nImages; - XF86ImagePtr pImages; - PutVideoFuncPtr PutVideo; - PutStillFuncPtr PutStill; - GetVideoFuncPtr GetVideo; - GetStillFuncPtr GetStill; - StopVideoFuncPtr StopVideo; - SetPortAttributeFuncPtr SetPortAttribute; - GetPortAttributeFuncPtr GetPortAttribute; - QueryBestSizeFuncPtr QueryBestSize; - PutImageFuncPtr PutImage; - ReputImageFuncPtr ReputImage; /* image/still */ - QueryImageAttributesFuncPtr QueryImageAttributes; - ClipNotifyFuncPtr ClipNotify; + unsigned int type; + int flags; + char *name; + int nEncodings; + XF86VideoEncodingPtr pEncodings; + int nFormats; + XF86VideoFormatPtr pFormats; + int nPorts; + DevUnion *pPortPrivates; + int nAttributes; + XF86AttributePtr pAttributes; + int nImages; + XF86ImagePtr pImages; + PutVideoFuncPtr PutVideo; + PutStillFuncPtr PutStill; + GetVideoFuncPtr GetVideo; + GetStillFuncPtr GetStill; + StopVideoFuncPtr StopVideo; + SetPortAttributeFuncPtr SetPortAttribute; + GetPortAttributeFuncPtr GetPortAttribute; + QueryBestSizeFuncPtr QueryBestSize; + PutImageFuncPtr PutImage; + ReputImageFuncPtr ReputImage; /* image/still */ + QueryImageAttributesFuncPtr QueryImageAttributes; + ClipNotifyFuncPtr ClipNotify; } XF86VideoAdaptorRec, *XF86VideoAdaptorPtr; typedef struct { - XF86ImagePtr image; - int flags; - int (*alloc_surface)(ScrnInfoPtr pScrn, - int id, - unsigned short width, - unsigned short height, - XF86SurfacePtr surface); - int (*free_surface)(XF86SurfacePtr surface); - int (*display) (XF86SurfacePtr surface, - short vid_x, short vid_y, - short drw_x, short drw_y, - short vid_w, short vid_h, - short drw_w, short drw_h, - RegionPtr clipBoxes); - int (*stop) (XF86SurfacePtr surface); - int (*getAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 *value); - int (*setAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 value); - int max_width; - int max_height; - int num_attributes; - XF86AttributePtr attributes; + XF86ImagePtr image; + int flags; + int (*alloc_surface) (ScrnInfoPtr pScrn, + int id, + unsigned short width, + unsigned short height, XF86SurfacePtr surface); + int (*free_surface) (XF86SurfacePtr surface); + int (*display) (XF86SurfacePtr surface, + short vid_x, short vid_y, + short drw_x, short drw_y, + short vid_w, short vid_h, + short drw_w, short drw_h, RegionPtr clipBoxes); + int (*stop) (XF86SurfacePtr surface); + int (*getAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 *value); + int (*setAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 value); + int max_width; + int max_height; + int num_attributes; + XF86AttributePtr attributes; } XF86OffscreenImageRec, *XF86OffscreenImagePtr; extern _X_EXPORT Bool -xf86XVScreenInit( - ScreenPtr pScreen, - XF86VideoAdaptorPtr *Adaptors, - int num -); + xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * Adaptors, int num); -typedef int (* xf86XVInitGenericAdaptorPtr)(ScrnInfoPtr pScrn, - XF86VideoAdaptorPtr **Adaptors); +typedef int (*xf86XVInitGenericAdaptorPtr) (ScrnInfoPtr pScrn, + XF86VideoAdaptorPtr ** Adaptors); extern _X_EXPORT int -xf86XVRegisterGenericAdaptorDriver( - xf86XVInitGenericAdaptorPtr InitFunc -); + xf86XVRegisterGenericAdaptorDriver(xf86XVInitGenericAdaptorPtr InitFunc); extern _X_EXPORT int -xf86XVListGenericAdaptors( - ScrnInfoPtr pScrn, - XF86VideoAdaptorPtr **Adaptors -); + xf86XVListGenericAdaptors(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr ** Adaptors); extern _X_EXPORT Bool -xf86XVRegisterOffscreenImages( - ScreenPtr pScreen, - XF86OffscreenImagePtr images, - int num -); + +xf86XVRegisterOffscreenImages(ScreenPtr pScreen, + XF86OffscreenImagePtr images, int num); extern _X_EXPORT XF86OffscreenImagePtr -xf86XVQueryOffscreenImages( - ScreenPtr pScreen, - int *num -); - -extern _X_EXPORT XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn); +xf86XVQueryOffscreenImages(ScreenPtr pScreen, int *num); + +extern _X_EXPORT XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr + pScrn); extern _X_EXPORT void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr); extern _X_EXPORT void -xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes); + xf86XVFillKeyHelper(ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes); extern _X_EXPORT void -xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes); + +xf86XVFillKeyHelperDrawable(DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes); extern _X_EXPORT void -xf86XVFillKeyHelperPort (DrawablePtr pDraw, pointer data, CARD32 key, RegionPtr clipboxes, Bool fillEverything); + +xf86XVFillKeyHelperPort(DrawablePtr pDraw, pointer data, CARD32 key, + RegionPtr clipboxes, Bool fillEverything); extern _X_EXPORT Bool -xf86XVClipVideoHelper( - BoxPtr dst, - INT32 *xa, - INT32 *xb, - INT32 *ya, - INT32 *yb, - RegionPtr reg, - INT32 width, - INT32 height -); + +xf86XVClipVideoHelper(BoxPtr dst, + INT32 *xa, + INT32 *xb, + INT32 *ya, + INT32 *yb, RegionPtr reg, INT32 width, INT32 height); extern _X_EXPORT void -xf86XVCopyYUV12ToPacked( - const void *srcy, - const void *srcv, - const void *srcu, - void *dst, - int srcPitchy, - int srcPitchuv, - int dstPitch, - int h, - int w -); + +xf86XVCopyYUV12ToPacked(const void *srcy, + const void *srcv, + const void *srcu, + void *dst, + int srcPitchy, + int srcPitchuv, int dstPitch, int h, int w); extern _X_EXPORT void -xf86XVCopyPacked( - const void *src, - void *dst, - int srcPitch, - int dstPitch, - int h, - int w -); - -extern _X_EXPORT DevPrivateKey (*XvGetScreenKeyProc)(void); -extern _X_EXPORT unsigned long (*XvGetRTPortProc)(void); -extern _X_EXPORT int (*XvScreenInitProc)(ScreenPtr); - -#endif /* _XF86XV_H_ */ + +xf86XVCopyPacked(const void *src, + void *dst, int srcPitch, int dstPitch, int h, int w); + +extern _X_EXPORT DevPrivateKey (*XvGetScreenKeyProc) (void); +extern _X_EXPORT unsigned long (*XvGetRTPortProc) (void); +extern _X_EXPORT int (*XvScreenInitProc) (ScreenPtr); + +#endif /* _XF86XV_H_ */ |