forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/media/platform/mtk-vcodec/venc_drv_if.h
....@@ -1,18 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Copyright (c) 2016 MediaTek Inc.
34 * Author: Daniel Hsiao <daniel.hsiao@mediatek.com>
45 * Jungchang Tsao <jungchang.tsao@mediatek.com>
56 * Tiffany Lin <tiffany.lin@mediatek.com>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
167 */
178
189 #ifndef _VENC_DRV_IF_H_
....@@ -101,12 +92,25 @@
10192 unsigned int gop_size;
10293 };
10394
95
+/**
96
+ * struct venc_frame_info - per-frame information to pass to the firmware.
97
+ *
98
+ * @frm_count: sequential number for this frame
99
+ * @skip_frm_count: number of frames skipped so far while decoding
100
+ * @frm_type: type of the frame, from enum venc_h264_frame_type
101
+ */
102
+struct venc_frame_info {
103
+ unsigned int frm_count; /* per frame update */
104
+ unsigned int skip_frm_count; /* per frame update */
105
+ unsigned int frm_type; /* per frame update */
106
+};
107
+
104108 /*
105109 * struct venc_frm_buf - frame buffer information used in venc_if_encode()
106110 * @fb_addr: plane frame buffer addresses
107111 */
108112 struct venc_frm_buf {
109
- struct mtk_vcodec_mem fb_addr[MTK_VCODEC_MAX_PLANES];
113
+ struct mtk_vcodec_fb fb_addr[MTK_VCODEC_MAX_PLANES];
110114 };
111115
112116 /*
....@@ -119,6 +123,9 @@
119123 bool is_key_frm;
120124 };
121125
126
+extern const struct venc_common_if venc_h264_if;
127
+extern const struct venc_common_if venc_vp8_if;
128
+
122129 /*
123130 * venc_if_init - Create the driver handle
124131 * @ctx: device context