| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2016 MediaTek Inc. |
|---|
| 3 | 4 | * Author: Daniel Hsiao <daniel.hsiao@mediatek.com> |
|---|
| 4 | 5 | * Jungchang Tsao <jungchang.tsao@mediatek.com> |
|---|
| 5 | 6 | * 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. |
|---|
| 16 | 7 | */ |
|---|
| 17 | 8 | |
|---|
| 18 | 9 | #ifndef _VENC_DRV_IF_H_ |
|---|
| .. | .. |
|---|
| 101 | 92 | unsigned int gop_size; |
|---|
| 102 | 93 | }; |
|---|
| 103 | 94 | |
|---|
| 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 | + |
|---|
| 104 | 108 | /* |
|---|
| 105 | 109 | * struct venc_frm_buf - frame buffer information used in venc_if_encode() |
|---|
| 106 | 110 | * @fb_addr: plane frame buffer addresses |
|---|
| 107 | 111 | */ |
|---|
| 108 | 112 | 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]; |
|---|
| 110 | 114 | }; |
|---|
| 111 | 115 | |
|---|
| 112 | 116 | /* |
|---|
| .. | .. |
|---|
| 119 | 123 | bool is_key_frm; |
|---|
| 120 | 124 | }; |
|---|
| 121 | 125 | |
|---|
| 126 | +extern const struct venc_common_if venc_h264_if; |
|---|
| 127 | +extern const struct venc_common_if venc_vp8_if; |
|---|
| 128 | + |
|---|
| 122 | 129 | /* |
|---|
| 123 | 130 | * venc_if_init - Create the driver handle |
|---|
| 124 | 131 | * @ctx: device context |
|---|