1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (c) 2016 MediaTek Inc. 4 * Author: PC Chen <pc.chen@mediatek.com> 5 */ 6 7 #ifndef _VDEC_DRV_BASE_ 8 #define _VDEC_DRV_BASE_ 9 10 #include "vdec_drv_if.h" 11 12 struct vdec_common_if { 13 /** 14 * (*init)() - initialize decode driver 15 * @ctx : [in] mtk v4l2 context 16 * @h_vdec : [out] driver handle 17 */ 18 int (*init)(struct mtk_vcodec_ctx *ctx); 19 20 /** 21 * (*decode)() - trigger decode 22 * @h_vdec : [in] driver handle 23 * @bs : [in] input bitstream 24 * @fb : [in] frame buffer to store decoded frame 25 * @res_chg : [out] resolution change happen 26 */ 27 int (*decode)(void *h_vdec, struct mtk_vcodec_mem *bs, 28 struct vdec_fb *fb, bool *res_chg); 29 30 /** 31 * (*get_param)() - get driver's parameter 32 * @h_vdec : [in] driver handle 33 * @type : [in] input parameter type 34 * @out : [out] buffer to store query result 35 */ 36 int (*get_param)(void *h_vdec, enum vdec_get_param_type type, 37 void *out); 38 39 /** 40 * (*deinit)() - deinitialize driver. 41 * @h_vdec : [in] driver handle to be deinit 42 */ 43 void (*deinit)(void *h_vdec); 44 }; 45 46 #endif 47