1 | /* $XFree86: xc/include/extensions/XvMC.h,v 1.8 2002/01/16 01:15:45 mvojkovi Exp $ */
|
---|
2 |
|
---|
3 | #ifndef _XVMC_H_
|
---|
4 | #define _XVMC_H_
|
---|
5 |
|
---|
6 | #include <X11/X.h>
|
---|
7 | #include <X11/extensions/Xv.h>
|
---|
8 |
|
---|
9 | #define XvMCName "XVideo-MotionCompensation"
|
---|
10 | #define XvMCNumEvents 0
|
---|
11 | #define XvMCNumErrors 3
|
---|
12 | #define XvMCVersion 1
|
---|
13 | #define XvMCRevision 0
|
---|
14 |
|
---|
15 | #define XvMCBadContext 0
|
---|
16 | #define XvMCBadSurface 1
|
---|
17 | #define XvMCBadSubpicture 2
|
---|
18 |
|
---|
19 | /* Chroma formats */
|
---|
20 | #define XVMC_CHROMA_FORMAT_420 0x00000001
|
---|
21 | #define XVMC_CHROMA_FORMAT_422 0x00000002
|
---|
22 | #define XVMC_CHROMA_FORMAT_444 0x00000003
|
---|
23 |
|
---|
24 | /* XvMCSurfaceInfo Flags */
|
---|
25 | #define XVMC_OVERLAID_SURFACE 0x00000001
|
---|
26 | #define XVMC_BACKEND_SUBPICTURE 0x00000002
|
---|
27 | #define XVMC_SUBPICTURE_INDEPENDENT_SCALING 0x00000004
|
---|
28 | #define XVMC_INTRA_UNSIGNED 0x00000008
|
---|
29 |
|
---|
30 | /* Motion Compensation types */
|
---|
31 | #define XVMC_MOCOMP 0x00000000
|
---|
32 | #define XVMC_IDCT 0x00010000
|
---|
33 |
|
---|
34 | #define XVMC_MPEG_1 0x00000001
|
---|
35 | #define XVMC_MPEG_2 0x00000002
|
---|
36 | #define XVMC_H263 0x00000003
|
---|
37 | #define XVMC_MPEG_4 0x00000004
|
---|
38 |
|
---|
39 | #define XVMC_MB_TYPE_MOTION_FORWARD 0x02
|
---|
40 | #define XVMC_MB_TYPE_MOTION_BACKWARD 0x04
|
---|
41 | #define XVMC_MB_TYPE_PATTERN 0x08
|
---|
42 | #define XVMC_MB_TYPE_INTRA 0x10
|
---|
43 |
|
---|
44 | #define XVMC_PREDICTION_FIELD 0x01
|
---|
45 | #define XVMC_PREDICTION_FRAME 0x02
|
---|
46 | #define XVMC_PREDICTION_DUAL_PRIME 0x03
|
---|
47 | #define XVMC_PREDICTION_16x8 0x02
|
---|
48 | #define XVMC_PREDICTION_4MV 0x04
|
---|
49 |
|
---|
50 | #define XVMC_SELECT_FIRST_FORWARD 0x01
|
---|
51 | #define XVMC_SELECT_FIRST_BACKWARD 0x02
|
---|
52 | #define XVMC_SELECT_SECOND_FORWARD 0x04
|
---|
53 | #define XVMC_SELECT_SECOND_BACKWARD 0x08
|
---|
54 |
|
---|
55 | #define XVMC_DCT_TYPE_FRAME 0x00
|
---|
56 | #define XVMC_DCT_TYPE_FIELD 0x01
|
---|
57 |
|
---|
58 | #define XVMC_TOP_FIELD 0x00000001
|
---|
59 | #define XVMC_BOTTOM_FIELD 0x00000002
|
---|
60 | #define XVMC_FRAME_PICTURE (XVMC_TOP_FIELD | XVMC_BOTTOM_FIELD)
|
---|
61 |
|
---|
62 | #define XVMC_SECOND_FIELD 0x00000004
|
---|
63 |
|
---|
64 | #define XVMC_DIRECT 0x00000001
|
---|
65 |
|
---|
66 | #define XVMC_RENDERING 0x00000001
|
---|
67 | #define XVMC_DISPLAYING 0x00000002
|
---|
68 |
|
---|
69 |
|
---|
70 | typedef struct {
|
---|
71 | int surface_type_id;
|
---|
72 | int chroma_format;
|
---|
73 | unsigned short max_width;
|
---|
74 | unsigned short max_height;
|
---|
75 | unsigned short subpicture_max_width;
|
---|
76 | unsigned short subpicture_max_height;
|
---|
77 | int mc_type;
|
---|
78 | int flags;
|
---|
79 | } XvMCSurfaceInfo;
|
---|
80 |
|
---|
81 | typedef struct {
|
---|
82 | XID context_id;
|
---|
83 | int surface_type_id;
|
---|
84 | unsigned short width;
|
---|
85 | unsigned short height;
|
---|
86 | XvPortID port;
|
---|
87 | int flags;
|
---|
88 | void * privData; /* private to the library */
|
---|
89 | } XvMCContext;
|
---|
90 |
|
---|
91 | typedef struct {
|
---|
92 | XID surface_id;
|
---|
93 | XID context_id;
|
---|
94 | int surface_type_id;
|
---|
95 | unsigned short width;
|
---|
96 | unsigned short height;
|
---|
97 | void *privData; /* private to the library */
|
---|
98 | } XvMCSurface;
|
---|
99 |
|
---|
100 | typedef struct {
|
---|
101 | XID subpicture_id;
|
---|
102 | XID context_id;
|
---|
103 | int xvimage_id;
|
---|
104 | unsigned short width;
|
---|
105 | unsigned short height;
|
---|
106 | int num_palette_entries;
|
---|
107 | int entry_bytes;
|
---|
108 | char component_order[4];
|
---|
109 | void *privData; /* private to the library */
|
---|
110 | } XvMCSubpicture;
|
---|
111 |
|
---|
112 | typedef struct {
|
---|
113 | unsigned int num_blocks;
|
---|
114 | XID context_id;
|
---|
115 | void *privData;
|
---|
116 | short *blocks;
|
---|
117 | } XvMCBlockArray;
|
---|
118 |
|
---|
119 | typedef struct {
|
---|
120 | unsigned short x;
|
---|
121 | unsigned short y;
|
---|
122 | unsigned char macroblock_type;
|
---|
123 | unsigned char motion_type;
|
---|
124 | unsigned char motion_vertical_field_select;
|
---|
125 | unsigned char dct_type;
|
---|
126 | short PMV[2][2][2];
|
---|
127 | unsigned int index;
|
---|
128 | unsigned short coded_block_pattern;
|
---|
129 | unsigned short pad0;
|
---|
130 | } XvMCMacroBlock;
|
---|
131 |
|
---|
132 |
|
---|
133 | typedef struct {
|
---|
134 | unsigned int num_blocks;
|
---|
135 | XID context_id;
|
---|
136 | void *privData;
|
---|
137 | XvMCMacroBlock *macro_blocks;
|
---|
138 | } XvMCMacroBlockArray;
|
---|
139 |
|
---|
140 | #endif
|
---|