1
2
3
4
5
6
7
8 #ifndef _MTK_VCODEC_ENC_H_
9 #define _MTK_VCODEC_ENC_H_
10
11 #include <media/videobuf2-core.h>
12 #include <media/videobuf2-v4l2.h>
13
14 #define MTK_VENC_IRQ_STATUS_SPS 0x1
15 #define MTK_VENC_IRQ_STATUS_PPS 0x2
16 #define MTK_VENC_IRQ_STATUS_FRM 0x4
17 #define MTK_VENC_IRQ_STATUS_DRAM 0x8
18 #define MTK_VENC_IRQ_STATUS_PAUSE 0x10
19 #define MTK_VENC_IRQ_STATUS_SWITCH 0x20
20
21 #define MTK_VENC_IRQ_STATUS_OFFSET 0x05C
22 #define MTK_VENC_IRQ_ACK_OFFSET 0x060
23
24
25
26
27
28
29
30
31
32 struct mtk_video_enc_buf {
33 struct vb2_v4l2_buffer vb;
34 struct list_head list;
35 u32 param_change;
36 struct mtk_enc_params enc_params;
37 };
38
39 extern const struct v4l2_ioctl_ops mtk_venc_ioctl_ops;
40 extern const struct v4l2_m2m_ops mtk_venc_m2m_ops;
41
42 int mtk_venc_unlock(struct mtk_vcodec_ctx *ctx);
43 int mtk_venc_lock(struct mtk_vcodec_ctx *ctx);
44 int mtk_vcodec_enc_queue_init(void *priv, struct vb2_queue *src_vq,
45 struct vb2_queue *dst_vq);
46 void mtk_vcodec_enc_release(struct mtk_vcodec_ctx *ctx);
47 int mtk_vcodec_enc_ctrls_setup(struct mtk_vcodec_ctx *ctx);
48 void mtk_vcodec_enc_set_default_params(struct mtk_vcodec_ctx *ctx);
49
50 #endif