• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef __MSM_VIDC_H__
20 #define __MSM_VIDC_H__
21 #include <linux/types.h>
22 #define MSM_VIDC_HAL_INTERLACE_COLOR_FORMAT_NV12 0x2
23 #define MSM_VIDC_HAL_INTERLACE_COLOR_FORMAT_NV12_UBWC 0x8002
24 #define MSM_VIDC_4x_1 0x1
25 #define MSM_VIDC_EXTRADATA_FRAME_QP_ADV 0x1
26 struct msm_vidc_extradata_header {
27   unsigned int size;
28   unsigned int : 32;
29   unsigned int : 32;
30   unsigned int type;
31   unsigned int data_size;
32   unsigned char data[1];
33 };
34 struct msm_vidc_interlace_payload {
35   unsigned int format;
36   unsigned int color_format;
37 };
38 struct msm_vidc_framerate_payload {
39   unsigned int frame_rate;
40 };
41 struct msm_vidc_ts_payload {
42   unsigned int timestamp_lo;
43   unsigned int timestamp_hi;
44 };
45 struct msm_vidc_concealmb_payload {
46   unsigned int num_mbs;
47 };
48 struct msm_vidc_recoverysei_payload {
49   unsigned int flags;
50 };
51 struct msm_vidc_aspect_ratio_payload {
52   unsigned int size;
53   unsigned int version;
54   unsigned int port_index;
55   unsigned int aspect_width;
56   unsigned int aspect_height;
57 };
58 struct msm_vidc_mpeg2_seqdisp_payload {
59   unsigned int video_format;
60   unsigned int color_descp;
61   unsigned int color_primaries;
62   unsigned int transfer_char;
63   unsigned int matrix_coeffs;
64   unsigned int disp_width;
65   unsigned int disp_height;
66 };
67 struct msm_vidc_vc1_seqdisp_payload {
68   unsigned int prog_seg_format;
69   unsigned int uv_sampl_fmt;
70   unsigned int color_format;
71   unsigned int color_primaries;
72   unsigned int transfer_char;
73   unsigned int matrix_coeffs;
74   unsigned int aspect_ratio;
75   unsigned int aspect_horiz;
76   unsigned int aspect_vert;
77 };
78 struct msm_vidc_input_crop_payload {
79   unsigned int size;
80   unsigned int version;
81   unsigned int port_index;
82   unsigned int left;
83   unsigned int top;
84   unsigned int width;
85   unsigned int height;
86 };
87 struct msm_vidc_misr_info {
88   unsigned int misr_dpb_luma;
89   unsigned int misr_dpb_chroma;
90   unsigned int misr_opb_luma;
91   unsigned int misr_opb_chroma;
92 };
93 struct msm_vidc_output_crop_payload {
94   unsigned int size;
95   unsigned int version;
96   unsigned int port_index;
97   unsigned int left;
98   unsigned int top;
99   unsigned int display_width;
100   unsigned int display_height;
101   unsigned int width;
102   unsigned int height;
103   unsigned int frame_num;
104   unsigned int bit_depth_y;
105   unsigned int bit_depth_c;
106   struct msm_vidc_misr_info misr_info[2];
107 };
108 struct msm_vidc_digital_zoom_payload {
109   unsigned int size;
110   unsigned int version;
111   unsigned int port_index;
112   unsigned int zoom_width;
113   unsigned int zoom_height;
114 };
115 struct msm_vidc_extradata_index {
116   unsigned int type;
117   union {
118     struct msm_vidc_input_crop_payload input_crop;
119     struct msm_vidc_digital_zoom_payload digital_zoom;
120     struct msm_vidc_aspect_ratio_payload aspect_ratio;
121   };
122 };
123 struct msm_vidc_panscan_window {
124   unsigned int panscan_height_offset;
125   unsigned int panscan_width_offset;
126   unsigned int panscan_window_width;
127   unsigned int panscan_window_height;
128 };
129 struct msm_vidc_panscan_window_payload {
130   unsigned int num_panscan_windows;
131   struct msm_vidc_panscan_window wnd[1];
132 };
133 struct msm_vidc_stream_userdata_payload {
134   unsigned int type;
135   unsigned int data[1];
136 };
137 struct msm_vidc_frame_qp_payload {
138   unsigned int frame_qp;
139   unsigned int qp_sum;
140   unsigned int skip_qp_sum;
141   unsigned int skip_num_blocks;
142   unsigned int total_num_blocks;
143 };
144 struct msm_vidc_frame_bits_info_payload {
145   unsigned int frame_bits;
146   unsigned int header_bits;
147 };
148 struct msm_vidc_s3d_frame_packing_payload {
149   unsigned int fpa_id;
150   unsigned int cancel_flag;
151   unsigned int fpa_type;
152   unsigned int quin_cunx_flag;
153   unsigned int content_interprtation_type;
154   unsigned int spatial_flipping_flag;
155   unsigned int frame0_flipped_flag;
156   unsigned int field_views_flag;
157   unsigned int current_frame_is_frame0_flag;
158   unsigned int frame0_self_contained_flag;
159   unsigned int frame1_self_contained_flag;
160   unsigned int frame0_graid_pos_x;
161   unsigned int frame0_graid_pos_y;
162   unsigned int frame1_graid_pos_x;
163   unsigned int frame1_graid_pos_y;
164   unsigned int fpa_reserved_byte;
165   unsigned int fpa_repetition_period;
166   unsigned int fpa_extension_flag;
167 };
168 struct msm_vidc_vqzip_sei_payload {
169   unsigned int size;
170   unsigned int data[1];
171 };
172 struct msm_vidc_ubwc_cr_stats_info {
173   unsigned int stats_tile_32;
174   unsigned int stats_tile_64;
175   unsigned int stats_tile_96;
176   unsigned int stats_tile_128;
177   unsigned int stats_tile_160;
178   unsigned int stats_tile_192;
179   unsigned int stats_tile_256;
180 };
181 struct msm_vidc_yuv_stats_payload {
182   unsigned int frame_qp;
183   unsigned int texture;
184   unsigned int luma_in_q16;
185   unsigned int frame_difference;
186 };
187 struct msm_vidc_vpx_colorspace_payload {
188   unsigned int color_space;
189   unsigned int yuv_range_flag;
190   unsigned int sumsampling_x;
191   unsigned int sumsampling_y;
192 };
193 struct msm_vidc_roi_qp_payload {
194   int upper_qp_offset;
195   int lower_qp_offset;
196   unsigned int b_roi_info;
197   int mbi_info_size;
198   unsigned int data[1];
199 };
200 struct msm_vidc_mastering_display_colour_sei_payload {
201   unsigned int nDisplayPrimariesX[3];
202   unsigned int nDisplayPrimariesY[3];
203   unsigned int nWhitePointX;
204   unsigned int nWhitePointY;
205   unsigned int nMaxDisplayMasteringLuminance;
206   unsigned int nMinDisplayMasteringLuminance;
207 };
208 struct msm_vidc_content_light_level_sei_payload {
209   unsigned int nMaxContentLight;
210   unsigned int nMaxPicAverageLight;
211 };
212 struct msm_vidc_vui_display_info_payload {
213   unsigned int video_signal_present_flag;
214   unsigned int video_format;
215   unsigned int bit_depth_y;
216   unsigned int bit_depth_c;
217   unsigned int video_full_range_flag;
218   unsigned int color_description_present_flag;
219   unsigned int color_primaries;
220   unsigned int transfer_characteristics;
221   unsigned int matrix_coefficients;
222   unsigned int chroma_location_info_present_flag;
223   unsigned int chroma_format_idc;
224   unsigned int separate_color_plane_flag;
225   unsigned int chroma_sample_loc_type_top_field;
226   unsigned int chroma_sample_loc_type_bottom_field;
227 };
228 enum msm_vidc_extradata_type {
229   MSM_VIDC_EXTRADATA_NONE = 0x00000000,
230   MSM_VIDC_EXTRADATA_MB_QUANTIZATION = 0x00000001,
231   MSM_VIDC_EXTRADATA_INTERLACE_VIDEO = 0x00000002,
232   MSM_VIDC_EXTRADATA_VC1_FRAMEDISP = 0x00000003,
233   MSM_VIDC_EXTRADATA_VC1_SEQDISP = 0x00000004,
234   MSM_VIDC_EXTRADATA_TIMESTAMP = 0x00000005,
235   MSM_VIDC_EXTRADATA_S3D_FRAME_PACKING = 0x00000006,
236   MSM_VIDC_EXTRADATA_FRAME_RATE = 0x00000007,
237   MSM_VIDC_EXTRADATA_PANSCAN_WINDOW = 0x00000008,
238   MSM_VIDC_EXTRADATA_RECOVERY_POINT_SEI = 0x00000009,
239   MSM_VIDC_EXTRADATA_MPEG2_SEQDISP = 0x0000000D,
240   MSM_VIDC_EXTRADATA_STREAM_USERDATA = 0x0000000E,
241   MSM_VIDC_EXTRADATA_FRAME_QP = 0x0000000F,
242   MSM_VIDC_EXTRADATA_FRAME_BITS_INFO = 0x00000010,
243   MSM_VIDC_EXTRADATA_VQZIP_SEI = 0x00000011,
244   MSM_VIDC_EXTRADATA_ROI_QP = 0x00000013,
245 #define MSM_VIDC_EXTRADATA_VPX_COLORSPACE_INFO MSM_VIDC_EXTRADATA_VPX_COLORSPACE_INFO
246   MSM_VIDC_EXTRADATA_VPX_COLORSPACE_INFO = 0x00000014,
247 #define MSM_VIDC_EXTRADATA_MASTERING_DISPLAY_COLOUR_SEI MSM_VIDC_EXTRADATA_MASTERING_DISPLAY_COLOUR_SEI
248   MSM_VIDC_EXTRADATA_MASTERING_DISPLAY_COLOUR_SEI = 0x00000015,
249 #define MSM_VIDC_EXTRADATA_CONTENT_LIGHT_LEVEL_SEI MSM_VIDC_EXTRADATA_CONTENT_LIGHT_LEVEL_SEI
250   MSM_VIDC_EXTRADATA_CONTENT_LIGHT_LEVEL_SEI = 0x00000016,
251 #define MSM_VIDC_EXTRADATA_PQ_INFO MSM_VIDC_EXTRADATA_PQ_INFO
252   MSM_VIDC_EXTRADATA_PQ_INFO = 0x00000017,
253 #define MSM_VIDC_EXTRADATA_COLOUR_REMAPPING_INFO_SEI MSM_VIDC_EXTRADATA_COLOUR_REMAPPING_INFO_SEI
254   MSM_VIDC_EXTRADATA_COLOUR_REMAPPING_INFO_SEI = 0x00000018,
255 #define MSM_VIDC_EXTRADATA_UBWC_CR_STAT_INFO MSM_VIDC_EXTRADATA_UBWC_CR_STAT_INFO
256   MSM_VIDC_EXTRADATA_UBWC_CR_STAT_INFO = 0x00000019,
257   MSM_VIDC_EXTRADATA_INPUT_CROP = 0x0700000E,
258 #define MSM_VIDC_EXTRADATA_OUTPUT_CROP MSM_VIDC_EXTRADATA_OUTPUT_CROP
259   MSM_VIDC_EXTRADATA_OUTPUT_CROP = 0x0700000F,
260   MSM_VIDC_EXTRADATA_DIGITAL_ZOOM = 0x07000010,
261   MSM_VIDC_EXTRADATA_MULTISLICE_INFO = 0x7F100000,
262   MSM_VIDC_EXTRADATA_NUM_CONCEALED_MB = 0x7F100001,
263   MSM_VIDC_EXTRADATA_INDEX = 0x7F100002,
264   MSM_VIDC_EXTRADATA_ASPECT_RATIO = 0x7F100003,
265   MSM_VIDC_EXTRADATA_METADATA_LTR = 0x7F100004,
266   MSM_VIDC_EXTRADATA_METADATA_FILLER = 0x7FE00002,
267   MSM_VIDC_EXTRADATA_METADATA_MBI = 0x7F100005,
268 #define MSM_VIDC_EXTRADATA_VUI_DISPLAY_INFO MSM_VIDC_EXTRADATA_VUI_DISPLAY_INFO
269   MSM_VIDC_EXTRADATA_VUI_DISPLAY_INFO = 0x7F100006,
270   MSM_VIDC_EXTRADATA_YUVSTATS_INFO = 0x7F100007,
271 };
272 enum msm_vidc_interlace_type {
273   MSM_VIDC_INTERLACE_FRAME_PROGRESSIVE = 0x01,
274   MSM_VIDC_INTERLACE_INTERLEAVE_FRAME_TOPFIELDFIRST = 0x02,
275   MSM_VIDC_INTERLACE_INTERLEAVE_FRAME_BOTTOMFIELDFIRST = 0x04,
276   MSM_VIDC_INTERLACE_FRAME_TOPFIELDFIRST = 0x08,
277   MSM_VIDC_INTERLACE_FRAME_BOTTOMFIELDFIRST = 0x10,
278 #define MSM_VIDC_INTERLACE_FRAME_MBAFF MSM_VIDC_INTERLACE_FRAME_MBAFF
279   MSM_VIDC_INTERLACE_FRAME_MBAFF = 0x20,
280 };
281 #define MSM_VIDC_FRAMEPACK_CHECKERBOARD 0x00
282 #define MSM_VIDC_FRAMEPACK_COLUMN_INTERLEAVE 0x01
283 #define MSM_VIDC_FRAMEPACK_ROW_INTERLEAVE 0x02
284 #define MSM_VIDC_FRAMEPACK_SIDE_BY_SIDE 0x03
285 #define MSM_VIDC_FRAMEPACK_TOP_BOTTOM 0x04
286 #define MSM_VIDC_FRAMEPACK_TEMPORAL_INTERLEAVE 0x05
287 enum msm_vidc_recovery_sei {
288   MSM_VIDC_FRAME_RECONSTRUCTION_INCORRECT = 0x0,
289   MSM_VIDC_FRAME_RECONSTRUCTION_CORRECT = 0x01,
290   MSM_VIDC_FRAME_RECONSTRUCTION_APPROXIMATELY_CORRECT = 0x02,
291 };
292 enum msm_vidc_userdata_type {
293   MSM_VIDC_USERDATA_TYPE_FRAME = 0x1,
294   MSM_VIDC_USERDATA_TYPE_TOP_FIELD = 0x2,
295   MSM_VIDC_USERDATA_TYPE_BOTTOM_FIELD = 0x3,
296 };
297 enum msm_vidc_h264_color_primaries_values {
298   MSM_VIDC_RESERVED_1 = 0,
299   MSM_VIDC_BT709_5 = 1,
300   MSM_VIDC_UNSPECIFIED = 2,
301   MSM_VIDC_RESERVED_2 = 3,
302   MSM_VIDC_BT470_6_M = 4,
303   MSM_VIDC_BT601_6_625 = 5,
304   MSM_VIDC_BT470_6_BG = MSM_VIDC_BT601_6_625,
305   MSM_VIDC_BT601_6_525 = 6,
306   MSM_VIDC_SMPTE_240M = 7,
307   MSM_VIDC_GENERIC_FILM = 8,
308   MSM_VIDC_BT2020 = 9,
309 };
310 enum msm_vidc_vp9_color_primaries_values {
311   MSM_VIDC_CS_UNKNOWN,
312   MSM_VIDC_CS_BT_601,
313   MSM_VIDC_CS_BT_709,
314   MSM_VIDC_CS_SMPTE_170,
315   MSM_VIDC_CS_SMPTE_240,
316   MSM_VIDC_CS_BT_2020,
317   MSM_VIDC_CS_RESERVED,
318   MSM_VIDC_CS_RGB,
319 };
320 enum msm_vidc_h264_matrix_coeff_values {
321   MSM_VIDC_MATRIX_RGB = 0,
322   MSM_VIDC_MATRIX_BT_709_5 = 1,
323   MSM_VIDC_MATRIX_UNSPECIFIED = 2,
324   MSM_VIDC_MATRIX_RESERVED = 3,
325   MSM_VIDC_MATRIX_FCC_47 = 4,
326   MSM_VIDC_MATRIX_601_6_625 = 5,
327   MSM_VIDC_MATRIX_BT470_BG = MSM_VIDC_MATRIX_601_6_625,
328   MSM_VIDC_MATRIX_601_6_525 = 6,
329   MSM_VIDC_MATRIX_SMPTE_170M = MSM_VIDC_MATRIX_601_6_525,
330   MSM_VIDC_MATRIX_SMPTE_240M = 7,
331   MSM_VIDC_MATRIX_Y_CG_CO = 8,
332   MSM_VIDC_MATRIX_BT_2020 = 9,
333   MSM_VIDC_MATRIX_BT_2020_CONST = 10,
334 };
335 enum msm_vidc_h264_transfer_chars_values {
336   MSM_VIDC_TRANSFER_RESERVED_1 = 0,
337   MSM_VIDC_TRANSFER_BT709_5 = 1,
338   MSM_VIDC_TRANSFER_UNSPECIFIED = 2,
339   MSM_VIDC_TRANSFER_RESERVED_2 = 3,
340   MSM_VIDC_TRANSFER_BT_470_6_M = 4,
341   MSM_VIDC_TRANSFER_BT_470_6_BG = 5,
342   MSM_VIDC_TRANSFER_601_6_625 = 6,
343   MSM_VIDC_TRANSFER_601_6_525 = MSM_VIDC_TRANSFER_601_6_625,
344   MSM_VIDC_TRANSFER_SMPTE_240M = 7,
345   MSM_VIDC_TRANSFER_LINEAR = 8,
346   MSM_VIDC_TRANSFER_LOG_100_1 = 9,
347   MSM_VIDC_TRANSFER_LOG_100_SQRT10_1 = 10,
348   MSM_VIDC_TRANSFER_IEC_61966 = 11,
349   MSM_VIDC_TRANSFER_BT_1361 = 12,
350   MSM_VIDC_TRANSFER_SRGB = 13,
351   MSM_VIDC_TRANSFER_BT_2020_10 = 14,
352   MSM_VIDC_TRANSFER_BT_2020_12 = 15,
353 #define MSM_VIDC_TRANSFER_SMPTE_ST2084 MSM_VIDC_TRANSFER_SMPTE_ST2084
354   MSM_VIDC_TRANSFER_SMPTE_ST2084 = 16,
355 #define MSM_VIDC_TRANSFER_SMPTE_ST428_1 MSM_VIDC_TRANSFER_SMPTE_ST428_1
356   MSM_VIDC_TRANSFER_SMPTE_ST428_1 = 17,
357 #define MSM_VIDC_TRANSFER_HLG MSM_VIDC_TRANSFER_HLG
358   MSM_VIDC_TRANSFER_HLG = 18,
359 };
360 enum msm_vidc_pixel_depth {
361   MSM_VIDC_BIT_DEPTH_8,
362   MSM_VIDC_BIT_DEPTH_10,
363   MSM_VIDC_BIT_DEPTH_UNSUPPORTED = 0XFFFFFFFF,
364 };
365 enum msm_vidc_video_format {
366   MSM_VIDC_COMPONENT,
367   MSM_VIDC_PAL,
368   MSM_VIDC_NTSC,
369   MSM_VIDC_SECAM,
370   MSM_VIDC_MAC,
371   MSM_VIDC_UNSPECIFIED_FORMAT,
372   MSM_VIDC_RESERVED_1_FORMAT,
373   MSM_VIDC_RESERVED_2_FORMAT,
374 };
375 enum msm_vidc_color_desc_flag {
376   MSM_VIDC_COLOR_DESC_NOT_PRESENT,
377   MSM_VIDC_COLOR_DESC_PRESENT,
378 };
379 #define MSM_VIDC_PIC_STRUCT_MAYBE_INTERLACED 0x0
380 #define MSM_VIDC_PIC_STRUCT_PROGRESSIVE 0x1
381 #define MSM_VIDC_PIC_STRUCT_UNKNOWN 0XFFFFFFFF
382 #define MSM_VIDC_ALL_LAYER_ID 0xFF
383 #endif
384 
385