#include <linux/module.h>
#include <linux/slab.h>
#include <media/videobuf2-dma-contig.h>
#include "../mtk_vcodec_dec.h"
#include "../../common/mtk_vcodec_intr.h"
#include "../vdec_drv_base.h"
#include "../vdec_drv_if.h"
#include "../vdec_vpu_if.h"
#define VDEC_HEVC_WRAP_SZ …
#define HEVC_MAX_MV_NUM …
#define GET_HEVC_VDEC_FLAG(cond, flag) …
#define GET_HEVC_VDEC_PARAM(param) …
enum vdec_hevc_core_dec_err_type { … };
struct mtk_hevc_dpb_info { … };
struct mtk_hevc_sps_param { … };
struct mtk_hevc_pps_param { … };
struct mtk_hevc_slice_header_param { … };
struct slice_api_hevc_scaling_matrix { … };
struct slice_hevc_dpb_entry { … };
struct slice_api_hevc_decode_param { … };
struct hevc_fb { … };
struct vdec_hevc_slice_lat_dec_param { … };
struct vdec_hevc_slice_info { … };
struct vdec_hevc_slice_mem { … };
struct vdec_hevc_slice_fb { … };
struct vdec_hevc_slice_vsi { … };
struct vdec_hevc_slice_share_info { … };
struct vdec_hevc_slice_inst { … };
static unsigned int vdec_hevc_get_mv_buf_size(unsigned int width, unsigned int height)
{ … }
static void *vdec_hevc_get_ctrl_ptr(struct mtk_vcodec_dec_ctx *ctx, int id)
{ … }
static void vdec_hevc_fill_dpb_info(struct mtk_vcodec_dec_ctx *ctx,
struct slice_api_hevc_decode_param *decode_params,
struct mtk_hevc_dpb_info *hevc_dpb_info)
{ … }
static void vdec_hevc_copy_sps_params(struct mtk_hevc_sps_param *dst_param,
const struct v4l2_ctrl_hevc_sps *src_param)
{ … }
static void vdec_hevc_copy_pps_params(struct mtk_hevc_pps_param *dst_param,
const struct v4l2_ctrl_hevc_pps *src_param)
{ … }
static void vdec_hevc_copy_scaling_matrix(struct slice_api_hevc_scaling_matrix *dst_matrix,
const struct v4l2_ctrl_hevc_scaling_matrix *src_matrix)
{ … }
static void
vdec_hevc_copy_decode_params(struct slice_api_hevc_decode_param *dst_param,
const struct v4l2_ctrl_hevc_decode_params *src_param,
const struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX])
{ … }
static int vdec_hevc_slice_fill_decode_parameters(struct vdec_hevc_slice_inst *inst,
struct vdec_hevc_slice_share_info *share_info)
{ … }
static void vdec_hevc_slice_fill_decode_reflist(struct vdec_hevc_slice_inst *inst,
struct vdec_hevc_slice_lat_dec_param *slice_param,
struct vdec_hevc_slice_share_info *share_info)
{ … }
static int vdec_hevc_slice_alloc_mv_buf(struct vdec_hevc_slice_inst *inst,
struct vdec_pic_info *pic)
{ … }
static void vdec_hevc_slice_free_mv_buf(struct vdec_hevc_slice_inst *inst)
{ … }
static void vdec_hevc_slice_get_pic_info(struct vdec_hevc_slice_inst *inst)
{ … }
static void vdec_hevc_slice_get_crop_info(struct vdec_hevc_slice_inst *inst,
struct v4l2_rect *cr)
{ … }
static int vdec_hevc_slice_setup_lat_buffer(struct vdec_hevc_slice_inst *inst,
struct mtk_vcodec_mem *bs,
struct vdec_lat_buf *lat_buf,
bool *res_chg)
{ … }
static int vdec_hevc_slice_setup_core_buffer(struct vdec_hevc_slice_inst *inst,
struct vdec_hevc_slice_share_info *share_info,
struct vdec_lat_buf *lat_buf)
{ … }
static int vdec_hevc_slice_init(struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void vdec_hevc_slice_deinit(void *h_vdec)
{ … }
static int vdec_hevc_slice_core_decode(struct vdec_lat_buf *lat_buf)
{ … }
static int vdec_hevc_slice_lat_decode(void *h_vdec, struct mtk_vcodec_mem *bs,
struct vdec_fb *fb, bool *res_chg)
{ … }
static int vdec_hevc_slice_decode(void *h_vdec, struct mtk_vcodec_mem *bs,
struct vdec_fb *unused, bool *res_chg)
{ … }
static int vdec_hevc_slice_get_param(void *h_vdec, enum vdec_get_param_type type,
void *out)
{ … }
const struct vdec_common_if vdec_hevc_slice_multi_if = …;