brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · f6abb93 Raw
47 lines · c
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 12struct vdec_common_if {13	/**14	 * (*init)() - initialize decode driver15	 * @ctx     : [in] mtk v4l2 context16	 * @h_vdec  : [out] driver handle17	 */18	int (*init)(struct mtk_vcodec_dec_ctx *ctx);19 20	/**21	 * (*decode)() - trigger decode22	 * @h_vdec  : [in] driver handle23	 * @bs      : [in] input bitstream24	 * @fb      : [in] frame buffer to store decoded frame25	 * @res_chg : [out] resolution change happen26	 */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 parameter32	 * @h_vdec : [in] driver handle33	 * @type   : [in] input parameter type34	 * @out    : [out] buffer to store query result35	 */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 deinit42	 */43	void (*deinit)(void *h_vdec);44};45 46#endif47