FFmpeg
evc.h
Go to the documentation of this file.
1 /*
2  * EVC definitions and enums
3  * Copyright (c) 2022 Dawid Kozinski <d.kozinski@samsung.com>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg 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 GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef AVCODEC_EVC_H
23 #define AVCODEC_EVC_H
24 
25 // The length field that indicates the length in bytes of the following NAL unit is configured to be of 4 bytes
26 #define EVC_NALU_LENGTH_PREFIX_SIZE (4) /* byte */
27 #define EVC_NALU_HEADER_SIZE (2) /* byte */
28 
29 /**
30  * @see ISO_IEC_23094-1_2020, 7.4.2.2 NAL unit header semantic
31  * Table 4 - NAL unit type codes and NAL unit type classes
32  */
34  EVC_NOIDR_NUT = 0, /* Coded slice of a non-IDR picture */
35  EVC_IDR_NUT = 1, /* Coded slice of an IDR picture */
58  EVC_SPS_NUT = 24, /* Sequence parameter set */
59  EVC_PPS_NUT = 25, /* Picture paremeter set */
60  EVC_APS_NUT = 26, /* Adaptation parameter set */
61  EVC_FD_NUT = 27, /* Filler data */
62  EVC_SEI_NUT = 28, /* Supplemental enhancement information */
97 };
98 
99 // slice type
100 // @see ISO_IEC_23094-1_2020 7.4.5 Slice header semantics
101 //
106 };
107 
108 enum {
109  // 7.4.3.2: aps_video_parameter_set_id is u(4).
111 
112  // 7.4.3.1: sps_seq_parameter_set_id is in [0, 15].
114 
115  // 7.4.3.2: pps_pic_parameter_set_id is in [0, 63].
117 
118  // 7.4.5: slice header slice_pic_parameter_set_id in [0, 63]
120 
121  // E.3.2: cpb_cnt_minus1[i] is in [0, 31].
123 
124  // A.4.1: in table A.1 the highest level allows a MaxLumaPs of 35 651 584.
125  EVC_MAX_LUMA_PS = 35651584,
126 
128 
130 
131  // A.4.1: pic_width_in_luma_samples and pic_height_in_luma_samples are
132  // constrained to be not greater than sqrt(MaxLumaPs * 8). Hence height/
133  // width are bounded above by sqrt(8 * 35651584) = 16888.2 samples.
134  EVC_MAX_WIDTH = 16888,
135  EVC_MAX_HEIGHT = 16888,
136 
137  // A.4.1: table A.1 allows at most 22 tile rows for any level.
139  // A.4.1: table A.1 allows at most 20 tile columns for any level.
141 
142  // A.4.1: table A.1 allows at most 600 slice segments for any level.
144 };
145 
146 #endif // AVCODEC_EVC_H
EVC_MAX_APS_COUNT
@ EVC_MAX_APS_COUNT
Definition: evc.h:110
EVC_RSV_NONVCL49
@ EVC_RSV_NONVCL49
Definition: evc.h:83
EVC_RSV_NONVCL39
@ EVC_RSV_NONVCL39
Definition: evc.h:73
EVC_APS_NUT
@ EVC_APS_NUT
Definition: evc.h:60
EVC_UNSPEC_NUT61
@ EVC_UNSPEC_NUT61
Definition: evc.h:95
EVC_RSV_NONVCL51
@ EVC_RSV_NONVCL51
Definition: evc.h:85
EVC_RSV_NONVCL52
@ EVC_RSV_NONVCL52
Definition: evc.h:86
EVC_RSV_NONVCL36
@ EVC_RSV_NONVCL36
Definition: evc.h:70
EVC_MAX_SLICE_SEGMENTS
@ EVC_MAX_SLICE_SEGMENTS
Definition: evc.h:143
EVC_RSV_NONVCL33
@ EVC_RSV_NONVCL33
Definition: evc.h:67
EVC_MAX_CPB_CNT
@ EVC_MAX_CPB_CNT
Definition: evc.h:122
EVC_SLICE_TYPE_B
@ EVC_SLICE_TYPE_B
Definition: evc.h:103
EVC_RSV_VCL_NUT22
@ EVC_RSV_VCL_NUT22
Definition: evc.h:56
EVC_RSV_VCL_NUT21
@ EVC_RSV_VCL_NUT21
Definition: evc.h:55
EVC_IDR_NUT
@ EVC_IDR_NUT
Definition: evc.h:35
EVC_MAX_SPS_COUNT
@ EVC_MAX_SPS_COUNT
Definition: evc.h:113
EVC_NOIDR_NUT
@ EVC_NOIDR_NUT
Definition: evc.h:34
EVC_RSV_NONVCL55
@ EVC_RSV_NONVCL55
Definition: evc.h:89
EVC_RSV_VCL_NUT19
@ EVC_RSV_VCL_NUT19
Definition: evc.h:53
EVC_RSV_VCL_NUT14
@ EVC_RSV_VCL_NUT14
Definition: evc.h:48
EVC_SEI_NUT
@ EVC_SEI_NUT
Definition: evc.h:62
EVC_RSV_NONVCL41
@ EVC_RSV_NONVCL41
Definition: evc.h:75
EVC_RSV_VCL_NUT07
@ EVC_RSV_VCL_NUT07
Definition: evc.h:41
EVCSliceType
EVCSliceType
Definition: evc.h:102
EVC_RSV_NONVCL47
@ EVC_RSV_NONVCL47
Definition: evc.h:81
EVC_RSV_VCL_NUT09
@ EVC_RSV_VCL_NUT09
Definition: evc.h:43
EVC_UNSPEC_NUT57
@ EVC_UNSPEC_NUT57
Definition: evc.h:91
EVC_RSV_VCL_NUT23
@ EVC_RSV_VCL_NUT23
Definition: evc.h:57
EVC_RSV_NONVCL53
@ EVC_RSV_NONVCL53
Definition: evc.h:87
EVC_RSV_NONVCL43
@ EVC_RSV_NONVCL43
Definition: evc.h:77
EVC_MAX_HEIGHT
@ EVC_MAX_HEIGHT
Definition: evc.h:135
EVC_UNSPEC_NUT58
@ EVC_UNSPEC_NUT58
Definition: evc.h:92
EVC_RSV_VCL_NUT17
@ EVC_RSV_VCL_NUT17
Definition: evc.h:51
EVC_RSV_NONVCL30
@ EVC_RSV_NONVCL30
Definition: evc.h:64
EVC_MAX_SH_COUNT
@ EVC_MAX_SH_COUNT
Definition: evc.h:119
EVC_RSV_VCL_NUT11
@ EVC_RSV_VCL_NUT11
Definition: evc.h:45
EVC_RSV_NONVCL35
@ EVC_RSV_NONVCL35
Definition: evc.h:69
EVC_RSV_VCL_NUT13
@ EVC_RSV_VCL_NUT13
Definition: evc.h:47
EVC_RSV_NONVCL32
@ EVC_RSV_NONVCL32
Definition: evc.h:66
EVC_RSV_VCL_NUT12
@ EVC_RSV_VCL_NUT12
Definition: evc.h:46
EVC_RSV_VCL_NUT02
@ EVC_RSV_VCL_NUT02
Definition: evc.h:36
EVC_RSV_NONVCL54
@ EVC_RSV_NONVCL54
Definition: evc.h:88
EVC_SLICE_TYPE_I
@ EVC_SLICE_TYPE_I
Definition: evc.h:105
EVC_RSV_VCL_NUT06
@ EVC_RSV_VCL_NUT06
Definition: evc.h:40
EVC_MAX_WIDTH
@ EVC_MAX_WIDTH
Definition: evc.h:134
EVC_RSV_VCL_NUT16
@ EVC_RSV_VCL_NUT16
Definition: evc.h:50
EVC_RSV_VCL_NUT08
@ EVC_RSV_VCL_NUT08
Definition: evc.h:42
EVCNALUnitType
EVCNALUnitType
Definition: evc.h:33
EVC_FD_NUT
@ EVC_FD_NUT
Definition: evc.h:61
EVC_RSV_VCL_NUT20
@ EVC_RSV_VCL_NUT20
Definition: evc.h:54
EVC_RSV_NONVCL38
@ EVC_RSV_NONVCL38
Definition: evc.h:72
EVC_RSV_NONVCL44
@ EVC_RSV_NONVCL44
Definition: evc.h:78
EVC_RSV_NONVCL40
@ EVC_RSV_NONVCL40
Definition: evc.h:74
EVC_MAX_TILE_COLUMNS
@ EVC_MAX_TILE_COLUMNS
Definition: evc.h:140
EVC_MAX_NUM_RPLS
@ EVC_MAX_NUM_RPLS
Definition: evc.h:129
EVC_RSV_VCL_NUT04
@ EVC_RSV_VCL_NUT04
Definition: evc.h:38
EVC_UNSPEC_NUT59
@ EVC_UNSPEC_NUT59
Definition: evc.h:93
EVC_RSV_NONVCL37
@ EVC_RSV_NONVCL37
Definition: evc.h:71
EVC_MAX_TILE_ROWS
@ EVC_MAX_TILE_ROWS
Definition: evc.h:138
EVC_UNSPEC_NUT56
@ EVC_UNSPEC_NUT56
Definition: evc.h:90
EVC_PPS_NUT
@ EVC_PPS_NUT
Definition: evc.h:59
EVC_RSV_VCL_NUT03
@ EVC_RSV_VCL_NUT03
Definition: evc.h:37
EVC_UNSPEC_NUT62
@ EVC_UNSPEC_NUT62
Definition: evc.h:96
EVC_RSV_NONVCL31
@ EVC_RSV_NONVCL31
Definition: evc.h:65
EVC_RSV_NONVCL34
@ EVC_RSV_NONVCL34
Definition: evc.h:68
EVC_RSV_VCL_NUT10
@ EVC_RSV_VCL_NUT10
Definition: evc.h:44
EVC_RSV_NONVCL45
@ EVC_RSV_NONVCL45
Definition: evc.h:79
EVC_UNSPEC_NUT60
@ EVC_UNSPEC_NUT60
Definition: evc.h:94
EVC_RSV_NONVCL46
@ EVC_RSV_NONVCL46
Definition: evc.h:80
EVC_RSV_NONVCL29
@ EVC_RSV_NONVCL29
Definition: evc.h:63
EVC_SLICE_TYPE_P
@ EVC_SLICE_TYPE_P
Definition: evc.h:104
EVC_RSV_NONVCL50
@ EVC_RSV_NONVCL50
Definition: evc.h:84
EVC_RSV_VCL_NUT15
@ EVC_RSV_VCL_NUT15
Definition: evc.h:49
EVC_SPS_NUT
@ EVC_SPS_NUT
Definition: evc.h:58
EVC_RSV_NONVCL48
@ EVC_RSV_NONVCL48
Definition: evc.h:82
EVC_MAX_LUMA_PS
@ EVC_MAX_LUMA_PS
Definition: evc.h:125
EVC_MAX_NUM_REF_PICS
@ EVC_MAX_NUM_REF_PICS
Definition: evc.h:127
EVC_RSV_VCL_NUT18
@ EVC_RSV_VCL_NUT18
Definition: evc.h:52
EVC_RSV_NONVCL42
@ EVC_RSV_NONVCL42
Definition: evc.h:76
EVC_RSV_VCL_NUT05
@ EVC_RSV_VCL_NUT05
Definition: evc.h:39
EVC_MAX_PPS_COUNT
@ EVC_MAX_PPS_COUNT
Definition: evc.h:116