Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2016 MediaTek Inc.
4 * Author: PoChun Lin <pochun.lin@mediatek.com>
5 */
6
7#ifndef _VENC_VPU_IF_H_
8#define _VENC_VPU_IF_H_
9
10#include "venc_drv_if.h"
11
12/*
13 * struct venc_vpu_inst - encoder VPU driver instance
14 * @wq_hd: wait queue used for vpu cmd trigger then wait vpu interrupt done
15 * @signaled: flag used for checking vpu interrupt done
16 * @failure: flag to show vpu cmd succeeds or not
17 * @state: enum venc_ipi_msg_enc_state
18 * @bs_size: bitstream size for skip frame case usage
19 * @is_key_frm: key frame flag
20 * @inst_addr: VPU instance addr
21 * @vsi: driver structure allocated by VPU side and shared to AP side for
22 * control and info share
23 * @id: the id of inter-processor interrupt
24 * @ctx: context for v4l2 layer integration
25 * @dev: device for v4l2 layer integration
26 */
27struct venc_vpu_inst {
28 wait_queue_head_t wq_hd;
29 int signaled;
30 int failure;
31 int state;
32 int bs_size;
33 int is_key_frm;
34 unsigned int inst_addr;
35 void *vsi;
36 int id;
37 struct mtk_vcodec_enc_ctx *ctx;
38};
39
40int vpu_enc_init(struct venc_vpu_inst *vpu);
41int vpu_enc_set_param(struct venc_vpu_inst *vpu,
42 enum venc_set_param_type id,
43 struct venc_enc_param *param);
44int vpu_enc_encode(struct venc_vpu_inst *vpu, unsigned int bs_mode,
45 struct venc_frm_buf *frm_buf,
46 struct mtk_vcodec_mem *bs_buf,
47 struct venc_frame_info *frame_info);
48int vpu_enc_deinit(struct venc_vpu_inst *vpu);
49
50#endif