aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshray kulkarni <ashrayk@codeaurora.org>2010-10-19 20:08:54 -0700
committerLinux Build Service Account <lnxbuild@localhost>2010-12-06 15:12:19 -0700
commitc1fb906afb4e627ca8cf49b177380d082ae52e26 (patch)
treea1ec2eeb86894453a93d814b250f0ce3c547f101
parentfc8ccc47f0e15beffc3d6d8a4c8874316a4fa98d (diff)
downloadandroid_bionic-c1fb906afb4e627ca8cf49b177380d082ae52e26.tar.gz
android_bionic-c1fb906afb4e627ca8cf49b177380d082ae52e26.tar.bz2
android_bionic-c1fb906afb4e627ca8cf49b177380d082ae52e26.zip
vidc: Move allocation of h264 mv buffers and reconstruction buffers to userspace
Change-Id: I2bf573b122648b9b5b4197163b233db6fbde3a70
-rwxr-xr-xlibc/kernel/common/linux/msm_vidc_dec.h20
-rw-r--r--libc/kernel/common/linux/msm_vidc_enc.h82
2 files changed, 71 insertions, 31 deletions
diff --git a/libc/kernel/common/linux/msm_vidc_dec.h b/libc/kernel/common/linux/msm_vidc_dec.h
index c33cc80eb..47ea37f97 100755
--- a/libc/kernel/common/linux/msm_vidc_dec.h
+++ b/libc/kernel/common/linux/msm_vidc_dec.h
@@ -140,6 +140,12 @@ 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,
@@ -473,4 +479,18 @@ struct vdec_framerate {
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 0d8084f1c..36bf74146 100644
--- a/libc/kernel/common/linux/msm_vidc_enc.h
+++ b/libc/kernel/common/linux/msm_vidc_enc.h
@@ -74,35 +74,35 @@
#define VEN_PROFILE_H264_HIGH 5
#define VEN_PROFILE_H263_BASELINE 6
-#define VEN_LEVEL_MPEG4_0 0x1
-#define VEN_LEVEL_MPEG4_1 0x2
-#define VEN_LEVEL_MPEG4_2 0x3
-#define VEN_LEVEL_MPEG4_3 0x4
-#define VEN_LEVEL_MPEG4_4 0x5
-#define VEN_LEVEL_MPEG4_5 0x6
-#define VEN_LEVEL_MPEG4_3b 0x7
-#define VEN_LEVEL_MPEG4_6 0x8
-
-#define VEN_LEVEL_H264_1 0x9
-#define VEN_LEVEL_H264_1b 0xA
-#define VEN_LEVEL_H264_1p1 0xB
-#define VEN_LEVEL_H264_1p2 0xC
-#define VEN_LEVEL_H264_1p3 0xD
-#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_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_LEVEL_MPEG4_0 0x1
+#define VEN_LEVEL_MPEG4_1 0x2
+#define VEN_LEVEL_MPEG4_2 0x3
+#define VEN_LEVEL_MPEG4_3 0x4
+#define VEN_LEVEL_MPEG4_4 0x5
+#define VEN_LEVEL_MPEG4_5 0x6
+#define VEN_LEVEL_MPEG4_3b 0x7
+#define VEN_LEVEL_MPEG4_6 0x8
+
+#define VEN_LEVEL_H264_1 0x9
+#define VEN_LEVEL_H264_1b 0xA
+#define VEN_LEVEL_H264_1p1 0xB
+#define VEN_LEVEL_H264_1p2 0xC
+#define VEN_LEVEL_H264_1p3 0xD
+#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_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
@@ -131,8 +131,8 @@
#define VEN_FLUSH_ALL 3
#define VEN_INPUTFMT_NV12 1
-#define VEN_INPUTFMT_NV21 2
-#define VEN_INPUTFMT_NV12_16M2KA 3
+#define VEN_INPUTFMT_NV21 2
+#define VEN_INPUTFMT_NV12_16M2KA 3
#define VEN_ROTATION_0 1
#define VEN_ROTATION_90 2
@@ -192,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)
@@ -401,4 +407,18 @@ struct venc_msg{
struct venc_buffer buf;
unsigned long msgdata_size;
};
+
+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