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 _UAPI_MSM_VDEC_H_ 20 #define _UAPI_MSM_VDEC_H_ 21 #include <linux/types.h> 22 #define VDEC_IOCTL_MAGIC 'v' 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #define VDEC_IOCTL_INITIALIZE _IOWR(VDEC_IOCTL_MAGIC, 1, struct vdec_init) 25 #define VDEC_IOCTL_SETBUFFERS _IOW(VDEC_IOCTL_MAGIC, 2, struct vdec_buffer) 26 #define VDEC_IOCTL_QUEUE _IOWR(VDEC_IOCTL_MAGIC, 3, struct vdec_input_buf) 27 #define VDEC_IOCTL_REUSEFRAMEBUFFER _IOW(VDEC_IOCTL_MAGIC, 4, unsigned int) 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define VDEC_IOCTL_FLUSH _IOW(VDEC_IOCTL_MAGIC, 5, unsigned int) 30 #define VDEC_IOCTL_EOS _IO(VDEC_IOCTL_MAGIC, 6) 31 #define VDEC_IOCTL_GETMSG _IOR(VDEC_IOCTL_MAGIC, 7, struct vdec_msg) 32 #define VDEC_IOCTL_CLOSE _IO(VDEC_IOCTL_MAGIC, 8) 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define VDEC_IOCTL_FREEBUFFERS _IOW(VDEC_IOCTL_MAGIC, 9, struct vdec_buf_info) 35 #define VDEC_IOCTL_GETDECATTRIBUTES _IOR(VDEC_IOCTL_MAGIC, 10, struct vdec_dec_attributes) 36 #define VDEC_IOCTL_GETVERSION _IOR(VDEC_IOCTL_MAGIC, 11, struct vdec_version) 37 #define VDEC_IOCTL_SETPROPERTY _IOW(VDEC_IOCTL_MAGIC, 12, struct vdec_property_info) 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define VDEC_IOCTL_GETPROPERTY _IOR(VDEC_IOCTL_MAGIC, 13, struct vdec_property_info) 40 #define VDEC_IOCTL_PERFORMANCE_CHANGE_REQ _IOW(VDEC_IOCTL_MAGIC, 14, unsigned int) 41 enum { 42 VDEC_FRAME_DECODE_OK, 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 VDEC_FRAME_DECODE_ERR, 45 VDEC_FATAL_ERR, 46 VDEC_FLUSH_FINISH, 47 VDEC_EOS, 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 VDEC_FRAME_FLUSH, 50 VDEC_STREAM_SWITCH, 51 VDEC_SUSPEND_FINISH, 52 VDEC_BUFFER_CONSUMED 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 }; 55 enum { 56 VDEC_FLUSH_INPUT, 57 VDEC_FLUSH_OUTPUT, 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 VDEC_FLUSH_ALL 60 }; 61 enum { 62 VDEC_BUFFER_TYPE_INPUT, 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 VDEC_BUFFER_TYPE_OUTPUT, 65 VDEC_BUFFER_TYPE_INTERNAL1, 66 VDEC_BUFFER_TYPE_INTERNAL2, 67 }; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 enum { 70 VDEC_QUEUE_SUCCESS, 71 VDEC_QUEUE_FAILED, 72 VDEC_QUEUE_BADSTATE, 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 }; 75 enum { 76 VDEC_COLOR_FORMAT_NV21 = 0x01, 77 VDEC_COLOR_FORMAT_NV21_YAMOTO = 0x02 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 }; 80 enum vdec_property_id { 81 VDEC_FOURCC, 82 VDEC_PROFILE, 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 VDEC_LEVEL, 85 VDEC_DIMENSIONS, 86 VDEC_CWIN, 87 VDEC_INPUT_BUF_REQ, 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 VDEC_OUTPUT_BUF_REQ, 90 VDEC_LUMA_CHROMA_STRIDE, 91 VDEC_NUM_DAL_PORTS, 92 VDEC_PRIORITY, 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 VDEC_FRAME_ALIGNMENT 95 }; 96 enum { 97 PERF_REQUEST_SET_MIN = 0, 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 PERF_REQUEST_LOWER, 100 PERF_REQUEST_RAISE, 101 PERF_REQUEST_SET_MAX 102 }; 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 struct vdec_input_buf_info { 105 u32 offset; 106 u32 data; 107 u32 size; 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 int timestamp_lo; 110 int timestamp_hi; 111 int avsync_state; 112 u32 flags; 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 }; 115 struct vdec_buf_desc { 116 u32 bufsize; 117 u32 num_min_buffers; 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 u32 num_max_buffers; 120 }; 121 struct vdec_buf_req { 122 u32 max_input_queue_size; 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 struct vdec_buf_desc input; 125 struct vdec_buf_desc output; 126 struct vdec_buf_desc dec_req1; 127 struct vdec_buf_desc dec_req2; 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 }; 130 struct vdec_region_info { 131 u32 src_id; 132 u32 offset; 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 u32 size; 135 }; 136 struct vdec_config { 137 u32 fourcc; 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 u32 width; 140 u32 height; 141 u32 order; 142 u32 notify_enable; 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 u32 vc1_rowbase; 145 u32 h264_startcode_detect; 146 u32 h264_nal_len_size; 147 u32 postproc_flag; 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 u32 fruc_enable; 150 u32 color_format; 151 }; 152 struct vdec_vc1_panscan_regions { 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 int num; 155 int width[4]; 156 int height[4]; 157 int xoffset[4]; 158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 int yoffset[4]; 160 }; 161 struct vdec_cropping_window { 162 u32 x1; 163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 u32 y1; 165 u32 x2; 166 u32 y2; 167 }; 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 struct vdec_frame_info { 170 u32 status; 171 u32 offset; 172 u32 data1; 173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 u32 data2; 175 int timestamp_lo; 176 int timestamp_hi; 177 int cal_timestamp_lo; 178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 int cal_timestamp_hi; 180 u32 dec_width; 181 u32 dec_height; 182 struct vdec_cropping_window cwin; 183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 u32 picture_type[2]; 185 u32 picture_format; 186 u32 vc1_rangeY; 187 u32 vc1_rangeUV; 188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 u32 picture_resolution; 190 u32 frame_disp_repeat; 191 u32 repeat_first_field; 192 u32 top_field_first; 193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 u32 interframe_interp; 195 struct vdec_vc1_panscan_regions panscan; 196 u32 concealed_macblk_num; 197 u32 flags; 198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 u32 performance_stats; 200 u32 data3; 201 }; 202 struct vdec_buf_info { 203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 u32 buf_type; 205 struct vdec_region_info region; 206 u32 num_buf; 207 u32 islast; 208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 }; 210 struct vdec_buffer { 211 u32 pmem_id; 212 struct vdec_buf_info buf; 213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 }; 215 struct vdec_sequence { 216 u8 * header; 217 u32 len; 218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 }; 220 struct vdec_config_sps { 221 struct vdec_config cfg; 222 struct vdec_sequence seq; 223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224 }; 225 #define VDEC_MSG_REUSEINPUTBUFFER 1 226 #define VDEC_MSG_FRAMEDONE 2 227 struct vdec_msg { 228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229 u32 id; 230 union { 231 u32 buf_id; 232 struct vdec_frame_info vfr_info; 233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 }; 235 }; 236 struct vdec_init { 237 struct vdec_config_sps sps_cfg; 238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239 struct vdec_buf_req * buf_req; 240 }; 241 struct vdec_input_buf { 242 u32 pmem_id; 243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244 struct vdec_input_buf_info buffer; 245 struct vdec_queue_status * queue_status; 246 }; 247 struct vdec_queue_status { 248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249 u32 status; 250 }; 251 struct vdec_dec_attributes { 252 u32 fourcc; 253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254 u32 profile; 255 u32 level; 256 u32 dec_pic_width; 257 u32 dec_pic_height; 258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259 struct vdec_buf_desc input; 260 struct vdec_buf_desc output; 261 struct vdec_buf_desc dec_req1; 262 struct vdec_buf_desc dec_req2; 263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 264 }; 265 struct vdec_version { 266 u32 major; 267 u32 minor; 268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 269 }; 270 struct dal_vdec_rectangle { 271 u32 width; 272 u32 height; 273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 274 }; 275 struct stride_type { 276 u32 luma; 277 u32 chroma; 278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 279 }; 280 struct frame_alignment_type { 281 u32 luma_width; 282 u32 luma_height; 283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 284 u32 chroma_width; 285 u32 chroma_height; 286 u32 chroma_offset; 287 }; 288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 289 union vdec_property { 290 u32 fourcc; 291 u32 profile; 292 u32 level; 293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 294 struct dal_vdec_rectangle dim; 295 struct vdec_cropping_window cw; 296 struct vdec_buf_desc input_req; 297 struct vdec_buf_desc output_req; 298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 299 struct stride_type stride; 300 u32 num_dal_ports; 301 u32 priority; 302 struct frame_alignment_type frame_alignment; 303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 304 u32 def_type; 305 }; 306 struct vdec_property_info { 307 enum vdec_property_id id; 308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 309 union vdec_property property; 310 }; 311 #endif 312 313