/src/vvdec/source/Lib/CommonLib/CommonDef.h
Line | Count | Source |
1 | | /* ----------------------------------------------------------------------------- |
2 | | The copyright in this software is being made available under the Clear BSD |
3 | | License, included below. No patent rights, trademark rights and/or |
4 | | other Intellectual Property Rights other than the copyrights concerning |
5 | | the Software are granted under this license. |
6 | | |
7 | | The Clear BSD License |
8 | | |
9 | | Copyright (c) 2018-2026, Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. & The VVdeC Authors. |
10 | | All rights reserved. |
11 | | |
12 | | Redistribution and use in source and binary forms, with or without modification, |
13 | | are permitted (subject to the limitations in the disclaimer below) provided that |
14 | | the following conditions are met: |
15 | | |
16 | | * Redistributions of source code must retain the above copyright notice, |
17 | | this list of conditions and the following disclaimer. |
18 | | |
19 | | * Redistributions in binary form must reproduce the above copyright |
20 | | notice, this list of conditions and the following disclaimer in the |
21 | | documentation and/or other materials provided with the distribution. |
22 | | |
23 | | * Neither the name of the copyright holder nor the names of its |
24 | | contributors may be used to endorse or promote products derived from this |
25 | | software without specific prior written permission. |
26 | | |
27 | | NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY |
28 | | THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
29 | | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
30 | | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
31 | | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
32 | | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
33 | | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
34 | | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
35 | | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER |
36 | | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
37 | | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
38 | | POSSIBILITY OF SUCH DAMAGE. |
39 | | |
40 | | |
41 | | ------------------------------------------------------------------------------------------- */ |
42 | | |
43 | | /** \file CommonDef.h |
44 | | \brief Defines version information, constants and small in-line functions |
45 | | */ |
46 | | |
47 | | #pragma once |
48 | | |
49 | | #define COMMONDEF_H |
50 | | |
51 | | #include <algorithm> |
52 | | #include <limits> |
53 | | #include <cmath> // needed for std::log2() |
54 | | #include <cstdarg> |
55 | | #include <functional> |
56 | | #include <mutex> |
57 | | |
58 | | #if defined( __x86_64__ ) || defined( _M_X64 ) || defined( __i386__ ) || defined( __i386 ) || defined( _M_IX86 ) |
59 | | # define REAL_TARGET_X86 1 |
60 | | #elif defined( __aarch64__ ) || defined( _M_ARM64 ) || defined( __arm__ ) || defined( _M_ARM ) |
61 | | # if defined( __aarch64__ ) || defined( _M_ARM64 ) |
62 | | # define REAL_TARGET_AARCH64 1 |
63 | | # endif |
64 | | # define REAL_TARGET_ARM 1 |
65 | | #elif defined( __wasm__ ) || defined( __wasm32__ ) |
66 | | # define REAL_TARGET_WASM 1 |
67 | | #elif defined( __loongarch__ ) |
68 | | # define REAL_TARGET_LOONGARCH 1 |
69 | | #endif |
70 | | |
71 | | #ifdef _WIN32 |
72 | | # include <intrin.h> |
73 | | #endif |
74 | | |
75 | | #if defined( __INTEL_COMPILER ) |
76 | | #pragma warning( disable : 1786 ) |
77 | | #pragma warning( disable : 3175 ) // unrecognized gcc optimization level |
78 | | #pragma warning( disable : 177 ) |
79 | | #endif |
80 | | |
81 | | #if _MSC_VER > 1000 |
82 | | // disable "signed and unsigned mismatch" |
83 | | #pragma warning( disable : 4018 ) |
84 | | // disable bool coercion "performance warning" |
85 | | #pragma warning( disable : 4800 ) |
86 | | |
87 | | #pragma warning( disable : 4996 ) |
88 | | #endif // _MSC_VER > 1000 |
89 | | |
90 | | |
91 | | // MS Visual Studio before 2017 does not support required C++14 features |
92 | | #ifdef _MSC_VER |
93 | | #if _MSC_VER < 1910 |
94 | | #error "MS Visual Studio version not supported. Please upgrade to Visual Studio 2017 or higher (or use other compilers)" |
95 | | #endif |
96 | | #endif |
97 | | |
98 | | #define _CRT_SECURE_NO_WARNINGS 1 |
99 | | |
100 | | // macros to selectively disable some usually useful warnings |
101 | | #if defined __GNUC__ && !defined __clang__ |
102 | | # define GCC_WARNING_RESET _Pragma("GCC diagnostic pop"); |
103 | | |
104 | | # define GCC_EXTRA_WARNING_switch_enum _Pragma("GCC diagnostic push"); _Pragma("GCC diagnostic error \"-Wswitch-enum\""); |
105 | | #else |
106 | | # define GCC_WARNING_RESET |
107 | | |
108 | | # define GCC_EXTRA_WARNING_switch_enum |
109 | | #endif |
110 | | |
111 | | #if __GNUC__ >= 8 && !defined __clang__ |
112 | | # define GCC_WARNING_DISABLE_maybe_uninitialized _Pragma("GCC diagnostic push"); _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\""); |
113 | | #else |
114 | | # define GCC_WARNING_DISABLE_maybe_uninitialized |
115 | | #endif |
116 | | |
117 | | // disable warning, when calling memset on a class by casting to void* |
118 | 0 | #define NO_WARNING_class_memaccess( ptr ) ( (void*)ptr ) |
119 | | |
120 | | #define CLASS_COPY_MOVE_DEFAULT( Class ) \ |
121 | 0 | Class( const Class& ) = default; \ Unexecuted instantiation: vvdec::RecoverableException::RecoverableException(vvdec::RecoverableException const&) Unexecuted instantiation: vvdec::Exception::Exception(vvdec::Exception const&) Unexecuted instantiation: vvdec::UnsupportedFeatureException::UnsupportedFeatureException(vvdec::UnsupportedFeatureException const&) Unexecuted instantiation: vvdec::InputBitstream::InputBitstream(vvdec::InputBitstream const&) Unexecuted instantiation: vvdec::InputNALUnit::InputNALUnit(vvdec::InputNALUnit const&) Unexecuted instantiation: vvdec::ChromaQpMappingTableParams::ChromaQpMappingTableParams(vvdec::ChromaQpMappingTableParams const&) |
122 | 0 | Class( Class&& ) = default; \ Unexecuted instantiation: vvdec::InputBitstream::InputBitstream(vvdec::InputBitstream&&) Unexecuted instantiation: vvdec::InputNALUnit::InputNALUnit(vvdec::InputNALUnit&&) |
123 | | Class& operator=( const Class& ) = default; \ |
124 | 0 | Class& operator=( Class&& ) = default; Unexecuted instantiation: vvdec::InputBitstream::operator=(vvdec::InputBitstream&&) Unexecuted instantiation: vvdec::ChromaQpMappingTable::operator=(vvdec::ChromaQpMappingTable&&) Unexecuted instantiation: vvdec::ChromaQpMappingTableParams::operator=(vvdec::ChromaQpMappingTableParams&&) |
125 | | |
126 | | #define CLASS_COPY_MOVE_DELETE( Class ) \ |
127 | | Class( const Class& ) = delete; \ |
128 | | Class( Class&& ) = delete; \ |
129 | | Class& operator=( const Class& ) = delete; \ |
130 | | Class& operator=( Class&& ) = delete; |
131 | | |
132 | | #include "TypeDef.h" |
133 | | #include "vvdec/version.h" |
134 | | |
135 | | namespace vvdec |
136 | | { |
137 | | |
138 | | //! \ingroup CommonLib |
139 | | //! \{ |
140 | | |
141 | | // ==================================================================================================================== |
142 | | // Common constants |
143 | | // ==================================================================================================================== |
144 | | static const uint64_t MAX_UINT64 = std::numeric_limits<uint64_t>::max(); |
145 | | static const uint32_t MAX_UINT = std::numeric_limits<uint32_t>::max(); |
146 | | static const int MAX_INT = std::numeric_limits<int> ::max(); |
147 | | static const uint8_t MAX_UCHAR = std::numeric_limits<int8_t> ::max(); |
148 | | static const uint8_t MAX_SCHAR = std::numeric_limits<uint8_t> ::max(); |
149 | | |
150 | | // ==================================================================================================================== |
151 | | // Coding tool configuration |
152 | | // ==================================================================================================================== |
153 | | // Most of these should not be changed - they resolve the meaning of otherwise magic numbers. |
154 | | |
155 | | static const int MAX_NUM_REF_PICS = 16; ///< max. number of pictures used for reference |
156 | | static const int MAX_NUM_REF = 16; ///< max. number of entries in picture reference list |
157 | | static const int MAX_QP = 63; |
158 | | static const int NOT_VALID = -1; |
159 | | static const int MI_NOT_VALID = -1; |
160 | | static const int MF_NOT_VALID = -1; |
161 | | static const int MH_NOT_VALID = -1; |
162 | | static const int CO_NOT_VALID = -1; |
163 | | |
164 | | static const int AMVP_MAX_NUM_CANDS = 2; ///< AMVP: advanced motion vector prediction - max number of final candidates |
165 | | static const int AMVP_MAX_NUM_CANDS_MEM = 3; ///< AMVP: advanced motion vector prediction - max number of candidates |
166 | | static const int AMVP_DECIMATION_FACTOR = 2; |
167 | | static const int MRG_MAX_NUM_CANDS = 6; ///< MERGE |
168 | | static const int AFFINE_MRG_MAX_NUM_CANDS = 5; ///< AFFINE MERGE |
169 | | static const int IBC_MRG_MAX_NUM_CANDS = 6; ///< IBC MERGE |
170 | | |
171 | | static const int MAX_TLAYER = 7; ///< Explicit temporal layer QP offset - max number of temporal layer |
172 | | |
173 | | static const int MIN_TB_LOG2_SIZEY = 2; |
174 | | static const int MAX_TB_LOG2_SIZEY = 6; |
175 | | |
176 | | static const int MIN_TB_SIZEY = 1 << MIN_TB_LOG2_SIZEY; |
177 | | static const int MAX_TB_SIZEY = 1 << MAX_TB_LOG2_SIZEY; |
178 | | |
179 | | static const int MAX_NUM_PICS_IN_SOP = 1024; |
180 | | |
181 | | static const int MAX_NESTING_NUM_OPS = 1024; |
182 | | static const int MAX_NESTING_NUM_LAYER = 64; |
183 | | |
184 | | static const int MAX_VPS_NUM_HRD_PARAMETERS = 1; |
185 | | static const int MAX_VPS_LAYERS = 64; |
186 | | static const int MAX_VPS_SUBLAYERS = 7; |
187 | | static const int MAX_NUM_OLSS = 256; |
188 | | static const int MAX_VPS_OLS_MODE_IDC = 2; |
189 | | |
190 | | static const int MIP_MAX_WIDTH = MAX_TB_SIZEY; |
191 | | static const int MIP_MAX_HEIGHT = MAX_TB_SIZEY; |
192 | | |
193 | | static const int ALF_FIXED_FILTER_NUM = 64; |
194 | | static const int ALF_CTB_MAX_NUM_APS = 8; |
195 | | static const int NUM_FIXED_FILTER_SETS = 16; |
196 | | static const int NUM_TOTAL_FILTER_SETS = NUM_FIXED_FILTER_SETS + ALF_CTB_MAX_NUM_APS; |
197 | | |
198 | | static const int MAX_BDOF_APPLICATION_REGION = 16; |
199 | | |
200 | | static const int MAX_CPB_CNT = 32; ///< Upper bound of (cpb_cnt_minus1 + 1) |
201 | | static const int MAX_NUM_LAYER_IDS = 64; |
202 | | static const int COEF_REMAIN_BIN_REDUCTION = 5; ///< indicates the level at which the VLC transitions from Golomb-Rice to TU+EG(k) |
203 | | static const int CU_DQP_TU_CMAX = 5; ///< max number bins for truncated unary |
204 | | static const int CU_DQP_EG_k = 0; ///< expgolomb order |
205 | | |
206 | | static const int SBH_THRESHOLD = 4; ///< value of the fixed SBH controlling threshold |
207 | | |
208 | | static const int MAX_NUM_VPS = 16; |
209 | | static const int MAX_NUM_DPS = 16; |
210 | | static const int MAX_NUM_SPS = 16; |
211 | | static const int MAX_NUM_PPS = 64; |
212 | | static const int MAX_NUM_APS = 32; //Currently APS ID has 5 bits |
213 | | static const int NUM_APS_TYPE_LEN = 3; //Currently APS Type has 3 bits |
214 | | static const int MAX_NUM_APS_TYPE = 8; //Currently APS Type has 3 bits so the max type is 8 |
215 | | |
216 | | static const int MAX_TILE_COLS = 20; ///< Maximum number of tile columns |
217 | | static const int MAX_TILES = 440; ///< Maximum number of tiles |
218 | | static const int MAX_SLICES = 600; ///< Maximum number of slices per picture |
219 | | static const int MLS_GRP_NUM = 1024; ///< Max number of coefficient groups, max(16, 256) |
220 | | |
221 | | static const int MLS_CG_SIZE = 4; ///< Coefficient group size of 4x4; = MLS_CG_LOG2_WIDTH + MLS_CG_LOG2_HEIGHT |
222 | | |
223 | | |
224 | | static const int MAX_REF_LINE_IDX = 3; //highest refLine offset in the list |
225 | | static const int MRL_NUM_REF_LINES = 3; //number of candidates in the array |
226 | | static const int MULTI_REF_LINE_IDX[4] = { 0, 1, 2, 0 }; |
227 | | |
228 | | static const int PRED_REG_MIN_WIDTH = 4; // Minimum prediction region width for ISP subblocks |
229 | | |
230 | | static const int NUM_LUMA_MODE = 67; ///< Planar + DC + 65 directional mode (4*16 + 1) |
231 | | static const int NUM_LMC_MODE = 1 + 2; ///< LMC + MDLM_T + MDLM_L |
232 | | static const int NUM_INTRA_MODE = (NUM_LUMA_MODE + NUM_LMC_MODE); |
233 | | |
234 | | static const int NUM_EXT_LUMA_MODE = 28; |
235 | | |
236 | | static const int NUM_DIR = (((NUM_LUMA_MODE - 3) >> 2) + 1); |
237 | | static const int PLANAR_IDX = 0; ///< index for intra PLANAR mode |
238 | | static const int DC_IDX = 1; ///< index for intra DC mode |
239 | | static const int HOR_IDX = (1 * (NUM_DIR - 1) + 2); ///< index for intra HORIZONTAL mode |
240 | | static const int DIA_IDX = (2 * (NUM_DIR - 1) + 2); ///< index for intra DIAGONAL mode |
241 | | static const int VER_IDX = (3 * (NUM_DIR - 1) + 2); ///< index for intra VERTICAL mode |
242 | | static const int VDIA_IDX = (4 * (NUM_DIR - 1) + 2); ///< index for intra VDIAGONAL mode |
243 | | static const int BDPCM_IDX = (5 * (NUM_DIR - 1) + 2); ///< index for intra VDIAGONAL mode |
244 | | |
245 | | static const int NUM_CHROMA_MODE = (5 + NUM_LMC_MODE); ///< total number of chroma modes |
246 | | static const int LM_CHROMA_IDX = NUM_LUMA_MODE; ///< chroma mode index for derived from LM mode |
247 | | static const int MDLM_L_IDX = LM_CHROMA_IDX + 1; ///< MDLM_L |
248 | | static const int MDLM_T_IDX = LM_CHROMA_IDX + 2; ///< MDLM_T |
249 | | static const int DM_CHROMA_IDX = NUM_INTRA_MODE; ///< chroma mode index for derived from luma intra mode |
250 | | |
251 | | static const uint32_t MTS_INTRA_MAX_CU_SIZE = 32; ///< Max Intra CU size applying EMT, supported values: 8, 16, 32, 64, 128 |
252 | | static const uint32_t MTS_INTER_MAX_CU_SIZE = 32; ///< Max Inter CU size applying EMT, supported values: 8, 16, 32, 64, 128 |
253 | | static const int NUM_MOST_PROBABLE_MODES = 6; |
254 | | |
255 | | static const int MAX_NUM_MIP_MODE = 32; ///< maximum number of MIP pred. modes |
256 | | static const int MAX_LFNST_COEF_NUM = 16; |
257 | | |
258 | | static const int LFNST_LAST_SIG_LUMA = 1; |
259 | | static const int LFNST_LAST_SIG_CHROMA = 1; |
260 | | |
261 | | static const int NUM_LFNST_NUM_PER_SET = 3; |
262 | | |
263 | | static const int CABAC_INIT_PRESENT_FLAG = 1; |
264 | | |
265 | | static const int MV_FRACTIONAL_BITS_INTERNAL = 4; |
266 | | static const int MV_FRACTIONAL_BITS_SIGNAL = 2; |
267 | | static const int MV_FRACTIONAL_BITS_DIFF = MV_FRACTIONAL_BITS_INTERNAL - MV_FRACTIONAL_BITS_SIGNAL; |
268 | | static const int LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS = 1 << MV_FRACTIONAL_BITS_INTERNAL; |
269 | | static const int CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS = 1 << (MV_FRACTIONAL_BITS_INTERNAL + 1); |
270 | | |
271 | | static const int MAX_NUM_SUB_PICS = 255; |
272 | | static const int MAX_NUM_LONG_TERM_REF_PICS = 33; |
273 | | static const int NUM_LONG_TERM_REF_PIC_SPS = 0; |
274 | | |
275 | | |
276 | | static const int MAX_QP_OFFSET_LIST_SIZE = 6; ///< Maximum size of QP offset list is 6 entries |
277 | | static const int MAX_NUM_CQP_MAPPING_TABLES = 3; ///< Maximum number of chroma QP mapping tables (Cb, Cr and joint Cb-Cr) |
278 | | static const int MIN_QP_VALUE_FOR_16_BIT = -48; ////< Minimum value for QP (-6*(bitdepth - 8) ) for bit depth 16 ; actual minimum QP value is bit depth dependent |
279 | | static const int MAX_NUM_QP_VALUES = MAX_QP + 1 - MIN_QP_VALUE_FOR_16_BIT; ////< Maximum number of QP values possible - bit depth dependent |
280 | | |
281 | | static const int MAX_TIMECODE_SEI_SETS = 3; ///< Maximum number of time sets |
282 | | |
283 | | static const int MAX_CU_DEPTH = 7; ///< log2(CTUSize) |
284 | | static const int MAX_CU_SIZE = 1<<MAX_CU_DEPTH; |
285 | | static const int MIN_CU_LOG2 = 2; |
286 | | static const int MIN_PU_SIZE = 4; |
287 | | static const int MIN_TU_SIZE = 4; |
288 | | static const int MAX_LOG2_TU_SIZE_PLUS_ONE = 7; ///< log2(MAX_TU_SIZE) + 1 |
289 | | static const int MAX_NUM_PARTS_IN_CTU = ( ( MAX_CU_SIZE * MAX_CU_SIZE ) >> ( MIN_CU_LOG2 << 1 ) ); |
290 | | static const int MAX_TU_SIZE_FOR_PROFILE = 64; |
291 | | static const int MAX_LOG2_DIFF_CU_TR_SIZE = 2; |
292 | | static const int MAX_CU_TILING_PARTITIONS = 1 << ( MAX_LOG2_DIFF_CU_TR_SIZE << 1 ); |
293 | | |
294 | | static const int JVET_C0024_ZERO_OUT_TH = 32; |
295 | | |
296 | | static const int MAX_NUM_PART_IDXS_IN_CTU_WIDTH = MAX_CU_SIZE/MIN_PU_SIZE; ///< maximum number of partition indices across the width of a CTU (or height of a CTU) |
297 | | static const int SCALING_LIST_REM_NUM = 6; |
298 | | |
299 | | static const int IQUANT_SHIFT = 6; |
300 | | static const int SCALE_BITS = 15; ///< Precision for fractional bit estimates |
301 | | |
302 | | static const int SCALING_LIST_NUM = MAX_NUM_COMPONENT * (NUMBER_OF_PREDICTION_MODES - 1); ///< list number for quantization matrix |
303 | | |
304 | | static const int SCALING_LIST_START_VALUE = 8; ///< start value for dpcm mode |
305 | | static const int MAX_MATRIX_COEF_NUM = 64; ///< max coefficient number for quantization matrix |
306 | | static const int MAX_MATRIX_SIZE_NUM = 8; ///< max size number for quantization matrix |
307 | | static const int SCALING_LIST_BITS = 8; ///< bit depth of scaling list entries |
308 | | static const int LOG2_SCALING_LIST_NEUTRAL_VALUE = 4; ///< log2 of the value that, when used in a scaling list, has no effect on quantisation |
309 | | static const int SCALING_LIST_DC = 16; ///< default DC value |
310 | | |
311 | | static const int LAST_SIGNIFICANT_GROUPS = 14; |
312 | | static const int MAX_GR_ORDER_RESIDUAL = 10; |
313 | | |
314 | | static const int AFFINE_MIN_BLOCK_SIZE = 4; ///< Minimum affine MC block size |
315 | | |
316 | | static const int MMVD_REFINE_STEP = 8; ///< max number of distance step |
317 | | static const int MMVD_MAX_REFINE_NUM = (MMVD_REFINE_STEP * 4); ///< max number of candidate from a base candidate |
318 | | static const int MMVD_BASE_MV_NUM = 2; ///< max number of base candidate |
319 | | |
320 | | static const int MAX_TU_LEVEL_CTX_CODED_BIN_CONSTRAINT_LUMA = 28; |
321 | | static const int MAX_TU_LEVEL_CTX_CODED_BIN_CONSTRAINT_CHROMA = 28; |
322 | | |
323 | | static const int BIO_EXTEND_SIZE = 1; |
324 | | static const int BIO_ALIGN_SIZE = 8; |
325 | | static const int BIO_TEMP_BUFFER_SIZE = (MAX_BDOF_APPLICATION_REGION + 2 * BIO_ALIGN_SIZE) * (MAX_BDOF_APPLICATION_REGION + 2 * BIO_ALIGN_SIZE); |
326 | | |
327 | | static const int PROF_BORDER_EXT_W = 1; |
328 | | static const int PROF_BORDER_EXT_H = 1; |
329 | | static const int BCW_NUM = 5; ///< the number of weight options |
330 | | static const int BCW_DEFAULT = 0; ///< Default weighting index representing for w=0.5, in the internal domain |
331 | | static const int BCW_SIZE_CONSTRAINT = 256; ///< disabling Bcw if cu size is smaller than 256 |
332 | | static const int MAX_NUM_HMVP_CANDS = (MRG_MAX_NUM_CANDS-1); ///< maximum number of HMVP candidates to be stored and used in merge list |
333 | | static const int MAX_NUM_HMVP_AVMPCANDS = 4; ///< maximum number of HMVP candidates to be used in AMVP list |
334 | | |
335 | | static const int ALF_VB_POS_ABOVE_CTUROW_LUMA = 4; |
336 | | static const int ALF_VB_POS_ABOVE_CTUROW_CHMA = 2; |
337 | | |
338 | | static const int DMVR_SUBCU_WIDTH = 16; |
339 | | static const int DMVR_SUBCU_HEIGHT = 16; |
340 | | static const int DMVR_SUBCU_WIDTH_LOG2 = 4; |
341 | | static const int DMVR_SUBCU_HEIGHT_LOG2 = 4; |
342 | | static const int MAX_NUM_SUBCU_DMVR = ((MAX_CU_SIZE * MAX_CU_SIZE) >> (DMVR_SUBCU_WIDTH_LOG2 + DMVR_SUBCU_HEIGHT_LOG2)); |
343 | | static const int DMVR_NUM_ITERATION = 2; |
344 | | |
345 | | static const int MIN_DUALTREE_CHROMA_WIDTH = 4; |
346 | | static const int MIN_DUALTREE_CHROMA_SIZE = 16; |
347 | | |
348 | | static const SplitSeries SPLIT_DMULT = 5; |
349 | | static const SplitSeries SPLIT_MASK = 31; ///< = (1 << SPLIT_BITS) - 1 |
350 | | static const int COM16_C806_TRANS_PREC = 0; |
351 | | |
352 | | |
353 | | static const int NTAPS_LUMA = 8; ///< Number of taps for luma |
354 | | static const int NTAPS_CHROMA = 4; ///< Number of taps for chroma |
355 | | #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET |
356 | | static const int MAX_LADF_INTERVALS = 5; /// max number of luma adaptive deblocking filter qp offset intervals |
357 | | #endif |
358 | | |
359 | | static const int NTAPS_BILINEAR = 2; ///< Number of taps for bilinear filter |
360 | | |
361 | | static const int ATMVP_SUB_BLOCK_SIZE = 3; ///< sub-block size for ATMVP |
362 | | static const int GEO_MAX_NUM_UNI_CANDS = 6; |
363 | | static const int GEO_MAX_NUM_CANDS = GEO_MAX_NUM_UNI_CANDS * (GEO_MAX_NUM_UNI_CANDS - 1); |
364 | | static const int GEO_MIN_CU_LOG2 = 3; |
365 | | static const int GEO_MAX_CU_LOG2 = 6; |
366 | | static const int GEO_MIN_CU_SIZE = 1 << GEO_MIN_CU_LOG2; |
367 | | static const int GEO_MAX_CU_SIZE = 1 << GEO_MAX_CU_LOG2; |
368 | | static const int GEO_NUM_CU_SIZE = ( GEO_MAX_CU_LOG2 - GEO_MIN_CU_LOG2 ) + 1; |
369 | | static const int GEO_NUM_PARTITION_MODE = 64; |
370 | | static const int GEO_NUM_ANGLES = 32; |
371 | | static const int GEO_NUM_DISTANCES = 4; |
372 | | static const int GEO_NUM_PRESTORED_MASK = 6; |
373 | | static const int GEO_WEIGHT_MASK_SIZE = 3 * (GEO_MAX_CU_SIZE >> 3) * 2 + GEO_MAX_CU_SIZE; |
374 | | static const int GEO_MV_MASK_SIZE = GEO_WEIGHT_MASK_SIZE >> 2; |
375 | | |
376 | | static const int LDT_MODE_TYPE_INHERIT = 0; ///< No need to signal mode_constraint_flag, and the modeType of the region is inherited from its parent node |
377 | | static const int LDT_MODE_TYPE_INFER = 1; ///< No need to signal mode_constraint_flag, and the modeType of the region is inferred as MODE_TYPE_INTRA |
378 | | static const int LDT_MODE_TYPE_SIGNAL = 2; ///< Need to signal mode_constraint_flag, and the modeType of the region is determined by the flag |
379 | | |
380 | | static constexpr int MV_EXPONENT_BITCOUNT = 4; |
381 | | static constexpr int MV_MANTISSA_BITCOUNT = 6; |
382 | | static constexpr int MV_MANTISSA_UPPER_LIMIT = ((1 << (MV_MANTISSA_BITCOUNT - 1)) - 1); |
383 | | static constexpr int MV_MANTISSA_LIMIT = (1 << (MV_MANTISSA_BITCOUNT - 1)); |
384 | | static constexpr int MV_EXPONENT_MASK = ((1 << MV_EXPONENT_BITCOUNT) - 1); |
385 | | |
386 | | static constexpr int MV_BITS = 18; |
387 | | |
388 | | static const int MVD_MAX = (1 << 17) - 1; |
389 | | static const int MVD_MIN = -(1 << 17); |
390 | | |
391 | | static const int PIC_CODE_CW_BINS = 16; |
392 | | static const int FP_PREC = 11; |
393 | | static const int CSCALE_FP_PREC = 11; |
394 | | static const int SCALE_RATIO_BITS = 14; |
395 | | static const int MAX_SCALING_RATIO = 2; // max scaling ratio allowed in the software, it is used to allocated an internla buffer in the rescaling |
396 | | static const std::pair<int, int> SCALE_1X = std::pair<int, int>( 1 << SCALE_RATIO_BITS, 1 << SCALE_RATIO_BITS ); // scale ratio 1x |
397 | | static const int DELTA_QP_ACT[4] = { -5, 1, 3, 1 }; |
398 | | |
399 | | // ==================================================================================================================== |
400 | | // Macro functions |
401 | | // ==================================================================================================================== |
402 | | |
403 | | template<typename T> |
404 | | struct ClpRngTemplate |
405 | | { |
406 | 0 | T min() const { return 0; } |
407 | 0 | T max() const { return ( ( 1 << bd ) - 1 );} |
408 | | int bd; |
409 | | }; |
410 | | |
411 | | typedef ClpRngTemplate<Pel> ClpRng; |
412 | | typedef ClpRng ClpRngs; |
413 | | |
414 | 0 | template <typename T> constexpr static inline T Clip3 ( const T minVal, const T maxVal, const T a) { return std::min<T> (std::max<T> (minVal, a) , maxVal); } ///< general min/max clipUnexecuted instantiation: vvdec.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: vvdecimpl.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: FilmGrain.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Buffer.cpp:short vvdec::Clip3<short>(short, short, short) Unexecuted instantiation: Buffer.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterpolationFilter.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterpolationFilter.cpp:short vvdec::Clip3<short>(short, short, short) Unexecuted instantiation: LoopFilter.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: PicListManager.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Picture.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: RdCost.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Rom.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: SampleAdaptiveOffset.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Slice.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Unit.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: UnitTools.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: DecLib.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: DecLibParser.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: DecLibRecon.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: DecSlice.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: HLSyntaxReader.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: SEIread.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InitX86.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: AdaptiveLoopFilter_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Buffer_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterPred_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterpolationFilter_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterpolationFilter_sse41.cpp:short vvdec::Clip3<short>(short, short, short) Unexecuted instantiation: IntraPred_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: LoopFilter_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Picture_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Quant_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: RdCost_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: SampleAdaptiveOffset_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Trafo_sse41.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: AdaptiveLoopFilter_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Buffer_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterPred_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterpolationFilter_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterpolationFilter_avx2.cpp:short vvdec::Clip3<short>(short, short, short) Unexecuted instantiation: IntraPred_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: LoopFilter_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Picture_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Quant_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: RdCost_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: SampleAdaptiveOffset_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Trafo_avx2.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: AdaptiveLoopFilter.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: CodingStructure.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Contexts.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: InterPrediction.cpp:short vvdec::Clip3<short>(short, short, short) Unexecuted instantiation: InterPrediction.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: IntraPrediction.cpp:short vvdec::Clip3<short>(short, short, short) Unexecuted instantiation: IntraPrediction.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: MatrixIntraPrediction.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Mv.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: PicYuvMD5.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Quant.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: Reshape.cpp:short vvdec::Clip3<short>(short, short, short) Unexecuted instantiation: Reshape.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: TrQuant.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: TrQuant_EMT.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: UnitPartitioner.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: WeightPrediction.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: CABACReader.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: DecCu.cpp:int vvdec::Clip3<int>(int, int, int) Unexecuted instantiation: ContextModelling.cpp:int vvdec::Clip3<int>(int, int, int) |
415 | 0 | template <typename T> constexpr static inline T ClipBD ( const T x, const int bitDepth ) { return Clip3( T( 0 ), T( ( 1 << bitDepth ) - 1 ), x ); }Unexecuted instantiation: Buffer.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: InterpolationFilter.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: InterpolationFilter.cpp:short vvdec::ClipBD<short>(short, int) Unexecuted instantiation: LoopFilter.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: SampleAdaptiveOffset.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: Buffer_sse41.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: InterpolationFilter_sse41.cpp:short vvdec::ClipBD<short>(short, int) Unexecuted instantiation: SampleAdaptiveOffset_sse41.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: Buffer_avx2.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: InterpolationFilter_avx2.cpp:short vvdec::ClipBD<short>(short, int) Unexecuted instantiation: SampleAdaptiveOffset_avx2.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: AdaptiveLoopFilter.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: InterPrediction.cpp:short vvdec::ClipBD<short>(short, int) Unexecuted instantiation: IntraPrediction.cpp:short vvdec::ClipBD<short>(short, int) Unexecuted instantiation: IntraPrediction.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: MatrixIntraPrediction.cpp:int vvdec::ClipBD<int>(int, int) Unexecuted instantiation: WeightPrediction.cpp:int vvdec::ClipBD<int>(int, int) |
416 | 0 | template <typename T> constexpr static inline T ClipPel( const T a, const ClpRng& clpRng ) { return ClipBD( a, clpRng.bd ); } ///< clip reconstructionUnexecuted instantiation: Buffer.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: InterpolationFilter.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: InterpolationFilter.cpp:short vvdec::ClipPel<short>(short, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: LoopFilter.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: SampleAdaptiveOffset.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: InterpolationFilter_sse41.cpp:short vvdec::ClipPel<short>(short, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: SampleAdaptiveOffset_sse41.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: InterpolationFilter_avx2.cpp:short vvdec::ClipPel<short>(short, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: SampleAdaptiveOffset_avx2.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: AdaptiveLoopFilter.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: InterPrediction.cpp:short vvdec::ClipPel<short>(short, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: IntraPrediction.cpp:short vvdec::ClipPel<short>(short, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: IntraPrediction.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) Unexecuted instantiation: WeightPrediction.cpp:int vvdec::ClipPel<int>(int, vvdec::ClpRngTemplate<short> const&) |
417 | | |
418 | | static void default_msgFnc( void *, int level, const char* fmt, va_list args ) |
419 | 0 | { |
420 | 0 | vfprintf(stderr, fmt, args); |
421 | 0 | } Unexecuted instantiation: vvdec.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: vvdecimpl.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: CommonDefX86.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: FilmGrain.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: FilmGrainImpl.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: FilmGrainImpl_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: FilmGrainImpl_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: BitStream.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Buffer.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: InterpolationFilter.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: LoopFilter.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: PicListManager.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Picture.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: RdCost.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Rom.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: SEI_internal.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: SampleAdaptiveOffset.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Slice.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Unit.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: UnitTools.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: DecLib.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: DecLibParser.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: DecLibRecon.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: DecSlice.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: HLSyntaxReader.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: NALread.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: SEIread.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: VLCReader.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: ThreadPool.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: InitX86.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: AdaptiveLoopFilter_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Buffer_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: InterPred_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: InterpolationFilter_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: IntraPred_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: LoopFilter_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Picture_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Quant_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: RdCost_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: SampleAdaptiveOffset_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Trafo_sse41.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: AdaptiveLoopFilter_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Buffer_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: InterPred_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: InterpolationFilter_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: IntraPred_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: LoopFilter_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Picture_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Quant_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: RdCost_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: SampleAdaptiveOffset_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Trafo_avx2.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: AdaptiveLoopFilter.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: CodingStructure.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Contexts.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: InterPrediction.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: IntraPrediction.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: MatrixIntraPrediction.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Mv.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: ParameterSetManager.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: PicYuvMD5.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Quant.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: Reshape.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: RomLFNST.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: TrQuant.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: TrQuant_EMT.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: UnitPartitioner.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: WeightPrediction.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: BinDecoder.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: CABACReader.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: DecCu.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: ContextModelling.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) Unexecuted instantiation: RomTr.cpp:vvdec::default_msgFnc(void*, int, char const*, __va_list_tag*) |
422 | | |
423 | | extern MsgLevel g_verbosity; |
424 | | extern void *g_context; |
425 | | extern std::function<void( void*, int, const char*, va_list )> g_msgFnc; |
426 | | |
427 | | |
428 | | static inline void msg( MsgLevel level, const char* fmt, ... ) |
429 | 0 | { |
430 | 0 | if ( vvdec::g_msgFnc && vvdec::g_verbosity >= level ) |
431 | 0 | { |
432 | 0 | static std::mutex _msgMutex; |
433 | 0 | std::unique_lock<std::mutex> _lock( _msgMutex ); |
434 | 0 | va_list args; |
435 | 0 | va_start( args, fmt ); |
436 | 0 | vvdec::g_msgFnc( vvdec::g_context, level, fmt, args ); |
437 | 0 | va_end( args ); |
438 | 0 | } |
439 | 0 | } Unexecuted instantiation: vvdec.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: vvdecimpl.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: CommonDefX86.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: FilmGrain.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: FilmGrainImpl.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: FilmGrainImpl_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: FilmGrainImpl_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: BitStream.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Buffer.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: InterpolationFilter.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: LoopFilter.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: PicListManager.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Picture.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: RdCost.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Rom.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: SEI_internal.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: SampleAdaptiveOffset.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Slice.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Unit.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: UnitTools.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: DecLib.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: DecLibParser.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: DecLibRecon.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: DecSlice.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: HLSyntaxReader.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: NALread.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: SEIread.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: VLCReader.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: ThreadPool.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: InitX86.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: AdaptiveLoopFilter_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Buffer_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: InterPred_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: InterpolationFilter_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: IntraPred_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: LoopFilter_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Picture_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Quant_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: RdCost_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: SampleAdaptiveOffset_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Trafo_sse41.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: AdaptiveLoopFilter_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Buffer_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: InterPred_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: InterpolationFilter_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: IntraPred_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: LoopFilter_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Picture_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Quant_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: RdCost_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: SampleAdaptiveOffset_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Trafo_avx2.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: AdaptiveLoopFilter.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: CodingStructure.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Contexts.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: InterPrediction.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: IntraPrediction.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: MatrixIntraPrediction.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Mv.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: ParameterSetManager.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: PicYuvMD5.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Quant.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: Reshape.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: RomLFNST.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: TrQuant.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: TrQuant_EMT.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: UnitPartitioner.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: WeightPrediction.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: BinDecoder.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: CABACReader.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: DecCu.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: ContextModelling.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) Unexecuted instantiation: RomTr.cpp:vvdec::msg(vvdec::MsgLevel, char const*, ...) |
440 | | |
441 | 0 | #define MEMORY_ALIGN_DEF_SIZE 32 // for use with avx2 (256 bit) |
442 | | #define CACHE_MEM_ALIGN_SIZE 1024 |
443 | | |
444 | | #define ALIGNED_MALLOC 1 ///< use 32-byte aligned malloc/free |
445 | | |
446 | | #if ALIGNED_MALLOC |
447 | | |
448 | | # if( _WIN32 && ( _MSC_VER > 1300 ) ) || defined( __MINGW64_VERSION_MAJOR ) |
449 | | # define xMalloc( type, len ) (type*) _aligned_malloc( sizeof( type ) * ( len ), MEMORY_ALIGN_DEF_SIZE ) |
450 | | # define xFree( ptr ) _aligned_free( ptr ) |
451 | | # elif defined( __MINGW32__ ) |
452 | | # define xMalloc( type, len ) (type*) __mingw_aligned_malloc( sizeof( type ) * ( len ), MEMORY_ALIGN_DEF_SIZE ) |
453 | | # define xFree( ptr ) __mingw_aligned_free( ptr ) |
454 | | # else |
455 | 0 | # define xMalloc( type, len ) detail::aligned_malloc<type>( len, MEMORY_ALIGN_DEF_SIZE ) |
456 | 0 | # define xFree( ptr ) free( ptr ) |
457 | | namespace detail |
458 | | { |
459 | | template<typename T> |
460 | | static inline T* aligned_malloc( size_t len, size_t alignement ) |
461 | 0 | { |
462 | 0 | T* p = NULL; |
463 | 0 | if( posix_memalign( (void**) &p, alignement, sizeof( T ) * ( len ) ) ) |
464 | 0 | { |
465 | 0 | THROW_FATAL( "posix_memalign failed" ); |
466 | 0 | } |
467 | 0 | return p; |
468 | 0 | } Unexecuted instantiation: vvdec.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: vvdecimpl.cpp:char* vvdec::detail::aligned_malloc<char>(unsigned long, unsigned long) Unexecuted instantiation: vvdecimpl.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: BitStream.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Buffer.cpp:short* vvdec::detail::aligned_malloc<short>(unsigned long, unsigned long) Unexecuted instantiation: Buffer.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: LoopFilter.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: PicListManager.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Picture.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Rom.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: SampleAdaptiveOffset.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Slice.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Unit.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: UnitTools.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: DecLib.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: DecLibParser.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: DecLibRecon.cpp:short* vvdec::detail::aligned_malloc<short>(unsigned long, unsigned long) Unexecuted instantiation: DecLibRecon.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: DecSlice.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: HLSyntaxReader.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: NALread.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: SEIread.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: VLCReader.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: InitX86.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: InterPred_sse41.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Picture_sse41.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: SampleAdaptiveOffset_sse41.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: InterPred_avx2.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Picture_avx2.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: SampleAdaptiveOffset_avx2.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: AdaptiveLoopFilter.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: CodingStructure.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: InterPrediction.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: IntraPrediction.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: MatrixIntraPrediction.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Mv.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: ParameterSetManager.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: PicYuvMD5.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Quant.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: Reshape.cpp:short* vvdec::detail::aligned_malloc<short>(unsigned long, unsigned long) Unexecuted instantiation: Reshape.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: TrQuant.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: UnitPartitioner.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: WeightPrediction.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: BinDecoder.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: CABACReader.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: DecCu.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) Unexecuted instantiation: ContextModelling.cpp:unsigned char* vvdec::detail::aligned_malloc<unsigned char>(unsigned long, unsigned long) |
469 | | } // namespace detail |
470 | | # endif |
471 | | |
472 | | #else // !ALIGNED_MALLOC |
473 | | # define xMalloc( type, len ) (type*) malloc( sizeof( type ) * ( len ) ) |
474 | | # define xFree( ptr ) free( ptr ) |
475 | | #endif // !ALIGNED_MALLOC |
476 | | |
477 | | template<class T> |
478 | | struct AlignedDeleter |
479 | | { |
480 | 0 | void operator()( T* p ) const { xFree( p ); }; |
481 | | }; |
482 | | |
483 | | template<class T> |
484 | | struct AlignedAllocator |
485 | | { |
486 | | using value_type = T; |
487 | | |
488 | | using propagate_on_container_move_assignment = std::true_type; |
489 | | using is_always_equal = std::true_type; |
490 | | |
491 | | AlignedAllocator() = default; |
492 | | ~AlignedAllocator() = default; |
493 | | CLASS_COPY_MOVE_DEFAULT( AlignedAllocator ) |
494 | | |
495 | | template<class U> |
496 | | constexpr AlignedAllocator( const AlignedAllocator<U>& ) noexcept {} |
497 | | |
498 | | T* allocate( std::size_t n ) |
499 | 0 | { |
500 | 0 | if( n > std::numeric_limits<std::size_t>::max() / sizeof( T ) ) |
501 | 0 | { |
502 | 0 | throw std::bad_array_new_length(); |
503 | 0 | } |
504 | | |
505 | 0 | if( T* p = xMalloc( T, n ) ) |
506 | 0 | { |
507 | 0 | return p; |
508 | 0 | } |
509 | | |
510 | 0 | throw std::bad_alloc(); |
511 | 0 | } |
512 | | |
513 | 0 | void deallocate( T* p, std::size_t ) noexcept { xFree( p ); } |
514 | | }; |
515 | | template<typename T1, typename T2> |
516 | | static bool operator==( const AlignedAllocator<T1>&, const AlignedAllocator<T2>& ) noexcept { return true; } |
517 | | template<typename T1, typename T2> |
518 | | static bool operator!=( const AlignedAllocator<T1>&, const AlignedAllocator<T2>& ) noexcept { return false; } |
519 | | |
520 | | using AlignedByteVec = std::vector<uint8_t, AlignedAllocator<uint8_t>>; |
521 | | |
522 | | #if defined _MSC_VER |
523 | | # define ALIGN_DATA( nBytes, v ) __declspec( align( nBytes ) ) v |
524 | | #else |
525 | 0 | # define ALIGN_DATA( nBytes, v ) v __attribute__( ( aligned( nBytes ) ) ) |
526 | | #endif |
527 | | |
528 | | #if defined(__GNUC__) && !defined(__clang__) |
529 | | # define GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y) |
530 | | #else |
531 | | # define GCC_VERSION_AT_LEAST(x,y) 0 |
532 | | #endif |
533 | | |
534 | | #ifdef __clang__ |
535 | | # define CLANG_VERSION_AT_LEAST(x,y) (__clang_major__ > x || __clang_major__ == x && __clang_minor__ >= y) |
536 | | #else |
537 | | # define CLANG_VERSION_AT_LEAST(x,y) 0 |
538 | | #endif |
539 | | |
540 | | #if defined( __GNUC__ ) |
541 | | #if __has_attribute( no_sanitize ) |
542 | | # define NO_THREAD_SANITIZE __attribute__( ( no_sanitize( "thread" ) ) ) |
543 | | #else |
544 | | # define NO_THREAD_SANITIZE |
545 | | #endif |
546 | | #else |
547 | | # define NO_THREAD_SANITIZE |
548 | | #endif |
549 | | |
550 | | #ifdef __GNUC__ |
551 | | # define ALWAYS_INLINE __attribute__((always_inline)) inline |
552 | | #elif defined _MSC_VER |
553 | | # define ALWAYS_INLINE __forceinline |
554 | | #else |
555 | | # define ALWAYS_INLINE |
556 | | #endif |
557 | | |
558 | | #if ENABLE_SIMD_OPT |
559 | | |
560 | | //necessary to be able to compare with SIMD_EVERYWHERE_EXTENSION_LEVEL in the preprocessor |
561 | | #define X86_SIMD_UNDEFINED -1 |
562 | | #define X86_SIMD_SCALAR 0 |
563 | | #define X86_SIMD_SSE41 1 |
564 | | #define X86_SIMD_SSE42 2 |
565 | | #define X86_SIMD_AVX 3 |
566 | | #define X86_SIMD_AVX2 4 |
567 | | #define X86_SIMD_AVX512 5 |
568 | | |
569 | | namespace x86_simd |
570 | | { |
571 | | # ifdef TARGET_SIMD_X86 |
572 | | typedef enum |
573 | | { |
574 | | UNDEFINED = X86_SIMD_UNDEFINED, |
575 | | SCALAR = X86_SIMD_SCALAR, |
576 | | SSE41 = X86_SIMD_SSE41, |
577 | | SSE42 = X86_SIMD_SSE42, |
578 | | AVX = X86_SIMD_AVX, |
579 | | AVX2 = X86_SIMD_AVX2, |
580 | | AVX512 = X86_SIMD_AVX512, |
581 | | } X86_VEXT; |
582 | | # endif // TARGET_SIMD_X86 |
583 | | } // namespace x86_simd |
584 | | |
585 | | namespace arm_simd |
586 | | { |
587 | | # ifdef TARGET_SIMD_ARM |
588 | | typedef enum |
589 | | { |
590 | | UNDEFINED = -1, |
591 | | SCALAR = 0, |
592 | | NEON, |
593 | | NEON_RDM, |
594 | | SVE, |
595 | | SVE2, |
596 | | } ARM_VEXT; |
597 | | # endif // TARGET_SIMD_ARM |
598 | | } // namespace arm_simd |
599 | | |
600 | | #endif // ENABLE_SIMD_OPT |
601 | | |
602 | 0 | template <typename ValueType> static inline ValueType rightShift (const ValueType value, const int shift) { return (shift >= 0) ? ( value >> shift) : ( value << -shift); }Unexecuted instantiation: Buffer.cpp:int vvdec::rightShift<int>(int, int) Unexecuted instantiation: InterpolationFilter.cpp:int vvdec::rightShift<int>(int, int) Unexecuted instantiation: InterPrediction.cpp:int vvdec::rightShift<int>(int, int) |
603 | 0 | template <typename ValueType> static inline ValueType rightShift_round(const ValueType value, const int shift) { return (shift >= 0) ? ((value + (ValueType(1) << (shift - 1))) >> shift) : ( value << -shift); } |
604 | | |
605 | | #if defined( _WIN32 ) |
606 | | static inline unsigned int bit_scan_reverse( int a ) |
607 | | { |
608 | | unsigned long idx = 0; |
609 | | _BitScanReverse( &idx, a ); |
610 | | return idx; |
611 | | } |
612 | | #elif defined( __GNUC__ ) |
613 | | static inline unsigned int bit_scan_reverse( int a ) |
614 | 0 | { |
615 | 0 | return __builtin_clz( a ) ^ ( 8 * sizeof( a ) - 1 ); |
616 | 0 | } Unexecuted instantiation: vvdec.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: vvdecimpl.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: CommonDefX86.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: FilmGrain.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: FilmGrainImpl.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: FilmGrainImpl_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: FilmGrainImpl_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: BitStream.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Buffer.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: InterpolationFilter.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: LoopFilter.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: PicListManager.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Picture.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: RdCost.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Rom.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: SEI_internal.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: SampleAdaptiveOffset.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Slice.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Unit.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: UnitTools.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: DecLib.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: DecLibParser.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: DecLibRecon.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: DecSlice.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: HLSyntaxReader.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: NALread.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: SEIread.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: VLCReader.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: ThreadPool.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: InitX86.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: AdaptiveLoopFilter_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Buffer_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: InterPred_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: InterpolationFilter_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: IntraPred_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: LoopFilter_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Picture_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Quant_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: RdCost_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: SampleAdaptiveOffset_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Trafo_sse41.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: AdaptiveLoopFilter_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Buffer_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: InterPred_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: InterpolationFilter_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: IntraPred_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: LoopFilter_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Picture_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Quant_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: RdCost_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: SampleAdaptiveOffset_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Trafo_avx2.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: AdaptiveLoopFilter.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: CodingStructure.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Contexts.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: InterPrediction.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: IntraPrediction.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: MatrixIntraPrediction.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Mv.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: ParameterSetManager.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: PicYuvMD5.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Quant.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: Reshape.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: RomLFNST.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: TrQuant.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: TrQuant_EMT.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: UnitPartitioner.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: WeightPrediction.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: BinDecoder.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: CABACReader.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: DecCu.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: ContextModelling.cpp:vvdec::bit_scan_reverse(int) Unexecuted instantiation: RomTr.cpp:vvdec::bit_scan_reverse(int) |
617 | | #endif |
618 | | |
619 | | #if ENABLE_SIMD_LOG2 |
620 | | static inline int getLog2( int val ) |
621 | 0 | { |
622 | 0 | return bit_scan_reverse( val ); |
623 | 0 | } Unexecuted instantiation: vvdec.cpp:vvdec::getLog2(int) Unexecuted instantiation: vvdecimpl.cpp:vvdec::getLog2(int) Unexecuted instantiation: CommonDefX86.cpp:vvdec::getLog2(int) Unexecuted instantiation: FilmGrain.cpp:vvdec::getLog2(int) Unexecuted instantiation: FilmGrainImpl.cpp:vvdec::getLog2(int) Unexecuted instantiation: FilmGrainImpl_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: FilmGrainImpl_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: BitStream.cpp:vvdec::getLog2(int) Unexecuted instantiation: Buffer.cpp:vvdec::getLog2(int) Unexecuted instantiation: InterpolationFilter.cpp:vvdec::getLog2(int) Unexecuted instantiation: LoopFilter.cpp:vvdec::getLog2(int) Unexecuted instantiation: PicListManager.cpp:vvdec::getLog2(int) Unexecuted instantiation: Picture.cpp:vvdec::getLog2(int) Unexecuted instantiation: RdCost.cpp:vvdec::getLog2(int) Unexecuted instantiation: Rom.cpp:vvdec::getLog2(int) Unexecuted instantiation: SEI_internal.cpp:vvdec::getLog2(int) Unexecuted instantiation: SampleAdaptiveOffset.cpp:vvdec::getLog2(int) Unexecuted instantiation: Slice.cpp:vvdec::getLog2(int) Unexecuted instantiation: Unit.cpp:vvdec::getLog2(int) Unexecuted instantiation: UnitTools.cpp:vvdec::getLog2(int) Unexecuted instantiation: DecLib.cpp:vvdec::getLog2(int) Unexecuted instantiation: DecLibParser.cpp:vvdec::getLog2(int) Unexecuted instantiation: DecLibRecon.cpp:vvdec::getLog2(int) Unexecuted instantiation: DecSlice.cpp:vvdec::getLog2(int) Unexecuted instantiation: HLSyntaxReader.cpp:vvdec::getLog2(int) Unexecuted instantiation: NALread.cpp:vvdec::getLog2(int) Unexecuted instantiation: SEIread.cpp:vvdec::getLog2(int) Unexecuted instantiation: VLCReader.cpp:vvdec::getLog2(int) Unexecuted instantiation: ThreadPool.cpp:vvdec::getLog2(int) Unexecuted instantiation: InitX86.cpp:vvdec::getLog2(int) Unexecuted instantiation: AdaptiveLoopFilter_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: Buffer_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: InterPred_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: InterpolationFilter_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: IntraPred_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: LoopFilter_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: Picture_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: Quant_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: RdCost_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: SampleAdaptiveOffset_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: Trafo_sse41.cpp:vvdec::getLog2(int) Unexecuted instantiation: AdaptiveLoopFilter_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: Buffer_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: InterPred_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: InterpolationFilter_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: IntraPred_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: LoopFilter_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: Picture_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: Quant_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: RdCost_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: SampleAdaptiveOffset_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: Trafo_avx2.cpp:vvdec::getLog2(int) Unexecuted instantiation: AdaptiveLoopFilter.cpp:vvdec::getLog2(int) Unexecuted instantiation: CodingStructure.cpp:vvdec::getLog2(int) Unexecuted instantiation: Contexts.cpp:vvdec::getLog2(int) Unexecuted instantiation: InterPrediction.cpp:vvdec::getLog2(int) Unexecuted instantiation: IntraPrediction.cpp:vvdec::getLog2(int) Unexecuted instantiation: MatrixIntraPrediction.cpp:vvdec::getLog2(int) Unexecuted instantiation: Mv.cpp:vvdec::getLog2(int) Unexecuted instantiation: ParameterSetManager.cpp:vvdec::getLog2(int) Unexecuted instantiation: PicYuvMD5.cpp:vvdec::getLog2(int) Unexecuted instantiation: Quant.cpp:vvdec::getLog2(int) Unexecuted instantiation: Reshape.cpp:vvdec::getLog2(int) Unexecuted instantiation: RomLFNST.cpp:vvdec::getLog2(int) Unexecuted instantiation: TrQuant.cpp:vvdec::getLog2(int) Unexecuted instantiation: TrQuant_EMT.cpp:vvdec::getLog2(int) Unexecuted instantiation: UnitPartitioner.cpp:vvdec::getLog2(int) Unexecuted instantiation: WeightPrediction.cpp:vvdec::getLog2(int) Unexecuted instantiation: BinDecoder.cpp:vvdec::getLog2(int) Unexecuted instantiation: CABACReader.cpp:vvdec::getLog2(int) Unexecuted instantiation: DecCu.cpp:vvdec::getLog2(int) Unexecuted instantiation: ContextModelling.cpp:vvdec::getLog2(int) Unexecuted instantiation: RomTr.cpp:vvdec::getLog2(int) |
624 | | #else |
625 | | extern int8_t g_aucLog2[MAX_CU_SIZE + 1]; |
626 | | static inline int getLog2( int val ) |
627 | | { |
628 | | CHECKD( g_aucLog2[2] != 1, "g_aucLog2[] has not been initialized yet." ); |
629 | | if( val > 0 && val < (int) sizeof( g_aucLog2 ) ) |
630 | | { |
631 | | return g_aucLog2[val]; |
632 | | } |
633 | | return std::log2( val ); |
634 | | } |
635 | | #endif |
636 | | |
637 | | //CASE-BREAK for breakpoints |
638 | | #if defined ( _MSC_VER ) && defined ( _DEBUG ) |
639 | | #define _CASE(_x) if(_x) |
640 | | #define _BREAK while(0); |
641 | | #define _AREA_AT(_a,_x,_y,_w,_h) (_a.x==_x && _a.y==_y && _a.width==_w && _a.height==_h) |
642 | | #define _AREA_CONTAINS(_a,_x,_y) (_a.contains( Position{ _x, _y} )) |
643 | | #define _UNIT_AREA_AT(_a,_x,_y,_w,_h) (_a.Y().x==_x && _a.Y().y==_y && _a.Y().width==_w && _a.Y().height==_h) |
644 | | #else |
645 | | #define _CASE(...) |
646 | | #define _BREAK |
647 | | #define _AREA_AT(...) |
648 | | #define _AREA_CONTAINS(_a,_x,_y) |
649 | | #define _UNIT_AREA_AT(_a,_x,_y,_w,_h) |
650 | | #endif |
651 | | |
652 | | #ifdef TRACE_ENABLE_ITT |
653 | | } |
654 | | # include <ittnotify.h> |
655 | | namespace vvdec { |
656 | | |
657 | | # define ITT_TASKSTART( d, t ) __itt_task_begin( ( d ), __itt_null, __itt_null, ( t ) ) |
658 | | # define ITT_TASKEND( d, t ) __itt_task_end ( ( d ) ) |
659 | | |
660 | | # define ITT_SYNCPREP( p ) __itt_sync_prepare ( & p ) |
661 | | # define ITT_SYNCACQ( p ) __itt_sync_acquired ( & p ) |
662 | | # define ITT_SYNCREL( p ) __itt_sync_releasing( & p ) |
663 | | |
664 | | # define ITT_COUNTSET( c, v ) __itt_counter_set_value( c, &v ) |
665 | | # define ITT_COUNTINC( c ) __itt_counter_inc( c ) |
666 | | # define ITT_COUNTDEC( c ) __itt_counter_dec( c ) |
667 | | # define ITT_COUNTADD( c, v ) __itt_counter_inc_delta( c, &v ) |
668 | | # define ITT_COUNTSUB( c, v ) __itt_counter_dec_delta( c, &v ) |
669 | | #else //!TRACE_ENABLE_ITT |
670 | | # define ITT_TASKSTART( d, t ) |
671 | | # define ITT_TASKEND( d, t ) |
672 | | |
673 | | # define ITT_SYNCPREP( p ) |
674 | | # define ITT_SYNCACQ( p ) |
675 | | # define ITT_SYNCREL( p ) |
676 | | |
677 | | # define ITT_COUNTSET( c, v ) |
678 | | # define ITT_COUNTINC( c ) |
679 | | # define ITT_COUNTDEC( c ) |
680 | | # define ITT_COUNTADD( c, v ) |
681 | | # define ITT_COUNTSUB( c, v ) |
682 | | #endif //!TRACE_ENABLE_ITT |
683 | | |
684 | | //! \} |
685 | | |
686 | | } // namespace vvdec |