.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2016 MediaTek Inc. |
---|
3 | 4 | * Author: PC Chen <pc.chen@mediatek.com> |
---|
4 | 5 | * Tiffany Lin <tiffany.lin@mediatek.com> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
16 | 8 | #ifndef _MTK_VCODEC_DEC_H_ |
---|
17 | 9 | #define _MTK_VCODEC_DEC_H_ |
---|
18 | 10 | |
---|
19 | 11 | #include <media/videobuf2-core.h> |
---|
20 | | -#include <media/videobuf2-v4l2.h> |
---|
| 12 | +#include <media/v4l2-mem2mem.h> |
---|
21 | 13 | |
---|
22 | 14 | #define VCODEC_CAPABILITY_4K_DISABLED 0x10 |
---|
23 | 15 | #define VCODEC_DEC_4K_CODED_WIDTH 4096U |
---|
.. | .. |
---|
41 | 33 | |
---|
42 | 34 | /** |
---|
43 | 35 | * struct mtk_video_dec_buf - Private data related to each VB2 buffer. |
---|
44 | | - * @b: VB2 buffer |
---|
| 36 | + * @m2m_buf: M2M buffer |
---|
45 | 37 | * @list: link list |
---|
46 | 38 | * @used: Capture buffer contain decoded frame data and keep in |
---|
47 | 39 | * codec data structure |
---|
48 | | - * @ready_to_display: Capture buffer not display yet |
---|
49 | 40 | * @queued_in_vb2: Capture buffer is queue in vb2 |
---|
50 | 41 | * @queued_in_v4l2: Capture buffer is in v4l2 driver, but not in vb2 |
---|
51 | 42 | * queue yet |
---|
.. | .. |
---|
56 | 47 | * Note : These status information help us track and debug buffer state |
---|
57 | 48 | */ |
---|
58 | 49 | struct mtk_video_dec_buf { |
---|
59 | | - struct vb2_v4l2_buffer vb; |
---|
60 | | - struct list_head list; |
---|
| 50 | + struct v4l2_m2m_buffer m2m_buf; |
---|
61 | 51 | |
---|
62 | 52 | bool used; |
---|
63 | | - bool ready_to_display; |
---|
64 | 53 | bool queued_in_vb2; |
---|
65 | 54 | bool queued_in_v4l2; |
---|
66 | 55 | bool lastframe; |
---|