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