diff options
author | Steve Kondik <shade@chemlab.org> | 2011-03-21 17:05:27 -0400 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2011-03-21 17:05:27 -0400 |
commit | b0d6208aa3374752f9fbe788b034acc9dc96f95f (patch) | |
tree | 2e17319a84aa15bc7f6b820c1f86b24cabbfed96 | |
parent | d6ff7e595810e7909fe51d2adf6f3530550eb640 (diff) | |
download | bionic-b0d6208aa3374752f9fbe788b034acc9dc96f95f.zip bionic-b0d6208aa3374752f9fbe788b034acc9dc96f95f.tar.gz bionic-b0d6208aa3374752f9fbe788b034acc9dc96f95f.tar.bz2 |
bionic: Update PMEM and VIDC headers
Change-Id: I03702ec15266f7e652c66ef909d77403929f576d
-rw-r--r-- | libc/kernel/common/linux/android_pmem.h | 44 | ||||
-rw-r--r-- | libc/kernel/common/linux/msm_vidc_dec.h | 88 | ||||
-rw-r--r-- | libc/kernel/common/linux/msm_vidc_enc.h | 67 |
3 files changed, 138 insertions, 61 deletions
diff --git a/libc/kernel/common/linux/android_pmem.h b/libc/kernel/common/linux/android_pmem.h index be0b342..ba85227 100644 --- a/libc/kernel/common/linux/android_pmem.h +++ b/libc/kernel/common/linux/android_pmem.h @@ -12,6 +12,15 @@ #ifndef _ANDROID_PMEM_H_ #define _ANDROID_PMEM_H_ +#include <linux/fs.h> + +#define PMEM_KERNEL_TEST_MAGIC 0xc0 +#define PMEM_KERNEL_TEST_NOMINAL_TEST_IOCTL _IO(PMEM_KERNEL_TEST_MAGIC, 1) +#define PMEM_KERNEL_TEST_ADVERSARIAL_TEST_IOCTL _IO(PMEM_KERNEL_TEST_MAGIC, 2) +#define PMEM_KERNEL_TEST_HUGE_ALLOCATION_TEST_IOCTL _IO(PMEM_KERNEL_TEST_MAGIC, 3) +#define PMEM_KERNEL_TEST_FREE_UNALLOCATED_TEST_IOCTL _IO(PMEM_KERNEL_TEST_MAGIC, 4) +#define PMEM_KERNEL_TEST_LARGE_REGION_NUMBER_TEST_IOCTL _IO(PMEM_KERNEL_TEST_MAGIC, 5) + #define PMEM_IOCTL_MAGIC 'p' #define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, unsigned int) #define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, unsigned int) @@ -23,27 +32,34 @@ #define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int) #define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, unsigned int) -#define PMEM_CACHE_FLUSH _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int) -struct android_pmem_platform_data -{ - const char* name; +#define PMEM_CACHE_FLUSH _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int) - unsigned long start; +#define PMEM_CLEAN_INV_CACHES _IOW(PMEM_IOCTL_MAGIC, 11, unsigned int) +#define PMEM_CLEAN_CACHES _IOW(PMEM_IOCTL_MAGIC, 12, unsigned int) +#define PMEM_INV_CACHES _IOW(PMEM_IOCTL_MAGIC, 13, unsigned int) - unsigned long size; - - unsigned no_allocator; +#define PMEM_GET_FREE_SPACE _IOW(PMEM_IOCTL_MAGIC, 14, unsigned int) +#define PMEM_ALLOCATE_ALIGNED _IOW(PMEM_IOCTL_MAGIC, 15, unsigned int) +struct pmem_region { + unsigned long offset; + unsigned long len; +}; - unsigned cached; +struct pmem_addr { + unsigned long vaddr; + unsigned long offset; + unsigned long length; +}; - unsigned buffered; +struct pmem_freespace { + unsigned long total; + unsigned long largest; }; -struct pmem_region { - unsigned long offset; - unsigned long len; +struct pmem_allocation { + unsigned long size; + unsigned int align; }; #endif - diff --git a/libc/kernel/common/linux/msm_vidc_dec.h b/libc/kernel/common/linux/msm_vidc_dec.h index 20837a7..47ea37f 100644 --- a/libc/kernel/common/linux/msm_vidc_dec.h +++ b/libc/kernel/common/linux/msm_vidc_dec.h @@ -72,10 +72,12 @@ #define VDEC_BUFFERFLAG_EXTRADATA 0x00000040 #define VDEC_BUFFERFLAG_CODECCONFIG 0x00000080 -#define VDEC_EXTRADATA_QP 0x00000001 -#define VDEC_EXTRADATA_SEI 0x00000002 -#define VDEC_EXTRADATA_VUI 0x00000004 -#define VDEC_EXTRADATA_MB_ERROR_MAP 0x00000008 +#define VDEC_EXTRADATA_NONE 0x001 +#define VDEC_EXTRADATA_QP 0x004 +#define VDEC_EXTRADATA_MB_ERROR_MAP 0x008 +#define VDEC_EXTRADATA_SEI 0x010 +#define VDEC_EXTRADATA_VUI 0x020 +#define VDEC_EXTRADATA_VC1 0x040 #define VDEC_CMDBASE 0x800 #define VDEC_CMD_SET_INTF_VERSION (VDEC_CMDBASE) @@ -83,8 +85,8 @@ #define VDEC_IOCTL_MAGIC 'v' struct vdec_ioctl_msg { - void *inputparam; - void *outputparam; + void __user *in; + void __user *out; }; #define VDEC_IOCTL_GET_PROFILE_LEVEL_SUPPORTED _IOWR(VDEC_IOCTL_MAGIC, 0, struct vdec_ioctl_msg) @@ -134,6 +136,16 @@ struct vdec_ioctl_msg { #define VDEC_IOCTL_GET_NUMBER_INSTANCES _IOR(VDEC_IOCTL_MAGIC, 27, struct vdec_ioctl_msg) +#define VDEC_IOCTL_SET_PICTURE_ORDER _IOW(VDEC_IOCTL_MAGIC, 28, struct vdec_ioctl_msg) + +#define VDEC_IOCTL_SET_FRAME_RATE _IOW(VDEC_IOCTL_MAGIC, 29, struct vdec_ioctl_msg) + +#define VDEC_IOCTL_SET_H264_MV_BUFFER _IOW(VDEC_IOCTL_MAGIC, 30, struct vdec_ioctl_msg) + +#define VDEC_IOCTL_FREE_H264_MV_BUFFER _IOW(VDEC_IOCTL_MAGIC, 31, struct vdec_ioctl_msg) + +#define VDEC_IOCTL_GET_MV_BUFFER_SIZE _IOR(VDEC_IOCTL_MAGIC, 32, struct vdec_ioctl_msg) + enum vdec_picture { PICTURE_TYPE_I, PICTURE_TYPE_P, @@ -153,17 +165,17 @@ struct vdec_allocatorproperty { uint32_t mincount; uint32_t maxcount; uint32_t actualcount; - uint32_t buffer_size; + size_t buffer_size; uint32_t alignment; uint32_t buf_poolid; }; struct vdec_bufferpayload { - uint8_t *bufferaddr; - uint32_t buffer_len; + void __user *bufferaddr; + size_t buffer_len; int pmem_fd; - uint32_t offset; - uint32_t mmaped_size; + size_t offset; + size_t mmaped_size; }; struct vdec_setbuffer_cmd { @@ -396,6 +408,11 @@ enum vdec_output_fromat { VDEC_YUV_FORMAT_TILE_4x2 = 0x2 }; +enum vdec_output_order { + VDEC_ORDER_DISPLAY = 0x1, + VDEC_ORDER_DECODE = 0x2 +}; + struct vdec_picsize { uint32_t frame_width; uint32_t frame_height; @@ -404,26 +421,26 @@ struct vdec_picsize { }; struct vdec_seqheader { - uint8_t *ptr_seqheader; - uint32_t seq_header_len; + void __user *ptr_seqheader; + size_t seq_header_len; int pmem_fd; - uint32_t pmem_offset; + size_t pmem_offset; }; struct vdec_mberror { - uint8_t *ptr_errormap; - uint32_t err_mapsize; + void __user *ptr_errormap; + size_t err_mapsize; }; struct vdec_input_frameinfo { - uint8_t *bufferaddr; - uint32_t offset; - uint32_t datalen; + void __user *bufferaddr; + size_t offset; + size_t datalen; uint32_t flags; int64_t timestamp; void *client_data; int pmem_fd; - uint32_t pmem_offset; + size_t pmem_offset; }; struct vdec_framesize { @@ -434,12 +451,12 @@ struct vdec_framesize { }; struct vdec_output_frameinfo { - uint8_t *phy_addr; - uint8_t *bufferaddr; - uint32_t offset; - uint32_t len; + void __user *bufferaddr; + size_t offset; + size_t len; uint32_t flags; int64_t time_stamp; + enum vdec_picture pic_type; void *client_data; void *input_frame_clientdata; struct vdec_framesize framesize; @@ -454,7 +471,26 @@ struct vdec_msginfo { uint32_t status_code; uint32_t msgcode; union vdec_msgdata msgdata; - uint32_t msgdatasize; + size_t msgdatasize; }; -#endif +struct vdec_framerate { + unsigned long fps_denominator; + unsigned long fps_numerator; +}; + +struct vdec_h264_mv{ + size_t size; + int count; + int pmem_fd; + int offset; +}; + +struct vdec_mv_buff_size{ + int width; + int height; + int size; + int alignment; +}; + +#endif diff --git a/libc/kernel/common/linux/msm_vidc_enc.h b/libc/kernel/common/linux/msm_vidc_enc.h index 45437a2..58cc1ee 100644 --- a/libc/kernel/common/linux/msm_vidc_enc.h +++ b/libc/kernel/common/linux/msm_vidc_enc.h @@ -91,17 +91,18 @@ #define VEN_LEVEL_H264_2 0xE #define VEN_LEVEL_H264_2p1 0xF #define VEN_LEVEL_H264_2p2 0x10 -#define VEN_LEVEL_H264_3 0x11 -#define VEN_LEVEL_H264_3p1 0x12 - -#define VEN_LEVEL_H263_10 0x13 -#define VEN_LEVEL_H263_20 0x14 -#define VEN_LEVEL_H263_30 0x15 -#define VEN_LEVEL_H263_40 0x16 -#define VEN_LEVEL_H263_45 0x17 -#define VEN_LEVEL_H263_50 0x18 -#define VEN_LEVEL_H263_60 0x19 -#define VEN_LEVEL_H263_70 0x1A +#define VEN_LEVEL_H264_3 0x11 +#define VEN_LEVEL_H264_3p1 0x12 +#define VEN_LEVEL_H264_4 0x13 + +#define VEN_LEVEL_H263_10 0x14 +#define VEN_LEVEL_H263_20 0x15 +#define VEN_LEVEL_H263_30 0x16 +#define VEN_LEVEL_H263_40 0x17 +#define VEN_LEVEL_H263_45 0x18 +#define VEN_LEVEL_H263_50 0x19 +#define VEN_LEVEL_H263_60 0x1A +#define VEN_LEVEL_H263_70 0x1B #define VEN_ENTROPY_MODEL_CAVLC 1 #define VEN_ENTROPY_MODEL_CABAC 2 @@ -123,17 +124,19 @@ #define VEN_RC_VBR_VFR 2 #define VEN_RC_VBR_CFR 3 #define VEN_RC_CBR_VFR 4 +#define VEN_RC_CBR_CFR 5 #define VEN_FLUSH_INPUT 1 #define VEN_FLUSH_OUTPUT 2 #define VEN_FLUSH_ALL 3 -#define VEN_INPUTFMT_NV12 1 -#define VEN_INPUTFMT_NV21 2 +#define VEN_INPUTFMT_NV12 1 +#define VEN_INPUTFMT_NV21 2 +#define VEN_INPUTFMT_NV12_16M2KA 3 -#define VEN_ROTATION_0 1 -#define VEN_ROTATION_90 2 -#define VEN_ROTATION_180 3 +#define VEN_ROTATION_0 1 +#define VEN_ROTATION_90 2 +#define VEN_ROTATION_180 3 #define VEN_ROTATION_270 4 #define VEN_TIMEOUT_INFINITE 0xffffffff @@ -147,8 +150,8 @@ #define VEN_IOCTLBASE_ENC 0x850 struct venc_ioctl_msg{ - void *inputparam; - void *outputparam; + void __user *in; + void __user *out; }; #define VEN_IOCTL_SET_INTF_VERSION _IOW(VEN_IOCTLBASE_NENC, 0, struct venc_ioctl_msg) @@ -189,6 +192,12 @@ struct venc_ioctl_msg{ #define VEN_IOCTL_CMD_STOP _IO(VEN_IOCTLBASE_NENC, 19) +#define VEN_IOCTL_SET_RECON_BUFFER _IOW(VEN_IOCTLBASE_NENC, 20, struct venc_ioctl_msg) + +#define VEN_IOCTL_FREE_RECON_BUFFER _IOW(VEN_IOCTLBASE_NENC, 21, struct venc_ioctl_msg) + +#define VEN_IOCTL_GET_RECON_BUFFER_SIZE _IOW(VEN_IOCTLBASE_NENC, 22, struct venc_ioctl_msg) + #define VEN_IOCTL_SET_BASE_CFG _IOW(VEN_IOCTLBASE_ENC, 1, struct venc_ioctl_msg) #define VEN_IOCTL_GET_BASE_CFG _IOR(VEN_IOCTLBASE_ENC, 2, struct venc_ioctl_msg) @@ -259,6 +268,8 @@ struct venc_ioctl_msg{ #define VEN_IOCTL_SET_QP_RANGE _IOW(VEN_IOCTLBASE_ENC, 44, struct venc_ioctl_msg) #define VEN_IOCTL_GET_QP_RANGE _IOR(VEN_IOCTLBASE_ENC, 45, struct venc_ioctl_msg) +#define VEN_IOCTL_GET_NUMBER_INSTANCES _IOR(VEN_IOCTLBASE_ENC, 46, struct venc_ioctl_msg) + struct venc_switch{ unsigned char status; }; @@ -275,7 +286,7 @@ struct venc_allocatorproperty{ struct venc_bufferpayload{ unsigned char *pbuffer; - unsigned long nsize; + size_t sz; int fd; unsigned int offset; unsigned int maped_size; @@ -284,7 +295,7 @@ struct venc_bufferpayload{ struct venc_buffer{ unsigned char *ptrbuffer; - unsigned long size; + unsigned long sz; unsigned long len; unsigned long offset; long long timestamp; @@ -322,6 +333,7 @@ struct venc_qprange{ }; struct venc_intraperiod{ unsigned long num_pframes; + unsigned long num_bframes; }; struct venc_seqheader{ unsigned char *hdrbufptr; @@ -398,5 +410,18 @@ struct venc_msg{ struct venc_buffer buf; unsigned long msgdata_size; }; -#endif +struct venc_recon_addr{ + unsigned long buffer_size; + unsigned long pmem_fd; + unsigned long offset; +}; + +struct venc_recon_buff_size{ + int width; + int height; + int size; + int alignment; +}; + +#endif |