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 { |