FFmpeg
libavcodec
vvc.h
Go to the documentation of this file.
1
/*
2
* H.266 / VVC shared code
3
*
4
* This file is part of FFmpeg.
5
*
6
* FFmpeg is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* FFmpeg is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with FFmpeg; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef AVCODEC_VVC_H
22
#define AVCODEC_VVC_H
23
24
/**
25
* Table 5 – NAL unit type codes and NAL unit type classes
26
* in T-REC-H.266-202008
27
*/
28
enum
VVCNALUnitType
{
29
VVC_TRAIL_NUT
= 0,
30
VVC_STSA_NUT
= 1,
31
VVC_RADL_NUT
= 2,
32
VVC_RASL_NUT
= 3,
33
VVC_RSV_VCL_4
= 4,
34
VVC_RSV_VCL_5
= 5,
35
VVC_RSV_VCL_6
= 6,
36
VVC_IDR_W_RADL
= 7,
37
VVC_IDR_N_LP
= 8,
38
VVC_CRA_NUT
= 9,
39
VVC_GDR_NUT
= 10,
40
VVC_RSV_IRAP_11
= 11,
41
VVC_OPI_NUT
= 12,
42
VVC_DCI_NUT
= 13,
43
VVC_VPS_NUT
= 14,
44
VVC_SPS_NUT
= 15,
45
VVC_PPS_NUT
= 16,
46
VVC_PREFIX_APS_NUT
= 17,
47
VVC_SUFFIX_APS_NUT
= 18,
48
VVC_PH_NUT
= 19,
49
VVC_AUD_NUT
= 20,
50
VVC_EOS_NUT
= 21,
51
VVC_EOB_NUT
= 22,
52
VVC_PREFIX_SEI_NUT
= 23,
53
VVC_SUFFIX_SEI_NUT
= 24,
54
VVC_FD_NUT
= 25,
55
VVC_RSV_NVCL_26
= 26,
56
VVC_RSV_NVCL_27
= 27,
57
VVC_UNSPEC_28
= 28,
58
VVC_UNSPEC_29
= 29,
59
VVC_UNSPEC_30
= 30,
60
VVC_UNSPEC_31
= 31,
61
};
62
63
enum
VVCSliceType
{
64
VVC_SLICE_TYPE_B
= 0,
65
VVC_SLICE_TYPE_P
= 1,
66
VVC_SLICE_TYPE_I
= 2,
67
};
68
69
enum
VVCAPSType
{
70
VVC_ASP_TYPE_ALF
= 0,
71
VVC_ASP_TYPE_LMCS
= 1,
72
VVC_ASP_TYPE_SCALING
= 2,
73
};
74
75
enum
{
76
//6.2 we can have 3 sample arrays
77
VVC_MAX_SAMPLE_ARRAYS
= 3,
78
79
//7.4.3.3 vps_max_layers_minus1 is u(6)
80
VVC_MAX_LAYERS
= 64,
81
82
//7.4.3.3 The value of vps_max_sublayers_minus1 shall be in the range of 0 to 6, inclusive
83
VVC_MAX_SUBLAYERS
= 7,
84
85
//7.3.2.1 dci_num_ptls_minus1 is u(4)
86
VVC_MAX_DCI_PTLS
= 16,
87
88
//7.4.3.3 vps_num_ptls_minus1 is u(8)
89
VVC_MAX_PTLS
= 256,
90
91
//7.4.3.3 vps_num_output_layer_sets_minus2 is u(8)
92
VVC_MAX_TOTAL_NUM_OLSS
= 257,
93
94
// 7.3.2.3: vps_video_parameter_set_id is u(4).
95
VVC_MAX_VPS_COUNT
= 16,
96
// 7.3.2.4: sps_seq_parameter_set_id is u(4)
97
VVC_MAX_SPS_COUNT
= 16,
98
// 7.3.2.5: pps_pic_parameter_set_id is u(6)
99
VVC_MAX_PPS_COUNT
= 64,
100
101
// 7.4.4.1: ptl_num_sub_profiles is u(8)
102
VVC_MAX_SUB_PROFILES
= 256,
103
104
// 7.4.3.18: The variable NumAlfFilters specifying the number of different adaptive loop
105
// filters is set equal to 25.
106
VVC_NUM_ALF_FILTERS
= 25,
107
108
// A.4.2: according to (1577), MaxDpbSize is bounded above by 2 * maxDpbPicBuf(8)
109
VVC_MAX_DPB_SIZE
= 16,
110
111
//7.4.3.4 sps_num_ref_pic_lists in range [0, 64]
112
VVC_MAX_REF_PIC_LISTS
= 64,
113
114
//7.4.11 num_ref_entries in range [0, MaxDpbSize + 13]
115
VVC_MAX_REF_ENTRIES
=
VVC_MAX_DPB_SIZE
+ 13,
116
117
//7.4.3.3 sps_num_points_in_qp_table_minus1[i] in range [0, 36 − sps_qp_table_start_minus26[i]],
118
//and sps_qp_table_start_minus26[i] in range [−26 − QpBdOffset, 36].
119
//so sps_num_points_in_qp_table_minus1[i] should in range [0, 62 + QpBdOffset]
120
//since 16 bits QpBdOffset is 48, sps_num_points_in_qp_table_minus1[i] should range [0, 110]
121
VVC_MAX_POINTS_IN_QP_TABLE
= 111,
122
123
// 7.4.6.1: hrd_cpb_cnt_minus1 is in [0, 31].
124
VVC_MAX_CPB_CNT
= 32,
125
126
// A.4.1: the highest level allows a MaxLumaPs of 80,216,064.
127
VVC_MAX_LUMA_PS
= 80216064,
128
129
// A.4.1: pic_width_in_luma_samples and pic_height_in_luma_samples are
130
// constrained to be not greater than sqrt(MaxLumaPs * 8). Hence height/
131
// width are bounded above by sqrt(8 * 80216064) = 25332.4 samples.
132
VVC_MAX_WIDTH
= 25332,
133
VVC_MAX_HEIGHT
= 25332,
134
135
// A.4.1: table A.2 allows at most 990 tiles per AU for any level.
136
VVC_MAX_TILES_PER_AU
= 990,
137
// A.4.1: table A.2 did not define max tile rows.
138
// in worest a case, we can have 1x990 tiles picture.
139
VVC_MAX_TILE_ROWS
=
VVC_MAX_TILES_PER_AU
,
140
// A.4.1: table A.2 allows at most 30 tile columns for any level.
141
VVC_MAX_TILE_COLUMNS
= 30,
142
143
// A.4.1 table A.2 allows at most 1000 slices for any level.
144
VVC_MAX_SLICES
= 1000,
145
146
// 7.4.8: in the worst case (!pps_no_pic_partition_flag and
147
// sps_entropy_coding_sync_enabled_flag are both true), entry points can be
148
// placed at the beginning of every Ctb row in every tile, giving an
149
// upper bound of (num_tile_columns_minus1 + 1) * PicHeightInCtbsY - 1.
150
// Only a stream with very high resolution and perverse parameters could
151
// get near that, though, so set a lower limit here with the maximum
152
// possible value for 8K video (at most 135 32x32 Ctb rows).
153
VVC_MAX_ENTRY_POINTS
=
VVC_MAX_TILE_COLUMNS
* 135,
154
155
// {sps, ph}_num_{ver, hor}_virtual_boundaries should in [0, 3]
156
VVC_MAX_VBS
= 3,
157
};
158
159
#endif
/* AVCODEC_VVC_H */
VVC_RADL_NUT
@ VVC_RADL_NUT
Definition:
vvc.h:31
VVC_RASL_NUT
@ VVC_RASL_NUT
Definition:
vvc.h:32
VVC_GDR_NUT
@ VVC_GDR_NUT
Definition:
vvc.h:39
VVC_STSA_NUT
@ VVC_STSA_NUT
Definition:
vvc.h:30
VVC_MAX_TILE_COLUMNS
@ VVC_MAX_TILE_COLUMNS
Definition:
vvc.h:141
VVC_MAX_TILE_ROWS
@ VVC_MAX_TILE_ROWS
Definition:
vvc.h:139
VVC_DCI_NUT
@ VVC_DCI_NUT
Definition:
vvc.h:42
VVC_RSV_NVCL_27
@ VVC_RSV_NVCL_27
Definition:
vvc.h:56
VVC_AUD_NUT
@ VVC_AUD_NUT
Definition:
vvc.h:49
VVC_RSV_VCL_4
@ VVC_RSV_VCL_4
Definition:
vvc.h:33
VVC_MAX_PPS_COUNT
@ VVC_MAX_PPS_COUNT
Definition:
vvc.h:99
VVC_MAX_DPB_SIZE
@ VVC_MAX_DPB_SIZE
Definition:
vvc.h:109
VVC_ASP_TYPE_ALF
@ VVC_ASP_TYPE_ALF
Definition:
vvc.h:70
VVC_MAX_SPS_COUNT
@ VVC_MAX_SPS_COUNT
Definition:
vvc.h:97
VVCAPSType
VVCAPSType
Definition:
vvc.h:69
VVCNALUnitType
VVCNALUnitType
Table 5 – NAL unit type codes and NAL unit type classes in T-REC-H.266-202008.
Definition:
vvc.h:28
VVC_RSV_NVCL_26
@ VVC_RSV_NVCL_26
Definition:
vvc.h:55
VVC_MAX_WIDTH
@ VVC_MAX_WIDTH
Definition:
vvc.h:132
VVC_IDR_W_RADL
@ VVC_IDR_W_RADL
Definition:
vvc.h:36
VVC_MAX_DCI_PTLS
@ VVC_MAX_DCI_PTLS
Definition:
vvc.h:86
VVC_EOS_NUT
@ VVC_EOS_NUT
Definition:
vvc.h:50
VVC_MAX_SAMPLE_ARRAYS
@ VVC_MAX_SAMPLE_ARRAYS
Definition:
vvc.h:77
VVC_MAX_TOTAL_NUM_OLSS
@ VVC_MAX_TOTAL_NUM_OLSS
Definition:
vvc.h:92
VVC_MAX_REF_ENTRIES
@ VVC_MAX_REF_ENTRIES
Definition:
vvc.h:115
VVC_MAX_CPB_CNT
@ VVC_MAX_CPB_CNT
Definition:
vvc.h:124
VVC_MAX_HEIGHT
@ VVC_MAX_HEIGHT
Definition:
vvc.h:133
VVC_UNSPEC_29
@ VVC_UNSPEC_29
Definition:
vvc.h:58
VVC_SLICE_TYPE_P
@ VVC_SLICE_TYPE_P
Definition:
vvc.h:65
VVC_PREFIX_SEI_NUT
@ VVC_PREFIX_SEI_NUT
Definition:
vvc.h:52
VVC_SLICE_TYPE_B
@ VVC_SLICE_TYPE_B
Definition:
vvc.h:64
VVC_ASP_TYPE_LMCS
@ VVC_ASP_TYPE_LMCS
Definition:
vvc.h:71
VVC_SLICE_TYPE_I
@ VVC_SLICE_TYPE_I
Definition:
vvc.h:66
VVC_PH_NUT
@ VVC_PH_NUT
Definition:
vvc.h:48
VVC_MAX_PTLS
@ VVC_MAX_PTLS
Definition:
vvc.h:89
VVC_NUM_ALF_FILTERS
@ VVC_NUM_ALF_FILTERS
Definition:
vvc.h:106
VVC_MAX_POINTS_IN_QP_TABLE
@ VVC_MAX_POINTS_IN_QP_TABLE
Definition:
vvc.h:121
VVC_RSV_VCL_6
@ VVC_RSV_VCL_6
Definition:
vvc.h:35
VVC_VPS_NUT
@ VVC_VPS_NUT
Definition:
vvc.h:43
VVC_UNSPEC_30
@ VVC_UNSPEC_30
Definition:
vvc.h:59
VVC_RSV_VCL_5
@ VVC_RSV_VCL_5
Definition:
vvc.h:34
VVC_TRAIL_NUT
@ VVC_TRAIL_NUT
Definition:
vvc.h:29
VVC_SPS_NUT
@ VVC_SPS_NUT
Definition:
vvc.h:44
VVC_MAX_ENTRY_POINTS
@ VVC_MAX_ENTRY_POINTS
Definition:
vvc.h:153
VVC_MAX_REF_PIC_LISTS
@ VVC_MAX_REF_PIC_LISTS
Definition:
vvc.h:112
VVCSliceType
VVCSliceType
Definition:
vvc.h:63
VVC_UNSPEC_28
@ VVC_UNSPEC_28
Definition:
vvc.h:57
VVC_UNSPEC_31
@ VVC_UNSPEC_31
Definition:
vvc.h:60
VVC_SUFFIX_SEI_NUT
@ VVC_SUFFIX_SEI_NUT
Definition:
vvc.h:53
VVC_IDR_N_LP
@ VVC_IDR_N_LP
Definition:
vvc.h:37
VVC_MAX_VBS
@ VVC_MAX_VBS
Definition:
vvc.h:156
VVC_RSV_IRAP_11
@ VVC_RSV_IRAP_11
Definition:
vvc.h:40
VVC_PPS_NUT
@ VVC_PPS_NUT
Definition:
vvc.h:45
VVC_PREFIX_APS_NUT
@ VVC_PREFIX_APS_NUT
Definition:
vvc.h:46
VVC_SUFFIX_APS_NUT
@ VVC_SUFFIX_APS_NUT
Definition:
vvc.h:47
VVC_ASP_TYPE_SCALING
@ VVC_ASP_TYPE_SCALING
Definition:
vvc.h:72
VVC_CRA_NUT
@ VVC_CRA_NUT
Definition:
vvc.h:38
VVC_MAX_SUB_PROFILES
@ VVC_MAX_SUB_PROFILES
Definition:
vvc.h:102
VVC_MAX_VPS_COUNT
@ VVC_MAX_VPS_COUNT
Definition:
vvc.h:95
VVC_FD_NUT
@ VVC_FD_NUT
Definition:
vvc.h:54
VVC_OPI_NUT
@ VVC_OPI_NUT
Definition:
vvc.h:41
VVC_MAX_SLICES
@ VVC_MAX_SLICES
Definition:
vvc.h:144
VVC_EOB_NUT
@ VVC_EOB_NUT
Definition:
vvc.h:51
VVC_MAX_LAYERS
@ VVC_MAX_LAYERS
Definition:
vvc.h:80
VVC_MAX_SUBLAYERS
@ VVC_MAX_SUBLAYERS
Definition:
vvc.h:83
VVC_MAX_LUMA_PS
@ VVC_MAX_LUMA_PS
Definition:
vvc.h:127
VVC_MAX_TILES_PER_AU
@ VVC_MAX_TILES_PER_AU
Definition:
vvc.h:136
Generated on Thu Nov 21 2024 19:22:15 for FFmpeg by
1.8.17