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 "mtk_vcodec_drv.h"
12 #include "vdec_drv_if.h"
14 struct vdec_common_if
{
16 * (*init)() - initialize decode driver
17 * @ctx : [in] mtk v4l2 context
18 * @h_vdec : [out] driver handle
20 int (*init
)(struct mtk_vcodec_ctx
*ctx
);
23 * (*decode)() - trigger decode
24 * @h_vdec : [in] driver handle
25 * @bs : [in] input bitstream
26 * @fb : [in] frame buffer to store decoded frame
27 * @res_chg : [out] resolution change happen
29 int (*decode
)(void *h_vdec
, struct mtk_vcodec_mem
*bs
,
30 struct vdec_fb
*fb
, bool *res_chg
);
33 * (*get_param)() - get driver's parameter
34 * @h_vdec : [in] driver handle
35 * @type : [in] input parameter type
36 * @out : [out] buffer to store query result
38 int (*get_param
)(void *h_vdec
, enum vdec_get_param_type type
,
42 * (*deinit)() - deinitialize driver.
43 * @h_vdec : [in] driver handle to be deinit
45 void (*deinit
)(void *h_vdec
);