Debian Codegraph @

src/i965_fourcc.h

raw
1 #ifndef _I965_FOURCC_H_
2 #define _I965_FOURCC_H_
3
4 #ifndef VA_FOURCC_YV16
5 #define VA_FOURCC_YV16 VA_FOURCC('Y','V','1','6')
6 #endif
7
8 #ifndef VA_FOURCC_I420
9 #define VA_FOURCC_I420 VA_FOURCC('I','4','2','0')
10 #endif
11
12 /*
13 * VA_FOURCC_IA44 is an exception because the va.h already
14 * defines the AI44 as VA_FOURCC('I', 'A', '4', '4').
15 */
16 #ifndef VA_FOURCC_IA44
17 #define VA_FOURCC_IA44 VA_FOURCC('A','I','4','4')
18 #endif
19
20 #ifndef VA_FOURCC_IA88
21 #define VA_FOURCC_IA88 VA_FOURCC('I','A','8','8')
22 #endif
23
24 #ifndef VA_FOURCC_AI88
25 #define VA_FOURCC_AI88 VA_FOURCC('A','I','8','8')
26 #endif
27
28 #ifndef VA_FOURCC_IMC1
29 #define VA_FOURCC_IMC1 VA_FOURCC('I','M','C','1')
30 #endif
31
32 #ifndef VA_FOURCC_YVY2
33 #define VA_FOURCC_YVY2 VA_FOURCC('Y','V','Y','2')
34 #endif
35
36 #ifndef VA_FOURCC_I010
37 #define VA_FOURCC_I010 VA_FOURCC('I','0','1','0')
38 #endif
39
40 #define I965_MAX_PLANES 4
41 #define I965_MAX_COMONENTS 4
42
43 #define I965_COLOR_YUV 0
44 #define I965_COLOR_RGB 1
45 #define I965_COLOR_INDEX 2
46
47 typedef struct {
48 uint8_t plane; /* the plane which the pixel belongs to */
49 uint8_t offset; /* bits offset within a macro-pixel for packed YUV formats or pixel for other formats in the plane */
50 } i965_component_info;
51
52 typedef struct {
53 uint32_t fourcc; /* fourcc */
54 uint32_t format; /* 0: YUV, 1: RGB, 2: Indexed format */
55 uint32_t subsampling; /* Sub sampling */
56 uint8_t flag; /* 1: only supported by vaCreateSurfaces(), 2: only supported by vaCreateImage(), 3: both */
57 uint8_t hfactor; /* horizontal sampling factor */
58 uint8_t vfactor; /* vertical sampling factor */
59 uint8_t num_planes; /* number of planes */
60 uint8_t bpp[I965_MAX_PLANES]; /* bits per pixel within a plane */
61 uint8_t num_components; /* number of components */
62 /*
63 * Components in the array are ordered in Y, U, V, A (up to 4 components)
64 * for YUV formats, R, G, B, A (up to 4 components) for RGB formats and
65 * I, A (2 components) for indexed formats
66 */
67 i965_component_info components[I965_MAX_COMONENTS];
68 } i965_fourcc_info;
69
70 extern const i965_fourcc_info *get_fourcc_info(unsigned int);
71
72 #endif /* _I965_FOURCC_H_ */