1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2016 MediaTek Inc.
4 * Author: PC Chen <pc.chen@mediatek.com>
7 #ifndef _VDEC_DRV_BASE_
8 #define _VDEC_DRV_BASE_
10 #include "vdec_drv_if.h"
12 struct vdec_common_if
{
14 * (*init)() - initialize decode driver
15 * @ctx : [in] mtk v4l2 context
16 * @h_vdec : [out] driver handle
18 int (*init
)(struct mtk_vcodec_ctx
*ctx
);
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
27 int (*decode
)(void *h_vdec
, struct mtk_vcodec_mem
*bs
,
28 struct vdec_fb
*fb
, bool *res_chg
);
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
36 int (*get_param
)(void *h_vdec
, enum vdec_get_param_type type
,
40 * (*deinit)() - deinitialize driver.
41 * @h_vdec : [in] driver handle to be deinit
43 void (*deinit
)(void *h_vdec
);