2019-06-04 09:37:33 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2016-09-02 12:19:54 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 MediaTek Inc.
|
|
|
|
* Author: PC Chen <pc.chen@mediatek.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _VDEC_DRV_BASE_
|
|
|
|
#define _VDEC_DRV_BASE_
|
|
|
|
|
|
|
|
#include "mtk_vcodec_drv.h"
|
|
|
|
|
2016-09-02 12:20:00 +00:00
|
|
|
#include "vdec_drv_if.h"
|
2016-09-02 12:19:54 +00:00
|
|
|
|
|
|
|
struct vdec_common_if {
|
|
|
|
/**
|
|
|
|
* (*init)() - initialize decode driver
|
|
|
|
* @ctx : [in] mtk v4l2 context
|
|
|
|
* @h_vdec : [out] driver handle
|
|
|
|
*/
|
2019-06-14 07:56:21 +00:00
|
|
|
int (*init)(struct mtk_vcodec_ctx *ctx);
|
2016-09-02 12:19:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* (*decode)() - trigger decode
|
|
|
|
* @h_vdec : [in] driver handle
|
|
|
|
* @bs : [in] input bitstream
|
|
|
|
* @fb : [in] frame buffer to store decoded frame
|
|
|
|
* @res_chg : [out] resolution change happen
|
|
|
|
*/
|
2019-06-14 07:56:21 +00:00
|
|
|
int (*decode)(void *h_vdec, struct mtk_vcodec_mem *bs,
|
2016-09-02 12:19:54 +00:00
|
|
|
struct vdec_fb *fb, bool *res_chg);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* (*get_param)() - get driver's parameter
|
|
|
|
* @h_vdec : [in] driver handle
|
|
|
|
* @type : [in] input parameter type
|
|
|
|
* @out : [out] buffer to store query result
|
|
|
|
*/
|
2019-06-14 07:56:21 +00:00
|
|
|
int (*get_param)(void *h_vdec, enum vdec_get_param_type type,
|
2016-09-02 12:19:54 +00:00
|
|
|
void *out);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* (*deinit)() - deinitialize driver.
|
|
|
|
* @h_vdec : [in] driver handle to be deinit
|
|
|
|
*/
|
2019-06-14 07:56:21 +00:00
|
|
|
void (*deinit)(void *h_vdec);
|
2016-09-02 12:19:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|