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 */
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.1: sps_seq_parameter_set_id is in [0, 15].
111
112 // 7.4.3.2: pps_pic_parameter_set_id is in [0, 63].
114
115 // 7.4.3.3: adaptional_parameter_set_id is in [0, 31].
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.
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.
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