summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--drivers/amvdec_ports/aml_vcodec_adapt.c2
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec.c100
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec.h10
-rw-r--r--drivers/amvdec_ports/aml_vcodec_drv.h68
-rw-r--r--drivers/amvdec_ports/aml_vcodec_vfm.c11
-rw-r--r--drivers/amvdec_ports/aml_vcodec_vfm.h1
-rw-r--r--drivers/amvdec_ports/decoder/aml_h264_parser.c23
-rw-r--r--drivers/amvdec_ports/decoder/vdec_h264_if.c148
-rw-r--r--drivers/amvdec_ports/decoder/vdec_hevc_if.c143
-rw-r--r--drivers/amvdec_ports/decoder/vdec_mjpeg_if.c8
-rw-r--r--drivers/amvdec_ports/decoder/vdec_mpeg12_if.c8
-rw-r--r--drivers/amvdec_ports/decoder/vdec_mpeg4_if.c8
-rw-r--r--drivers/amvdec_ports/decoder/vdec_vp9_if.c207
-rw-r--r--drivers/amvdec_ports/vdec_drv_if.h7
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c57
-rw-r--r--drivers/frame_provider/decoder/h265/vh265.c34
-rw-r--r--drivers/frame_provider/decoder/mjpeg/vmjpeg_multi.c14
-rw-r--r--drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c14
-rw-r--r--drivers/frame_provider/decoder/mpeg4/vmpeg4_multi.c14
-rw-r--r--drivers/frame_provider/decoder/utils/vdec_v4l2_buffer_ops.c22
-rw-r--r--drivers/frame_provider/decoder/utils/vdec_v4l2_buffer_ops.h8
-rw-r--r--drivers/frame_provider/decoder/vp9/vvp9.c37
22 files changed, 580 insertions, 364 deletions
diff --git a/drivers/amvdec_ports/aml_vcodec_drv.h b/drivers/amvdec_ports/aml_vcodec_drv.h
index 21a1ab2..fb1930e 100644
--- a/drivers/amvdec_ports/aml_vcodec_drv.h
+++ b/drivers/amvdec_ports/aml_vcodec_drv.h
@@ -38,6 +38,26 @@
#define AML_V4L2_BENCHMARK 0
#define WAIT_INTR_TIMEOUT_MS 1000
+/* codec types of get/set parms. */
+#define V4L2_CONFIG_PARM_ENCODE (0)
+#define V4L2_CONFIG_PARM_DECODE (1)
+
+/* types of decode parms. */
+#define V4L2_CONFIG_PARM_DECODE_CFGINFO (1 << 0)
+#define V4L2_CONFIG_PARM_DECODE_PSINFO (1 << 1)
+#define V4L2_CONFIG_PARM_DECODE_HDRINFO (1 << 2)
+#define V4L2_CONFIG_PARM_DECODE_CNTINFO (1 << 3)
+
+/* amlogic event define. */
+/* #define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0) */
+#define V4L2_EVENT_SRC_CH_HDRINFO (1 << 1)
+#define V4L2_EVENT_SRC_CH_PSINFO (1 << 2)
+#define V4L2_EVENT_SRC_CH_CNTINFO (1 << 3)
+
+/* exception handing */
+#define V4L2_EVENT_REQUEST_RESET (1 << 8)
+#define V4L2_EVENT_REQUEST_EXIT (1 << 9)
+
/**
* enum aml_hw_reg_idx - AML hw register base index
*/
@@ -234,14 +254,15 @@ struct vdec_pic_info {
unsigned int c_bs_sz;
unsigned int y_len_sz;
unsigned int c_len_sz;
+ int profile_idc;
};
-struct aml_vdec_pic_infos {
- u32 visible_width;
- u32 visible_height;
- u32 coded_width;
- u32 coded_height;
- u32 dpb_size;
+struct aml_vdec_cfg_infos {
+ u32 double_write_mode;
+ u32 init_width;
+ u32 init_height;
+ u32 ref_buf_margin;
+ u32 block_mode;
};
struct aml_vdec_hdr_infos {
@@ -265,16 +286,33 @@ struct aml_vdec_hdr_infos {
struct vframe_master_display_colour_s color_parms;
};
+struct aml_vdec_ps_infos {
+ u32 visible_width;
+ u32 visible_height;
+ u32 coded_width;
+ u32 coded_height;
+ u32 profile;
+ u32 mb_width;
+ u32 mb_height;
+ u32 dpb_size;
+ u32 ref_frames;
+ u32 reorder_frames;
+};
+
+struct aml_vdec_cnt_infos {
+ u32 bit_rate;
+ u32 frame_count;
+ u32 error_frame_count;
+ u32 drop_frame_count;
+ u32 total_data;
+};
+
struct aml_dec_params {
- u32 dec_parms_status;
- u32 es_need_header;
- u32 double_write_mode;
- u32 buffer_mode;
- u32 buffer_width;
- u32 buffer_height;
- u32 buffer_margin;
- struct aml_vdec_pic_infos pic;
- struct aml_vdec_hdr_infos hdr;
+ u32 parms_status;
+ struct aml_vdec_cfg_infos cfg;
+ struct aml_vdec_ps_infos ps;
+ struct aml_vdec_hdr_infos hdr;
+ struct aml_vdec_cnt_infos cnt;
};
struct v4l2_config_parm {