/work/svt-av1/Source/Lib/Codec/definitions.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright(c) 2019 Intel Corporation |
3 | | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
4 | | * |
5 | | * This source code is subject to the terms of the BSD 2 Clause License and |
6 | | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
7 | | * was not distributed with this source code in the LICENSE file, you can |
8 | | * obtain it at https://www.aomedia.org/license/software-license. If the Alliance for Open |
9 | | * Media Patent License 1.0 was not distributed with this source code in the |
10 | | * PATENTS file, you can obtain it at https://www.aomedia.org/license/patent-license. |
11 | | */ |
12 | | // |
13 | | #ifndef EbDefinitions_h |
14 | | #define EbDefinitions_h |
15 | | |
16 | | #include <stdint.h> |
17 | | #include <stdlib.h> |
18 | | #include <string.h> |
19 | | #include <stddef.h> |
20 | | #include <assert.h> |
21 | | #include "EbSvtAv1.h" |
22 | | #include "EbSvtAv1Enc.h" |
23 | | #include <stdbool.h> |
24 | | |
25 | | #ifdef _WIN32 |
26 | | #define inline __inline |
27 | | #elif __GNUC__ |
28 | | #define inline __inline__ |
29 | | #else |
30 | | #define inline |
31 | | #endif |
32 | | |
33 | | #define INLINE inline |
34 | | |
35 | | #ifdef _WIN32 |
36 | | #define NOINLINE __declspec(noinline) |
37 | | #else |
38 | | #define NOINLINE __attribute__((noinline)) |
39 | | #endif |
40 | | |
41 | | #if EXCLUDE_HASH |
42 | | #define EB_LINE_NUM 0 |
43 | | #else |
44 | 0 | #define EB_LINE_NUM __LINE__ |
45 | | #endif |
46 | | |
47 | | #ifdef __cplusplus |
48 | | extern "C" { |
49 | | #endif |
50 | | #define EB_HME_SEARCH_AREA_COLUMN_MAX_COUNT 2 |
51 | | #define EB_HME_SEARCH_AREA_ROW_MAX_COUNT 2 |
52 | | |
53 | 2.37k | #define TASK_PAME 0 |
54 | 480 | #define TASK_TFME 1 |
55 | 474 | #define TASK_SUPERRES_RE_ME 3 |
56 | 4 | #define TASK_DG_DETECTOR_HME 4 |
57 | 0 | #define MAX_TPL_GROUP_SIZE 512 //enough to cover 6L gop |
58 | | |
59 | 0 | #define MAX_TPL_EXT_GROUP_SIZE MAX_TPL_GROUP_SIZE |
60 | 474 | #define OUT_Q_ADVANCE(h, size) (((h) == (size) - 1) ? 0 : (h) + 1) |
61 | 474 | #define MIN_LAD_MG 1 |
62 | 0 | #define RC_DEFAULT_LAD_MG 2 // default look ahead value for rate control |
63 | | void svt_aom_assert_err(uint32_t condition, char* err_msg); |
64 | | |
65 | 0 | #define TPL_DEP_COST_SCALE_LOG2 4 |
66 | | #define MAX_TX_WEIGHT 500 |
67 | 0 | #define MAX_TPL_LA_SW MAX_TPL_GROUP_SIZE // Max TPL look ahead sliding window size |
68 | | #define UPDATED_LINKS 100 //max number of pictures a dep-Cnt-cleanUp triggering picture can process |
69 | | #define MAX_TILE_CNTS 128 // Annex A.3 |
70 | | |
71 | 0 | #define ALT_REF_QP_THRESH 20 |
72 | | // Q threshold for high precision mv. |
73 | 0 | #define HIGH_PRECISION_MV_QTHRESH_0 128 |
74 | 0 | #define HIGH_PRECISION_MV_QTHRESH_1 196 |
75 | 0 | #define HIGH_PRECISION_REF_PERC_TH 50 |
76 | | // Actions in the second pass: Frame and SB QP assignment and temporal filtering strenght change |
77 | 0 | #define AOM_INTERP_EXTEND 4 |
78 | | #define AOM_LEFT_TOP_MARGIN_PX(subsampling) ((AOM_BORDER_IN_PIXELS >> subsampling) - AOM_INTERP_EXTEND) |
79 | | #define AOM_LEFT_TOP_MARGIN_SCALED(subsampling) (AOM_LEFT_TOP_MARGIN_PX(subsampling) << SCALE_SUBPEL_BITS) |
80 | | |
81 | 0 | #define DS_SC_FACT 23 |
82 | | |
83 | 474 | #define VQ_NOISE_LVL_TH 15000 |
84 | | #define VQ_STABILITY_ME_VAR_TH 750 |
85 | 0 | #define VQ_PIC_AVG_VARIANCE_TH 1000 |
86 | 0 | #define NUM_MV_COMPONENTS 2 |
87 | 0 | #define NUM_MV_HIST 2 |
88 | | #define MAX_MV_HIST_SIZE (2 * REF_LIST_MAX_DEPTH * NUM_MV_COMPONENTS * NUM_MV_HIST) |
89 | | |
90 | 474 | #define INVALID_LUMA 256 |
91 | | |
92 | 7.42k | #define NEAREST_NEAR_MV_CNT 4 // 1 nearest + 3 near |
93 | | |
94 | | typedef struct SharpnessCtrls { |
95 | | uint8_t scene_transition; |
96 | | uint8_t tf; |
97 | | uint8_t unipred_bias; |
98 | | uint8_t ifs; |
99 | | uint8_t cdef; |
100 | | uint8_t restoration; |
101 | | uint8_t rdoq; |
102 | | } SharpnessCtrls; |
103 | | |
104 | | typedef struct VqCtrls { |
105 | | SharpnessCtrls sharpness_ctrls; |
106 | | } VqCtrls; |
107 | | |
108 | | typedef struct MrpCtrls { |
109 | | /* |
110 | | * Referencing_scheme [0, 2] used only in 3L-5L |
111 | | * referencing_scheme = 0 means that no top - layer pictures will be used as a reference |
112 | | * referencing_scheme = 1 means that all top - layer pictures may be used as a reference |
113 | | * referencing_scheme = 2 means that some top - layer pictures will be used as a reference(depending on their position in the MG) |
114 | | */ |
115 | | uint8_t referencing_scheme; |
116 | | |
117 | | #if !TUNE_SIMPLIFY_SETTINGS |
118 | | // SC signals |
119 | | uint8_t sc_base_ref_list0_count; |
120 | | uint8_t sc_base_ref_list1_count; |
121 | | uint8_t sc_non_base_ref_list0_count; |
122 | | uint8_t sc_non_base_ref_list1_count; |
123 | | // non-SC signals |
124 | | #endif |
125 | | uint8_t base_ref_list0_count; |
126 | | uint8_t base_ref_list1_count; |
127 | | uint8_t non_base_ref_list0_count; |
128 | | uint8_t non_base_ref_list1_count; |
129 | | // Use extra reference frames in the rps list for 5L. |
130 | | uint8_t more_5L_refs; |
131 | | |
132 | | // Limit references to (1,1) if it's safe to do so based on brightness and ME ZZ sad |
133 | | // 0:off 1:brigthness + ME ZZ sad 2:brightness only. action taken at pic level in PD |
134 | | uint8_t safe_limit_nref; |
135 | | // used for mode 1 of safe_limit_nref. zz sad of closest references is smaller than this th |
136 | | // 0: feature off non-zero-value: feature on |
137 | | uint32_t safe_limit_zz_th; |
138 | | // Limit candidate types to LAST, BWD and LAST-BWD |
139 | | bool only_l_bwd; |
140 | | // Limit PME to ref index 0 only |
141 | | bool pme_ref0_only; |
142 | | // Use only best references decided by me in md |
143 | | //0:speed feature off |
144 | | //1:use with high me distortion constraint fast |
145 | | //2:use with TPL constraint faster |
146 | | //3:use with no constraint fastest |
147 | | uint8_t use_best_references; |
148 | | // When LD rtc is used, reduce the number of ref buffers based on the number of references used |
149 | | // and the known rps structure. Signal is set automatically based on refs used. |
150 | | // 0: off, use at least DPB ref buffers. |
151 | | // 1: on; when each ref list uses <=2 refs, reduce the number of ref frame buffers because only |
152 | | // base and layer1 pics are added to the dpb. |
153 | | // 2: on; when each ref list uses <=1 refs, further reduce the number of ref frame buffers because only |
154 | | // one base and one layer1 pic are added to the dpb at a time. |
155 | | uint8_t ld_reduce_ref_buffs; |
156 | | // When flat rtc structure is used, this is the number of refs to use (from previous consecutive frames) |
157 | | uint8_t flat_max_refs; |
158 | | |
159 | | } MrpCtrls; |
160 | | |
161 | | typedef struct TfControls { |
162 | | // Filtering set |
163 | | uint8_t enabled; // Specifies whether the current input will be filtered or not (0: OFF, 1: ON) |
164 | | // Specifies whether the U& V planes will be filered or not (0: OFF (filter plane Y only) |
165 | | // 1: ON (filter all planes) 2: filter Y and decide to filter U and V based on the noise level) |
166 | | uint8_t chroma_lvl; |
167 | | // Specifies whether the motion esimation is used or (0, 0) MVs are used (0: use motion estimation |
168 | | // 1: skip motion estimation search and use (0, 0) MVs |
169 | | uint8_t use_zz_based_filter; |
170 | | // Number of reference frame(s) set |
171 | | uint8_t num_past_pics; // Specifies the default number of frame(s) from past |
172 | | uint8_t num_future_pics; // Specifies the default number of frame(s) from future |
173 | | // Specifies whether the number of reference frame(s) will be modified or not |
174 | | // For INTRA, the modulation uses the noise level |
175 | | // For BASE and L1, the modulation uses the filt_INTRA-to-unfilterd_INTRA distortion range |
176 | | uint8_t modulate_pics; |
177 | | // Specifies whether to use the key- rame noise level for all inputs or to re - compute the |
178 | | // noise level for each input |
179 | | uint8_t use_intra_for_noise_est; |
180 | | // Specifies the maximum number of frame(s) from past(after all adjustments) |
181 | | uint8_t max_num_past_pics; |
182 | | // Specifies the maximum number of frame(s) from future(after all adjustments) |
183 | | uint8_t max_num_future_pics; |
184 | | |
185 | | // Motion search |
186 | | // Specifies the accuracy of the ME search (note that ME performs a HME search, then a Full - |
187 | | // Pel search). |
188 | | uint8_t hme_me_level; |
189 | | // Specifies the accuracy of the Half-Pel search (0: OFF, 1 : perform refinement for the 8 |
190 | | // neighboring positions, 2/3 : perform refinement for the 2 horizontal-neighboring positions |
191 | | // and for the 2 vertical-neighboring positions, but not for all the 4 diagonal-neighboring |
192 | | // positions = function(horizontal & vertical distortions) |
193 | | uint8_t half_pel_mode; |
194 | | // Specifies the accuracy of the Quarter-Pel search (0: OFF, 1 : perform refinement for the 8 |
195 | | // neighboring positions, 2/3 : perform refinement for the 2 horizontal-neighboring positions |
196 | | // and for the 2 vertical-neighboring positions, but not for all the 4 diagonal-neighboring |
197 | | // positions = function(horizontal & vertical distortions) |
198 | | uint8_t quarter_pel_mode; |
199 | | // Specifies the accuracy of the Eight-Pel search (0: OFF, 1 : perform refinement for the 8 |
200 | | // neighboring positions) |
201 | | uint8_t eight_pel_mode; |
202 | | // Specifies whether the Sub-Pel search for a 10bit input will be performed in 8bit |
203 | | // resolution(0: OFF, 1 : ON, NA if 8bit input) |
204 | | uint8_t use_8bit_subpel; |
205 | | // Specifies whether the Sub-Pel positions that require a 2D interpolation will be tested or not |
206 | | // (0: OFF, 1 : ON, NA if 16x16 block or if the Sub-Pel mode is set to 1) |
207 | | uint8_t avoid_2d_qpel; |
208 | | // Specifies the Sub-Pel search filter type(0: regular, 1 : bilinear, NA if 16x16 block or if |
209 | | // the Sub - Pel mode is set to 1) |
210 | | uint8_t use_2tap; |
211 | | // Specifies whether sub-sampled input / prediction will be used at the distortion computation |
212 | | // of the Sub-Pel search |
213 | | uint8_t sub_sampling_shift; |
214 | | // Specifies the 32x32 prediction error(after subpel) under which the subpel for the 16x16 |
215 | | // block(s) is bypassed |
216 | | uint64_t pred_error_32x32_th; |
217 | | // If true, check 8x8 blocks for TF prediction |
218 | | bool enable_8x8_pred; |
219 | | |
220 | | // Specifies whether to exit ME after HME or not (0: perform both HME and Full-Pel search, else |
221 | | // if the HME distortion is less than me_exit_th then exit after HME(i.e. do not perform the |
222 | | // Full-Pel search) |
223 | | uint32_t me_exit_th; |
224 | | // Specifies whether to perform Sub-Pel search for only the 64x64 block or to use default |
225 | | // size(s) (32x32 or/ and 16x16) (∞: perform Sub-Pel search for default size(s), else if the |
226 | | // deviation between the 64x64 ME distortion and the sum of the 4 32x32 ME distortions is less |
227 | | // than use_pred_64x64_only_th then perform Sub - Pel search for only the 64x64 block |
228 | | uint8_t use_pred_64x64_only_th; |
229 | | // Exit the subpel search if per-pixel distortion/variance is less than the TH (i.e. if the search results so far are "good enough") |
230 | | // 0 is off; higher is more aggressive |
231 | | uint8_t subpel_early_exit_th; |
232 | | // Specifies whether to skip reference frame e.g. 1 = use all frames, 2 = use every other frame, 4 = use 1/4 frames, etc. |
233 | | uint8_t ref_frame_factor; |
234 | | // Specifies whether to tune the params using qp (0: OFF, 1: ON) |
235 | | uint8_t qp_opt; |
236 | | } TfControls; |
237 | | |
238 | | typedef enum GM_LEVEL { |
239 | | GM_FULL = 0, // Exhaustive search mode. |
240 | | GM_DOWN = 1, // Downsampled search mode, with a downsampling factor of 2 in each dimension |
241 | | GM_DOWN16 = 2, // Downsampled search mode, with a downsampling factor of 4 in each dimension |
242 | | // The search mode is set adaptively (whether GM_FULL or GM_DOWN) based on the |
243 | | // average ME distortion |
244 | | GM_ADAPT_0 = 3, |
245 | | // The search mode is set adaptively (whether GM_DOWN or GM_DOWN16) based on the |
246 | | // average ME distortion, and the picture variance |
247 | | GM_ADAPT_1 = 4, |
248 | | } GM_LEVEL; |
249 | | |
250 | | typedef enum SqWeightOffsets { |
251 | | CONSERVATIVE_OFFSET_0 = 5, |
252 | | CONSERVATIVE_OFFSET_1 = 10, |
253 | | AGGRESSIVE_OFFSET_0 = -5, |
254 | | AGGRESSIVE_OFFSET_1 = -10 |
255 | | } SqWeightOffsets; |
256 | | |
257 | 474 | #define COEFF_LVL_INTRA_TH_0 25 |
258 | 474 | #define COEFF_LVL_INTRA_TH_1 50 |
259 | 474 | #define COEFF_LVL_INTRA_TH_2 150 |
260 | | |
261 | 0 | #define COEFF_LVL_INTER_TH_0 (5833 / 96) |
262 | 0 | #define COEFF_LVL_INTER_TH_1 (5833 / 48) |
263 | 0 | #define COEFF_LVL_INTER_TH_2 (16666 / 48) |
264 | | |
265 | | typedef enum InputCoeffLvl { |
266 | | VLOW_LVL = 0, |
267 | | LOW_LVL = 1, |
268 | | NORMAL_LVL = 2, |
269 | | HIGH_LVL = 3, |
270 | | INVALID_LVL = ~0, |
271 | | } InputCoeffLvl; |
272 | | |
273 | | typedef struct Buf2D { |
274 | | uint8_t* buf; |
275 | | uint8_t* buf0; |
276 | | int width; |
277 | | int height; |
278 | | int stride; |
279 | | } Buf2D; |
280 | | |
281 | | typedef struct MvLimits { |
282 | | int col_min; |
283 | | int col_max; |
284 | | int row_min; |
285 | | int row_max; |
286 | | } MvLimits; |
287 | | |
288 | | typedef struct { |
289 | | uint8_t by; |
290 | | uint8_t bx; |
291 | | } CdefList; |
292 | | |
293 | | /*!\brief force enum to be unsigned 1 byte*/ |
294 | | #define UENUM1BYTE(enumvar) \ |
295 | | ; \ |
296 | | typedef uint8_t enumvar |
297 | | |
298 | | enum { |
299 | | // No recode. |
300 | | DISALLOW_RECODE = 0, |
301 | | // Allow recode for KF and exceeding maximum frame bandwidth. |
302 | | ALLOW_RECODE_KFMAXBW = 1, |
303 | | // Allow recode only for KF/ARF/GF frames. |
304 | | ALLOW_RECODE_KFARFGF = 2, |
305 | | // Allow recode for all frames based on bitrate constraints. |
306 | | ALLOW_RECODE = 3, |
307 | | // Default setting, ALLOW_RECODE_KFARFGF for M0~5 and |
308 | | // ALLOW_RECODE_KFMAXBW for M6~8. |
309 | | ALLOW_RECODE_DEFAULT = 4, |
310 | | } UENUM1BYTE(RecodeLoopType); |
311 | | |
312 | | /********************************************************/ |
313 | | /****************** Pre-defined Values ******************/ |
314 | | /********************************************************/ |
315 | | |
316 | | /* maximum number of frames allowed for the Alt-ref picture computation |
317 | | * this number can be increased by increasing the constant |
318 | | * FUTURE_WINDOW_WIDTH defined in EbPictureDecisionProcess.c |
319 | | */ |
320 | 0 | #define ALTREF_MAX_NFRAMES 33 |
321 | | #define PAD_VALUE (128 + 32) |
322 | 0 | #define TF_MAX_EXTENSION 6 // Max additional tf pics after modulation per side |
323 | 0 | #define TF_MAX_BASE_REF_PICS 7 // Max tf pics at each side for BASE |
324 | 0 | #define TF_MAX_L1_REF_PICS_6L 2 // Max additional tf pics at each side for L1 for 6L hierarchy |
325 | 0 | #define TF_MAX_L1_REF_PICS_SUB_6L 1 // Max additional tf pics at each side for L1 for sub-6L hierarchy |
326 | | |
327 | 853k | #define MAX_TXB_COUNT 16 // Maximum number of transform blocks per depth |
328 | | #define MAX_TXB_COUNT_UV 4 // Maximum number of transform blocks per depth for chroma planes |
329 | 1.42k | #define MAX_LAD 120 // max lookahead-distance 2x60fps |
330 | 8.15M | #define ROUND_UV(x) (((x) >> 3) << 3) |
331 | 8.05k | #define SWITCHABLE_FILTER_CONTEXTS ((SWITCHABLE_FILTERS + 1) * 4) |
332 | 0 | #define CFL_BUF_LINE (32) |
333 | | #define CFL_BUF_LINE_I128 (CFL_BUF_LINE >> 3) |
334 | | #define CFL_BUF_LINE_I256 (CFL_BUF_LINE >> 4) |
335 | | #define CFL_BUF_SQUARE (CFL_BUF_LINE * CFL_BUF_LINE) |
336 | | /*********************************** AV1_OBU ********************************/ |
337 | 785k | #define INVALID_NEIGHBOR_DATA 0xFFu |
338 | | #define CONFIG_BITSTREAM_DEBUG 0 |
339 | | #define CONFIG_COEFFICIENT_RANGE_CHECKING 0 |
340 | | #define CONFIG_ENTROPY_STATS 0 |
341 | | |
342 | | // Max superblock size |
343 | 1.05M | #define MAX_SB_SIZE_LOG2 7 |
344 | 0 | #define MAX_SB_SIZE (1 << MAX_SB_SIZE_LOG2) |
345 | 0 | #define MAX_SB_SQUARE (MAX_SB_SIZE * MAX_SB_SIZE) |
346 | | #define SB_STRIDE_Y MAX_SB_SIZE |
347 | | #define SB_STRIDE_UV (MAX_SB_SIZE >> 1) |
348 | | |
349 | 0 | #define INTERPOLATION_OFFSET 8 |
350 | | #define STRIDE_PACK (MAX_SB_SIZE + (INTERPOLATION_OFFSET << 1)) |
351 | | #define PACKED_BUFFER_SIZE ((MAX_SB_SIZE + (INTERPOLATION_OFFSET << 1)) * (MAX_SB_SIZE + (INTERPOLATION_OFFSET << 1))) |
352 | | |
353 | | // Min superblock size |
354 | 0 | #define MIN_SB_SIZE 64 |
355 | 0 | #define MIN_SB_SIZE_LOG2 6 |
356 | | |
357 | | // Pixels per Mode Info (MI) unit |
358 | 15.4M | #define MI_SIZE_LOG2 2 |
359 | 1.02M | #define MI_SIZE (1 << MI_SIZE_LOG2) |
360 | | |
361 | | // MI-units per max superblock (MI Block - MIB) |
362 | 1.05M | #define MAX_MIB_SIZE_LOG2 (MAX_SB_SIZE_LOG2 - MI_SIZE_LOG2) |
363 | 474 | #define MAX_MIB_SIZE (1 << MAX_MIB_SIZE_LOG2) |
364 | | |
365 | | // MI-units per min superblock |
366 | 0 | #define SB64_MIB_SIZE 16 |
367 | | |
368 | | // MI-units per min superblock |
369 | | #define MIN_MIB_SIZE_LOG2 (MIN_SB_SIZE_LOG2 - MI_SIZE_LOG2) |
370 | | |
371 | | // Mask to extract MI offset within max MIB |
372 | | #define MAX_MIB_MASK (MAX_MIB_SIZE - 1) |
373 | | |
374 | | // Maximum size of a loop restoration tile |
375 | | #define RESTORATION_TILESIZE_MAX 256 |
376 | | // Maximum number of tile rows and tile columns |
377 | 0 | #define MAX_TILE_ROWS 64 |
378 | | #define MAX_TILE_COLS 64 |
379 | | |
380 | 0 | #define MAX_VARTX_DEPTH 2 |
381 | 16.3k | #define MI_SIZE_64X64 (64 >> MI_SIZE_LOG2) |
382 | | #define MI_SIZE_128X128 (128 >> MI_SIZE_LOG2) |
383 | 0 | #define MAX_PALETTE_SQUARE (64 * 64) |
384 | | // Maximum number of colors in a palette. |
385 | 0 | #define PALETTE_MAX_SIZE 8 |
386 | | // Minimum number of colors in a palette. |
387 | 0 | #define PALETTE_MIN_SIZE 2 |
388 | 0 | #define FRAME_OFFSET_BITS 5 |
389 | 0 | #define MAX_FRAME_DISTANCE ((1 << FRAME_OFFSET_BITS) - 1) |
390 | | |
391 | | // 4 frame filter levels: y plane vertical, y plane horizontal, |
392 | | // u plane, and v plane |
393 | 0 | #define FRAME_LF_COUNT 4 |
394 | 0 | #define MAX_MODE_LF_DELTAS 2 |
395 | 474 | #define LEVEL_MAJOR_BITS 3 |
396 | 948 | #define LEVEL_MINOR_BITS 2 |
397 | 474 | #define LEVEL_BITS (LEVEL_MAJOR_BITS + LEVEL_MINOR_BITS) |
398 | | |
399 | 474 | #define LEVEL_MAJOR_MIN 2 |
400 | 0 | #define LEVEL_MAJOR_MAX ((1 << LEVEL_MAJOR_BITS) - 1 + LEVEL_MAJOR_MIN) |
401 | | #define LEVEL_MINOR_MIN 0 |
402 | 0 | #define LEVEL_MINOR_MAX ((1 << LEVEL_MINOR_BITS) - 1) |
403 | | |
404 | 0 | #define OP_POINTS_CNT_MINUS_1_BITS 5 |
405 | 0 | #define OP_POINTS_IDC_BITS 12 |
406 | 2.37k | #define TX_SIZE_LUMA_MIN (TX_4X4) |
407 | | /* We don't need to code a transform size unless the allowed size is at least |
408 | | one more than the minimum. */ |
409 | 2.37k | #define TX_SIZE_CTX_MIN (TX_SIZE_LUMA_MIN + 1) |
410 | | |
411 | | // Maximum tx_size categories |
412 | 2.37k | #define MAX_TX_CATS (TX_SIZES - TX_SIZE_CTX_MIN) |
413 | 39.6k | #define MAX_TX_DEPTH 2 |
414 | | |
415 | 37.2k | #define MAX_TX_SIZE_LOG2 (6) |
416 | 37.2k | #define MAX_TX_SIZE (1 << MAX_TX_SIZE_LOG2) |
417 | | #define MIN_TX_SIZE_LOG2 2 |
418 | | #define MIN_TX_SIZE (1 << MIN_TX_SIZE_LOG2) |
419 | | #define MAX_TX_SQUARE (MAX_TX_SIZE * MAX_TX_SIZE) |
420 | | |
421 | | // Pad 4 extra columns to remove horizontal availability check. |
422 | 80 | #define TX_PAD_HOR_LOG2 2 |
423 | 45.1k | #define TX_PAD_HOR 4 |
424 | | // Pad 6 extra rows (2 on top and 4 on bottom) to remove vertical availability |
425 | | // check. |
426 | 45.1k | #define TX_PAD_TOP 2 |
427 | 0 | #define TX_PAD_BOTTOM 4 |
428 | | #define TX_PAD_VER (TX_PAD_TOP + TX_PAD_BOTTOM) |
429 | | // Pad 16 extra bytes to avoid reading overflow in SIMD optimization. |
430 | 0 | #define TX_PAD_END 16 |
431 | | #define TX_PAD_2D ((MAX_TX_SIZE + TX_PAD_HOR) * (MAX_TX_SIZE + TX_PAD_VER) + TX_PAD_END) |
432 | 0 | #define DIST_PRECISION_BITS 4 |
433 | | |
434 | 474 | #define PROFILE_BITS 3 |
435 | | |
436 | | // AV1 Loop Filter |
437 | 0 | #define FILTER_BITS 7 |
438 | | #define SUBPEL_BITS 4 |
439 | | #define SUBPEL_MASK ((1 << SUBPEL_BITS) - 1) |
440 | | #define SUBPEL_SHIFTS (1 << SUBPEL_BITS) |
441 | | #define SUBPEL_TAPS 8 |
442 | | |
443 | | #define SCALE_SUBPEL_BITS 10 |
444 | | #define SCALE_SUBPEL_SHIFTS (1 << SCALE_SUBPEL_BITS) |
445 | | #define SCALE_SUBPEL_MASK (SCALE_SUBPEL_SHIFTS - 1) |
446 | | #define SCALE_EXTRA_BITS (SCALE_SUBPEL_BITS - SUBPEL_BITS) |
447 | | #define SCALE_EXTRA_OFF ((1 << SCALE_EXTRA_BITS) / 2) |
448 | | |
449 | 0 | #define LEAST_SQUARES_SAMPLES_MAX_BITS 3 |
450 | 0 | #define LEAST_SQUARES_SAMPLES_MAX (1 << LEAST_SQUARES_SAMPLES_MAX_BITS) |
451 | | #define SAMPLES_ARRAY_SIZE (LEAST_SQUARES_SAMPLES_MAX * 2) |
452 | | |
453 | | typedef int16_t InterpKernel[SUBPEL_TAPS]; |
454 | | |
455 | | /***************************************************/ |
456 | | /****************** Helper Macros ******************/ |
457 | | /***************************************************/ |
458 | | /* Shift down with rounding for use when n >= 0, value >= 0 */ |
459 | 7.32M | #define ROUND_POWER_OF_TWO(value, n) (((value) + (((1 << (n)) >> 1))) >> (n)) |
460 | | |
461 | | /* Shift down with rounding for signed integers, for use when n >= 0 */ |
462 | | #define ROUND_POWER_OF_TWO_SIGNED(value, n) \ |
463 | 0 | (((value) < 0) ? -ROUND_POWER_OF_TWO(-(value), (n)) : ROUND_POWER_OF_TWO((value), (n))) |
464 | | |
465 | | /* Shift down with rounding for use when n >= 0, value >= 0 for (64 bit) */ |
466 | 0 | #define ROUND_POWER_OF_TWO_64(value, n) (((value) + ((((int64_t)1 << (n)) >> 1))) >> (n)) |
467 | | |
468 | | /* Shift down with rounding for signed integers, for use when n >= 0 (64 bit) */ |
469 | | #define ROUND_POWER_OF_TWO_SIGNED_64(value, n) \ |
470 | 0 | (((value) < 0) ? -ROUND_POWER_OF_TWO_64(-(value), (n)) : ROUND_POWER_OF_TWO_64((value), (n))) |
471 | | |
472 | | #define IS_POWER_OF_TWO(x) (((x) & ((x) - 1)) == 0) |
473 | | |
474 | | #ifdef __cplusplus |
475 | | #define EB_EXTERN extern "C" |
476 | | #else |
477 | | #define EB_EXTERN |
478 | | #endif // __cplusplus |
479 | | |
480 | | #ifdef _WIN32 |
481 | | #define FOPEN(f, s, m) fopen_s(&f, s, m) |
482 | | #else |
483 | 0 | #define FOPEN(f, s, m) f = fopen(s, m) |
484 | | #endif |
485 | | |
486 | 7.54k | #define IMPLIES(a, b) (!(a) || (b)) // Logical 'a implies b' (or 'a -> b') |
487 | | #if (defined(__GNUC__) && __GNUC__) || defined(__SUNPRO_C) |
488 | 3.03M | #define DECLARE_ALIGNED(n, typ, val) typ val __attribute__((aligned(n))) |
489 | | #elif defined(_WIN32) |
490 | | #define DECLARE_ALIGNED(n, typ, val) __declspec(align(n)) typ val |
491 | | #else |
492 | | #warning No alignment directives known for this compiler. |
493 | | #define DECLARE_ALIGNED(n, typ, val) typ val |
494 | | #endif |
495 | | |
496 | | #ifdef _MSC_VER |
497 | | #define EB_ALIGN(n) __declspec(align(n)) |
498 | | #elif defined(__GNUC__) |
499 | 127k | #define EB_ALIGN(n) __attribute__((__aligned__(n))) |
500 | | #else |
501 | | #define EB_ALIGN(n) |
502 | | #endif |
503 | | |
504 | | #ifndef EB_LIKELY |
505 | | #if HAVE_BUILTIN_EXPECT |
506 | | #define EB_LIKELY(x) __builtin_expect(!!(x), 1) |
507 | 0 | #define EB_UNLIKELY(x) __builtin_expect(!!(x), 0) |
508 | | #else |
509 | | #define EB_LIKELY(x) (x) |
510 | | #define EB_UNLIKELY(x) (x) |
511 | | #endif |
512 | | #endif |
513 | | |
514 | | #if defined(__clang__) && defined(__has_warning) |
515 | | #if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") |
516 | | #define AOM_FALLTHROUGH_INTENDED [[clang::fallthrough]] // NOLINT |
517 | | #endif |
518 | | #elif defined(__GNUC__) && __GNUC__ >= 7 |
519 | | #define AOM_FALLTHROUGH_INTENDED __attribute__((fallthrough)) // NOLINT |
520 | | #endif |
521 | | |
522 | | #ifndef AOM_FALLTHROUGH_INTENDED |
523 | | #define AOM_FALLTHROUGH_INTENDED \ |
524 | 485k | do { \ |
525 | 485k | } while (0) |
526 | | #endif |
527 | | |
528 | | #ifdef _MSC_VER |
529 | | #define AOM_FORCE_INLINE __forceinline |
530 | | #define AOM_INLINE __inline |
531 | | #else |
532 | | #define AOM_FORCE_INLINE __inline__ __attribute__((always_inline)) |
533 | | #define AOM_INLINE inline |
534 | | #endif |
535 | | |
536 | | #define SIMD_INLINE static AOM_FORCE_INLINE |
537 | | |
538 | | //*********************************************************************************************************************// |
539 | | // mem.h |
540 | | /* shift right or left depending on sign of n */ |
541 | 32.2k | #define RIGHT_SIGNED_SHIFT(value, n) ((n) < 0 ? ((value) << (-(n))) : ((value) >> (n))) |
542 | | //*********************************************************************************************************************// |
543 | | // mem_ops.h |
544 | | #ifndef MAU_T |
545 | | /* Minimum Access Unit for this target */ |
546 | 0 | #define MAU_T uint8_t |
547 | | #endif |
548 | | |
549 | | #ifndef MEM_VALUE_T |
550 | | #define MEM_VALUE_T int32_t |
551 | | #endif |
552 | | |
553 | | #undef MEM_VALUE_T_SZ_BITS |
554 | | #define MEM_VALUE_T_SZ_BITS (sizeof(MEM_VALUE_T) << 3) |
555 | | |
556 | 0 | static __inline void mem_put_le16(void* vmem, MEM_VALUE_T val) { |
557 | 0 | MAU_T* mem = (MAU_T*)vmem; |
558 | |
|
559 | 0 | mem[0] = (MAU_T)((val >> 0) & 0xff); |
560 | 0 | mem[1] = (MAU_T)((val >> 8) & 0xff); |
561 | 0 | } Unexecuted instantiation: enc_handle.c:mem_put_le16 Unexecuted instantiation: enc_settings.c:mem_put_le16 Unexecuted instantiation: metadata_handle.c:mem_put_le16 Unexecuted instantiation: aom_dsp_rtcd.c:mem_put_le16 Unexecuted instantiation: av1me.c:mem_put_le16 Unexecuted instantiation: bitstream_unit.c:mem_put_le16 Unexecuted instantiation: cdef_process.c:mem_put_le16 Unexecuted instantiation: common_dsp_rtcd.c:mem_put_le16 Unexecuted instantiation: common_utils.c:mem_put_le16 Unexecuted instantiation: convolve.c:mem_put_le16 Unexecuted instantiation: corner_match.c:mem_put_le16 Unexecuted instantiation: deblocking_common.c:mem_put_le16 Unexecuted instantiation: dlf_process.c:mem_put_le16 Unexecuted instantiation: enc_cdef.c:mem_put_le16 Unexecuted instantiation: enc_dec_process.c:mem_put_le16 Unexecuted instantiation: enc_dec_results.c:mem_put_le16 Unexecuted instantiation: enc_dec_tasks.c:mem_put_le16 Unexecuted instantiation: enc_inter_prediction.c:mem_put_le16 Unexecuted instantiation: enc_intra_prediction.c:mem_put_le16 Unexecuted instantiation: enc_mode_config.c:mem_put_le16 Unexecuted instantiation: entropy_coding.c:mem_put_le16 Unexecuted instantiation: ec_process.c:mem_put_le16 Unexecuted instantiation: ec_results.c:mem_put_le16 Unexecuted instantiation: fft.c:mem_put_le16 Unexecuted instantiation: full_loop.c:mem_put_le16 Unexecuted instantiation: grainSynthesis.c:mem_put_le16 Unexecuted instantiation: hash.c:mem_put_le16 Unexecuted instantiation: hash_motion.c:mem_put_le16 Unexecuted instantiation: initial_rc_process.c:mem_put_le16 Unexecuted instantiation: initial_rc_results.c:mem_put_le16 Unexecuted instantiation: inter_prediction.c:mem_put_le16 Unexecuted instantiation: intra_prediction.c:mem_put_le16 Unexecuted instantiation: inv_transforms.c:mem_put_le16 Unexecuted instantiation: md_rate_estimation.c:mem_put_le16 Unexecuted instantiation: me_sad_calculation.c:mem_put_le16 Unexecuted instantiation: mode_decision.c:mem_put_le16 Unexecuted instantiation: md_config_process.c:mem_put_le16 Unexecuted instantiation: md_process.c:mem_put_le16 Unexecuted instantiation: motion_estimation.c:mem_put_le16 Unexecuted instantiation: me_process.c:mem_put_le16 Unexecuted instantiation: me_results.c:mem_put_le16 Unexecuted instantiation: neighbor_arrays.c:mem_put_le16 Unexecuted instantiation: noise_model.c:mem_put_le16 Unexecuted instantiation: noise_util.c:mem_put_le16 Unexecuted instantiation: packetization_process.c:mem_put_le16 Unexecuted instantiation: packetization_reorder_queue.c:mem_put_le16 Unexecuted instantiation: palette.c:mem_put_le16 Unexecuted instantiation: pic_analysis_process.c:mem_put_le16 Unexecuted instantiation: pic_analysis_results.c:mem_put_le16 Unexecuted instantiation: pic_buffer_desc.c:mem_put_le16 Unexecuted instantiation: pcs.c:mem_put_le16 Unexecuted instantiation: pd_process.c:mem_put_le16 Unexecuted instantiation: pd_reorder_queue.c:mem_put_le16 Unexecuted instantiation: pd_results.c:mem_put_le16 Unexecuted instantiation: pic_demux_results.c:mem_put_le16 Unexecuted instantiation: pic_manager_process.c:mem_put_le16 Unexecuted instantiation: pic_manager_queue.c:mem_put_le16 Unexecuted instantiation: pic_operators.c:mem_put_le16 Unexecuted instantiation: pred_structure.c:mem_put_le16 Unexecuted instantiation: product_coding_loop.c:mem_put_le16 Unexecuted instantiation: ac_bias.c:mem_put_le16 Unexecuted instantiation: rc_aq.c:mem_put_le16 Unexecuted instantiation: rc_process.c:mem_put_le16 Unexecuted instantiation: rc_results.c:mem_put_le16 Unexecuted instantiation: rc_rtc_cbr.c:mem_put_le16 Unexecuted instantiation: rc_tasks.c:mem_put_le16 Unexecuted instantiation: rc_vbr_cbr.c:mem_put_le16 Unexecuted instantiation: rd_cost.c:mem_put_le16 Unexecuted instantiation: reference_object.c:mem_put_le16 Unexecuted instantiation: resize.c:mem_put_le16 Unexecuted instantiation: resource_coordination_process.c:mem_put_le16 Unexecuted instantiation: resource_coordination_results.c:mem_put_le16 Unexecuted instantiation: rest_process.c:mem_put_le16 Unexecuted instantiation: restoration.c:mem_put_le16 Unexecuted instantiation: restoration_pick.c:mem_put_le16 Unexecuted instantiation: segmentation.c:mem_put_le16 Unexecuted instantiation: segmentation_params.c:mem_put_le16 Unexecuted instantiation: sequence_control_set.c:mem_put_le16 Unexecuted instantiation: src_ops_process.c:mem_put_le16 Unexecuted instantiation: super_res.c:mem_put_le16 Unexecuted instantiation: svt_log.c:mem_put_le16 Unexecuted instantiation: svt_malloc.c:mem_put_le16 Unexecuted instantiation: svt_psnr.c:mem_put_le16 Unexecuted instantiation: svt_threads.c:mem_put_le16 Unexecuted instantiation: sys_resource_manager.c:mem_put_le16 Unexecuted instantiation: kernel_dispatch.c:mem_put_le16 Unexecuted instantiation: temporal_filtering.c:mem_put_le16 Unexecuted instantiation: transforms.c:mem_put_le16 Unexecuted instantiation: utility.c:mem_put_le16 Unexecuted instantiation: vector.c:mem_put_le16 Unexecuted instantiation: warped_motion.c:mem_put_le16 Unexecuted instantiation: blend_a64_mask_c.c:mem_put_le16 Unexecuted instantiation: cfl_c.c:mem_put_le16 Unexecuted instantiation: compute_sad_c.c:mem_put_le16 Unexecuted instantiation: encode_txb_ref_c.c:mem_put_le16 Unexecuted instantiation: filterintra_c.c:mem_put_le16 Unexecuted instantiation: inter_prediction_c.c:mem_put_le16 Unexecuted instantiation: intra_prediction_c.c:mem_put_le16 Unexecuted instantiation: pack_unpack_c.c:mem_put_le16 Unexecuted instantiation: picture_operators_c.c:mem_put_le16 Unexecuted instantiation: sad_av1.c:mem_put_le16 Unexecuted instantiation: variance.c:mem_put_le16 Unexecuted instantiation: adaptive_mv_pred.c:mem_put_le16 Unexecuted instantiation: blend_a64_mask.c:mem_put_le16 Unexecuted instantiation: block_structures.c:mem_put_le16 Unexecuted instantiation: cabac_context_model.c:mem_put_le16 Unexecuted instantiation: cdef.c:mem_put_le16 Unexecuted instantiation: coding_loop.c:mem_put_le16 Unexecuted instantiation: coding_unit.c:mem_put_le16 Unexecuted instantiation: coefficients.c:mem_put_le16 Unexecuted instantiation: deblocking_filter.c:mem_put_le16 Unexecuted instantiation: enc_dec_segments.c:mem_put_le16 Unexecuted instantiation: encode_context.c:mem_put_le16 Unexecuted instantiation: firstpass.c:mem_put_le16 Unexecuted instantiation: global_me.c:mem_put_le16 Unexecuted instantiation: global_me_cost.c:mem_put_le16 Unexecuted instantiation: mcomp.c:mem_put_le16 Unexecuted instantiation: me_context.c:mem_put_le16 Unexecuted instantiation: pass2_strategy.c:mem_put_le16 Unexecuted instantiation: pd_queue.c:mem_put_le16 Unexecuted instantiation: rc_crf_cqp.c:mem_put_le16 Unexecuted instantiation: corner_detect.c:mem_put_le16 Unexecuted instantiation: global_motion.c:mem_put_le16 Unexecuted instantiation: ransac.c:mem_put_le16 Unexecuted instantiation: enc_warped_motion.c:mem_put_le16 |
562 | | |
563 | 0 | static __inline void mem_put_le24(void* vmem, MEM_VALUE_T val) { |
564 | 0 | MAU_T* mem = (MAU_T*)vmem; |
565 | |
|
566 | 0 | mem[0] = (MAU_T)((val >> 0) & 0xff); |
567 | 0 | mem[1] = (MAU_T)((val >> 8) & 0xff); |
568 | 0 | mem[2] = (MAU_T)((val >> 16) & 0xff); |
569 | 0 | } Unexecuted instantiation: enc_handle.c:mem_put_le24 Unexecuted instantiation: enc_settings.c:mem_put_le24 Unexecuted instantiation: metadata_handle.c:mem_put_le24 Unexecuted instantiation: aom_dsp_rtcd.c:mem_put_le24 Unexecuted instantiation: av1me.c:mem_put_le24 Unexecuted instantiation: bitstream_unit.c:mem_put_le24 Unexecuted instantiation: cdef_process.c:mem_put_le24 Unexecuted instantiation: common_dsp_rtcd.c:mem_put_le24 Unexecuted instantiation: common_utils.c:mem_put_le24 Unexecuted instantiation: convolve.c:mem_put_le24 Unexecuted instantiation: corner_match.c:mem_put_le24 Unexecuted instantiation: deblocking_common.c:mem_put_le24 Unexecuted instantiation: dlf_process.c:mem_put_le24 Unexecuted instantiation: enc_cdef.c:mem_put_le24 Unexecuted instantiation: enc_dec_process.c:mem_put_le24 Unexecuted instantiation: enc_dec_results.c:mem_put_le24 Unexecuted instantiation: enc_dec_tasks.c:mem_put_le24 Unexecuted instantiation: enc_inter_prediction.c:mem_put_le24 Unexecuted instantiation: enc_intra_prediction.c:mem_put_le24 Unexecuted instantiation: enc_mode_config.c:mem_put_le24 Unexecuted instantiation: entropy_coding.c:mem_put_le24 Unexecuted instantiation: ec_process.c:mem_put_le24 Unexecuted instantiation: ec_results.c:mem_put_le24 Unexecuted instantiation: fft.c:mem_put_le24 Unexecuted instantiation: full_loop.c:mem_put_le24 Unexecuted instantiation: grainSynthesis.c:mem_put_le24 Unexecuted instantiation: hash.c:mem_put_le24 Unexecuted instantiation: hash_motion.c:mem_put_le24 Unexecuted instantiation: initial_rc_process.c:mem_put_le24 Unexecuted instantiation: initial_rc_results.c:mem_put_le24 Unexecuted instantiation: inter_prediction.c:mem_put_le24 Unexecuted instantiation: intra_prediction.c:mem_put_le24 Unexecuted instantiation: inv_transforms.c:mem_put_le24 Unexecuted instantiation: md_rate_estimation.c:mem_put_le24 Unexecuted instantiation: me_sad_calculation.c:mem_put_le24 Unexecuted instantiation: mode_decision.c:mem_put_le24 Unexecuted instantiation: md_config_process.c:mem_put_le24 Unexecuted instantiation: md_process.c:mem_put_le24 Unexecuted instantiation: motion_estimation.c:mem_put_le24 Unexecuted instantiation: me_process.c:mem_put_le24 Unexecuted instantiation: me_results.c:mem_put_le24 Unexecuted instantiation: neighbor_arrays.c:mem_put_le24 Unexecuted instantiation: noise_model.c:mem_put_le24 Unexecuted instantiation: noise_util.c:mem_put_le24 Unexecuted instantiation: packetization_process.c:mem_put_le24 Unexecuted instantiation: packetization_reorder_queue.c:mem_put_le24 Unexecuted instantiation: palette.c:mem_put_le24 Unexecuted instantiation: pic_analysis_process.c:mem_put_le24 Unexecuted instantiation: pic_analysis_results.c:mem_put_le24 Unexecuted instantiation: pic_buffer_desc.c:mem_put_le24 Unexecuted instantiation: pcs.c:mem_put_le24 Unexecuted instantiation: pd_process.c:mem_put_le24 Unexecuted instantiation: pd_reorder_queue.c:mem_put_le24 Unexecuted instantiation: pd_results.c:mem_put_le24 Unexecuted instantiation: pic_demux_results.c:mem_put_le24 Unexecuted instantiation: pic_manager_process.c:mem_put_le24 Unexecuted instantiation: pic_manager_queue.c:mem_put_le24 Unexecuted instantiation: pic_operators.c:mem_put_le24 Unexecuted instantiation: pred_structure.c:mem_put_le24 Unexecuted instantiation: product_coding_loop.c:mem_put_le24 Unexecuted instantiation: ac_bias.c:mem_put_le24 Unexecuted instantiation: rc_aq.c:mem_put_le24 Unexecuted instantiation: rc_process.c:mem_put_le24 Unexecuted instantiation: rc_results.c:mem_put_le24 Unexecuted instantiation: rc_rtc_cbr.c:mem_put_le24 Unexecuted instantiation: rc_tasks.c:mem_put_le24 Unexecuted instantiation: rc_vbr_cbr.c:mem_put_le24 Unexecuted instantiation: rd_cost.c:mem_put_le24 Unexecuted instantiation: reference_object.c:mem_put_le24 Unexecuted instantiation: resize.c:mem_put_le24 Unexecuted instantiation: resource_coordination_process.c:mem_put_le24 Unexecuted instantiation: resource_coordination_results.c:mem_put_le24 Unexecuted instantiation: rest_process.c:mem_put_le24 Unexecuted instantiation: restoration.c:mem_put_le24 Unexecuted instantiation: restoration_pick.c:mem_put_le24 Unexecuted instantiation: segmentation.c:mem_put_le24 Unexecuted instantiation: segmentation_params.c:mem_put_le24 Unexecuted instantiation: sequence_control_set.c:mem_put_le24 Unexecuted instantiation: src_ops_process.c:mem_put_le24 Unexecuted instantiation: super_res.c:mem_put_le24 Unexecuted instantiation: svt_log.c:mem_put_le24 Unexecuted instantiation: svt_malloc.c:mem_put_le24 Unexecuted instantiation: svt_psnr.c:mem_put_le24 Unexecuted instantiation: svt_threads.c:mem_put_le24 Unexecuted instantiation: sys_resource_manager.c:mem_put_le24 Unexecuted instantiation: kernel_dispatch.c:mem_put_le24 Unexecuted instantiation: temporal_filtering.c:mem_put_le24 Unexecuted instantiation: transforms.c:mem_put_le24 Unexecuted instantiation: utility.c:mem_put_le24 Unexecuted instantiation: vector.c:mem_put_le24 Unexecuted instantiation: warped_motion.c:mem_put_le24 Unexecuted instantiation: blend_a64_mask_c.c:mem_put_le24 Unexecuted instantiation: cfl_c.c:mem_put_le24 Unexecuted instantiation: compute_sad_c.c:mem_put_le24 Unexecuted instantiation: encode_txb_ref_c.c:mem_put_le24 Unexecuted instantiation: filterintra_c.c:mem_put_le24 Unexecuted instantiation: inter_prediction_c.c:mem_put_le24 Unexecuted instantiation: intra_prediction_c.c:mem_put_le24 Unexecuted instantiation: pack_unpack_c.c:mem_put_le24 Unexecuted instantiation: picture_operators_c.c:mem_put_le24 Unexecuted instantiation: sad_av1.c:mem_put_le24 Unexecuted instantiation: variance.c:mem_put_le24 Unexecuted instantiation: adaptive_mv_pred.c:mem_put_le24 Unexecuted instantiation: blend_a64_mask.c:mem_put_le24 Unexecuted instantiation: block_structures.c:mem_put_le24 Unexecuted instantiation: cabac_context_model.c:mem_put_le24 Unexecuted instantiation: cdef.c:mem_put_le24 Unexecuted instantiation: coding_loop.c:mem_put_le24 Unexecuted instantiation: coding_unit.c:mem_put_le24 Unexecuted instantiation: coefficients.c:mem_put_le24 Unexecuted instantiation: deblocking_filter.c:mem_put_le24 Unexecuted instantiation: enc_dec_segments.c:mem_put_le24 Unexecuted instantiation: encode_context.c:mem_put_le24 Unexecuted instantiation: firstpass.c:mem_put_le24 Unexecuted instantiation: global_me.c:mem_put_le24 Unexecuted instantiation: global_me_cost.c:mem_put_le24 Unexecuted instantiation: mcomp.c:mem_put_le24 Unexecuted instantiation: me_context.c:mem_put_le24 Unexecuted instantiation: pass2_strategy.c:mem_put_le24 Unexecuted instantiation: pd_queue.c:mem_put_le24 Unexecuted instantiation: rc_crf_cqp.c:mem_put_le24 Unexecuted instantiation: corner_detect.c:mem_put_le24 Unexecuted instantiation: global_motion.c:mem_put_le24 Unexecuted instantiation: ransac.c:mem_put_le24 Unexecuted instantiation: enc_warped_motion.c:mem_put_le24 |
570 | | |
571 | 0 | static __inline void mem_put_le32(void* vmem, MEM_VALUE_T val) { |
572 | 0 | MAU_T* mem = (MAU_T*)vmem; |
573 | |
|
574 | 0 | mem[0] = (MAU_T)((val >> 0) & 0xff); |
575 | 0 | mem[1] = (MAU_T)((val >> 8) & 0xff); |
576 | 0 | mem[2] = (MAU_T)((val >> 16) & 0xff); |
577 | 0 | mem[3] = (MAU_T)((val >> 24) & 0xff); |
578 | 0 | } Unexecuted instantiation: enc_handle.c:mem_put_le32 Unexecuted instantiation: enc_settings.c:mem_put_le32 Unexecuted instantiation: metadata_handle.c:mem_put_le32 Unexecuted instantiation: aom_dsp_rtcd.c:mem_put_le32 Unexecuted instantiation: av1me.c:mem_put_le32 Unexecuted instantiation: bitstream_unit.c:mem_put_le32 Unexecuted instantiation: cdef_process.c:mem_put_le32 Unexecuted instantiation: common_dsp_rtcd.c:mem_put_le32 Unexecuted instantiation: common_utils.c:mem_put_le32 Unexecuted instantiation: convolve.c:mem_put_le32 Unexecuted instantiation: corner_match.c:mem_put_le32 Unexecuted instantiation: deblocking_common.c:mem_put_le32 Unexecuted instantiation: dlf_process.c:mem_put_le32 Unexecuted instantiation: enc_cdef.c:mem_put_le32 Unexecuted instantiation: enc_dec_process.c:mem_put_le32 Unexecuted instantiation: enc_dec_results.c:mem_put_le32 Unexecuted instantiation: enc_dec_tasks.c:mem_put_le32 Unexecuted instantiation: enc_inter_prediction.c:mem_put_le32 Unexecuted instantiation: enc_intra_prediction.c:mem_put_le32 Unexecuted instantiation: enc_mode_config.c:mem_put_le32 Unexecuted instantiation: entropy_coding.c:mem_put_le32 Unexecuted instantiation: ec_process.c:mem_put_le32 Unexecuted instantiation: ec_results.c:mem_put_le32 Unexecuted instantiation: fft.c:mem_put_le32 Unexecuted instantiation: full_loop.c:mem_put_le32 Unexecuted instantiation: grainSynthesis.c:mem_put_le32 Unexecuted instantiation: hash.c:mem_put_le32 Unexecuted instantiation: hash_motion.c:mem_put_le32 Unexecuted instantiation: initial_rc_process.c:mem_put_le32 Unexecuted instantiation: initial_rc_results.c:mem_put_le32 Unexecuted instantiation: inter_prediction.c:mem_put_le32 Unexecuted instantiation: intra_prediction.c:mem_put_le32 Unexecuted instantiation: inv_transforms.c:mem_put_le32 Unexecuted instantiation: md_rate_estimation.c:mem_put_le32 Unexecuted instantiation: me_sad_calculation.c:mem_put_le32 Unexecuted instantiation: mode_decision.c:mem_put_le32 Unexecuted instantiation: md_config_process.c:mem_put_le32 Unexecuted instantiation: md_process.c:mem_put_le32 Unexecuted instantiation: motion_estimation.c:mem_put_le32 Unexecuted instantiation: me_process.c:mem_put_le32 Unexecuted instantiation: me_results.c:mem_put_le32 Unexecuted instantiation: neighbor_arrays.c:mem_put_le32 Unexecuted instantiation: noise_model.c:mem_put_le32 Unexecuted instantiation: noise_util.c:mem_put_le32 Unexecuted instantiation: packetization_process.c:mem_put_le32 Unexecuted instantiation: packetization_reorder_queue.c:mem_put_le32 Unexecuted instantiation: palette.c:mem_put_le32 Unexecuted instantiation: pic_analysis_process.c:mem_put_le32 Unexecuted instantiation: pic_analysis_results.c:mem_put_le32 Unexecuted instantiation: pic_buffer_desc.c:mem_put_le32 Unexecuted instantiation: pcs.c:mem_put_le32 Unexecuted instantiation: pd_process.c:mem_put_le32 Unexecuted instantiation: pd_reorder_queue.c:mem_put_le32 Unexecuted instantiation: pd_results.c:mem_put_le32 Unexecuted instantiation: pic_demux_results.c:mem_put_le32 Unexecuted instantiation: pic_manager_process.c:mem_put_le32 Unexecuted instantiation: pic_manager_queue.c:mem_put_le32 Unexecuted instantiation: pic_operators.c:mem_put_le32 Unexecuted instantiation: pred_structure.c:mem_put_le32 Unexecuted instantiation: product_coding_loop.c:mem_put_le32 Unexecuted instantiation: ac_bias.c:mem_put_le32 Unexecuted instantiation: rc_aq.c:mem_put_le32 Unexecuted instantiation: rc_process.c:mem_put_le32 Unexecuted instantiation: rc_results.c:mem_put_le32 Unexecuted instantiation: rc_rtc_cbr.c:mem_put_le32 Unexecuted instantiation: rc_tasks.c:mem_put_le32 Unexecuted instantiation: rc_vbr_cbr.c:mem_put_le32 Unexecuted instantiation: rd_cost.c:mem_put_le32 Unexecuted instantiation: reference_object.c:mem_put_le32 Unexecuted instantiation: resize.c:mem_put_le32 Unexecuted instantiation: resource_coordination_process.c:mem_put_le32 Unexecuted instantiation: resource_coordination_results.c:mem_put_le32 Unexecuted instantiation: rest_process.c:mem_put_le32 Unexecuted instantiation: restoration.c:mem_put_le32 Unexecuted instantiation: restoration_pick.c:mem_put_le32 Unexecuted instantiation: segmentation.c:mem_put_le32 Unexecuted instantiation: segmentation_params.c:mem_put_le32 Unexecuted instantiation: sequence_control_set.c:mem_put_le32 Unexecuted instantiation: src_ops_process.c:mem_put_le32 Unexecuted instantiation: super_res.c:mem_put_le32 Unexecuted instantiation: svt_log.c:mem_put_le32 Unexecuted instantiation: svt_malloc.c:mem_put_le32 Unexecuted instantiation: svt_psnr.c:mem_put_le32 Unexecuted instantiation: svt_threads.c:mem_put_le32 Unexecuted instantiation: sys_resource_manager.c:mem_put_le32 Unexecuted instantiation: kernel_dispatch.c:mem_put_le32 Unexecuted instantiation: temporal_filtering.c:mem_put_le32 Unexecuted instantiation: transforms.c:mem_put_le32 Unexecuted instantiation: utility.c:mem_put_le32 Unexecuted instantiation: vector.c:mem_put_le32 Unexecuted instantiation: warped_motion.c:mem_put_le32 Unexecuted instantiation: blend_a64_mask_c.c:mem_put_le32 Unexecuted instantiation: cfl_c.c:mem_put_le32 Unexecuted instantiation: compute_sad_c.c:mem_put_le32 Unexecuted instantiation: encode_txb_ref_c.c:mem_put_le32 Unexecuted instantiation: filterintra_c.c:mem_put_le32 Unexecuted instantiation: inter_prediction_c.c:mem_put_le32 Unexecuted instantiation: intra_prediction_c.c:mem_put_le32 Unexecuted instantiation: pack_unpack_c.c:mem_put_le32 Unexecuted instantiation: picture_operators_c.c:mem_put_le32 Unexecuted instantiation: sad_av1.c:mem_put_le32 Unexecuted instantiation: variance.c:mem_put_le32 Unexecuted instantiation: adaptive_mv_pred.c:mem_put_le32 Unexecuted instantiation: blend_a64_mask.c:mem_put_le32 Unexecuted instantiation: block_structures.c:mem_put_le32 Unexecuted instantiation: cabac_context_model.c:mem_put_le32 Unexecuted instantiation: cdef.c:mem_put_le32 Unexecuted instantiation: coding_loop.c:mem_put_le32 Unexecuted instantiation: coding_unit.c:mem_put_le32 Unexecuted instantiation: coefficients.c:mem_put_le32 Unexecuted instantiation: deblocking_filter.c:mem_put_le32 Unexecuted instantiation: enc_dec_segments.c:mem_put_le32 Unexecuted instantiation: encode_context.c:mem_put_le32 Unexecuted instantiation: firstpass.c:mem_put_le32 Unexecuted instantiation: global_me.c:mem_put_le32 Unexecuted instantiation: global_me_cost.c:mem_put_le32 Unexecuted instantiation: mcomp.c:mem_put_le32 Unexecuted instantiation: me_context.c:mem_put_le32 Unexecuted instantiation: pass2_strategy.c:mem_put_le32 Unexecuted instantiation: pd_queue.c:mem_put_le32 Unexecuted instantiation: rc_crf_cqp.c:mem_put_le32 Unexecuted instantiation: corner_detect.c:mem_put_le32 Unexecuted instantiation: global_motion.c:mem_put_le32 Unexecuted instantiation: ransac.c:mem_put_le32 Unexecuted instantiation: enc_warped_motion.c:mem_put_le32 |
579 | | |
580 | | /* clang-format on */ |
581 | | |
582 | | typedef uint16_t ConvBufType; |
583 | | |
584 | | typedef struct ConvolveParams { |
585 | | int32_t ref; |
586 | | int32_t do_average; |
587 | | ConvBufType* dst; |
588 | | int32_t dst_stride; |
589 | | int32_t round_0; |
590 | | int32_t round_1; |
591 | | int32_t plane; |
592 | | int32_t is_compound; |
593 | | int32_t use_jnt_comp_avg; |
594 | | int32_t fwd_offset; |
595 | | int32_t bck_offset; |
596 | | int32_t use_dist_wtd_comp_avg; |
597 | | } ConvolveParams; |
598 | | |
599 | | // texture component type |
600 | | typedef enum ATTRIBUTE_PACKED { |
601 | | COMPONENT_LUMA = 0, // luma |
602 | | COMPONENT_CHROMA = 1, // chroma (Cb+Cr) |
603 | | COMPONENT_CHROMA_CB = 2, // chroma Cb |
604 | | COMPONENT_CHROMA_CR = 3, // chroma Cr |
605 | | COMPONENT_ALL = 4, // Y+Cb+Cr |
606 | | COMPONENT_NONE = 15 |
607 | | } COMPONENT_TYPE; |
608 | | |
609 | | typedef enum ATTRIBUTE_PACKED { PLANE_Y, PLANE_U, PLANE_V, MAX_PLANES } Plane; |
610 | | |
611 | | typedef enum ATTRIBUTE_PACKED { PLANE_TYPE_Y, PLANE_TYPE_UV, PLANE_TYPES } PlaneType; |
612 | | |
613 | 33.2M | static INLINE int32_t clamp(int32_t value, int32_t low, int32_t high) { |
614 | 33.2M | return value < low ? low : (value > high ? high : value); |
615 | 33.2M | } Unexecuted instantiation: cdef.c:clamp Line | Count | Source | 613 | 7.11k | static INLINE int32_t clamp(int32_t value, int32_t low, int32_t high) { | 614 | 7.11k | return value < low ? low : (value > high ? high : value); | 615 | 7.11k | } |
Unexecuted instantiation: enc_settings.c:clamp Unexecuted instantiation: metadata_handle.c:clamp Unexecuted instantiation: av1me.c:clamp Unexecuted instantiation: bitstream_unit.c:clamp Unexecuted instantiation: cdef_process.c:clamp Unexecuted instantiation: common_dsp_rtcd.c:clamp Unexecuted instantiation: common_utils.c:clamp Unexecuted instantiation: deblocking_common.c:clamp Unexecuted instantiation: dlf_process.c:clamp Line | Count | Source | 613 | 1.09k | static INLINE int32_t clamp(int32_t value, int32_t low, int32_t high) { | 614 | 1.09k | return value < low ? low : (value > high ? high : value); | 615 | 1.09k | } |
Unexecuted instantiation: enc_dec_process.c:clamp Unexecuted instantiation: enc_dec_results.c:clamp Unexecuted instantiation: enc_dec_tasks.c:clamp Unexecuted instantiation: enc_inter_prediction.c:clamp Unexecuted instantiation: enc_intra_prediction.c:clamp Unexecuted instantiation: enc_mode_config.c:clamp Unexecuted instantiation: entropy_coding.c:clamp Unexecuted instantiation: ec_process.c:clamp Unexecuted instantiation: ec_results.c:clamp Line | Count | Source | 613 | 11.2k | static INLINE int32_t clamp(int32_t value, int32_t low, int32_t high) { | 614 | 11.2k | return value < low ? low : (value > high ? high : value); | 615 | 11.2k | } |
Unexecuted instantiation: grainSynthesis.c:clamp Unexecuted instantiation: hash.c:clamp Unexecuted instantiation: initial_rc_process.c:clamp Unexecuted instantiation: initial_rc_results.c:clamp Unexecuted instantiation: inter_prediction.c:clamp Unexecuted instantiation: intra_prediction.c:clamp Line | Count | Source | 613 | 30.7M | static INLINE int32_t clamp(int32_t value, int32_t low, int32_t high) { | 614 | 30.7M | return value < low ? low : (value > high ? high : value); | 615 | 30.7M | } |
md_rate_estimation.c:clamp Line | Count | Source | 613 | 2.46M | static INLINE int32_t clamp(int32_t value, int32_t low, int32_t high) { | 614 | 2.46M | return value < low ? low : (value > high ? high : value); | 615 | 2.46M | } |
Unexecuted instantiation: me_sad_calculation.c:clamp Unexecuted instantiation: mode_decision.c:clamp Unexecuted instantiation: md_config_process.c:clamp Unexecuted instantiation: md_process.c:clamp Unexecuted instantiation: motion_estimation.c:clamp Unexecuted instantiation: me_process.c:clamp Unexecuted instantiation: me_results.c:clamp Unexecuted instantiation: neighbor_arrays.c:clamp Unexecuted instantiation: packetization_process.c:clamp Unexecuted instantiation: packetization_reorder_queue.c:clamp Unexecuted instantiation: pic_analysis_process.c:clamp Unexecuted instantiation: pic_analysis_results.c:clamp Unexecuted instantiation: pic_buffer_desc.c:clamp Unexecuted instantiation: pcs.c:clamp Unexecuted instantiation: pd_process.c:clamp Unexecuted instantiation: pd_reorder_queue.c:clamp Unexecuted instantiation: pd_results.c:clamp Unexecuted instantiation: pic_demux_results.c:clamp Unexecuted instantiation: pic_manager_process.c:clamp Unexecuted instantiation: pic_manager_queue.c:clamp Unexecuted instantiation: pic_operators.c:clamp Unexecuted instantiation: pred_structure.c:clamp Unexecuted instantiation: product_coding_loop.c:clamp Unexecuted instantiation: ac_bias.c:clamp Unexecuted instantiation: rc_aq.c:clamp Unexecuted instantiation: rc_process.c:clamp Unexecuted instantiation: rc_results.c:clamp Unexecuted instantiation: rc_rtc_cbr.c:clamp Unexecuted instantiation: rc_tasks.c:clamp Unexecuted instantiation: rc_vbr_cbr.c:clamp Unexecuted instantiation: rd_cost.c:clamp Unexecuted instantiation: reference_object.c:clamp Unexecuted instantiation: resource_coordination_process.c:clamp Unexecuted instantiation: resource_coordination_results.c:clamp Unexecuted instantiation: rest_process.c:clamp Unexecuted instantiation: restoration_pick.c:clamp Unexecuted instantiation: segmentation_params.c:clamp Unexecuted instantiation: sequence_control_set.c:clamp Unexecuted instantiation: src_ops_process.c:clamp Unexecuted instantiation: super_res.c:clamp Unexecuted instantiation: svt_log.c:clamp Unexecuted instantiation: svt_malloc.c:clamp Unexecuted instantiation: svt_psnr.c:clamp Unexecuted instantiation: svt_threads.c:clamp Unexecuted instantiation: sys_resource_manager.c:clamp Unexecuted instantiation: kernel_dispatch.c:clamp Unexecuted instantiation: temporal_filtering.c:clamp Unexecuted instantiation: transforms.c:clamp Unexecuted instantiation: utility.c:clamp Unexecuted instantiation: vector.c:clamp Unexecuted instantiation: blend_a64_mask_c.c:clamp Unexecuted instantiation: cfl_c.c:clamp Unexecuted instantiation: compute_sad_c.c:clamp Unexecuted instantiation: encode_txb_ref_c.c:clamp Unexecuted instantiation: filterintra_c.c:clamp Unexecuted instantiation: inter_prediction_c.c:clamp Unexecuted instantiation: intra_prediction_c.c:clamp Unexecuted instantiation: pack_unpack_c.c:clamp Unexecuted instantiation: picture_operators_c.c:clamp Unexecuted instantiation: adaptive_mv_pred.c:clamp Unexecuted instantiation: block_structures.c:clamp Unexecuted instantiation: cabac_context_model.c:clamp Unexecuted instantiation: coding_loop.c:clamp Unexecuted instantiation: coding_unit.c:clamp Unexecuted instantiation: coefficients.c:clamp deblocking_filter.c:clamp Line | Count | Source | 613 | 1.09k | static INLINE int32_t clamp(int32_t value, int32_t low, int32_t high) { | 614 | 1.09k | return value < low ? low : (value > high ? high : value); | 615 | 1.09k | } |
Unexecuted instantiation: enc_dec_segments.c:clamp Unexecuted instantiation: encode_context.c:clamp Unexecuted instantiation: global_me.c:clamp Unexecuted instantiation: global_me_cost.c:clamp Unexecuted instantiation: me_context.c:clamp Unexecuted instantiation: pd_queue.c:clamp Unexecuted instantiation: rc_crf_cqp.c:clamp Unexecuted instantiation: corner_detect.c:clamp Unexecuted instantiation: enc_warped_motion.c:clamp |
616 | | |
617 | 314M | static INLINE int64_t clamp64(int64_t value, int64_t low, int64_t high) { |
618 | 314M | return value < low ? low : (value > high ? high : value); |
619 | 314M | } Unexecuted instantiation: enc_handle.c:clamp64 Unexecuted instantiation: enc_settings.c:clamp64 Unexecuted instantiation: metadata_handle.c:clamp64 Unexecuted instantiation: av1me.c:clamp64 Unexecuted instantiation: bitstream_unit.c:clamp64 Unexecuted instantiation: cdef_process.c:clamp64 Unexecuted instantiation: common_dsp_rtcd.c:clamp64 Unexecuted instantiation: common_utils.c:clamp64 Unexecuted instantiation: deblocking_common.c:clamp64 Unexecuted instantiation: dlf_process.c:clamp64 Unexecuted instantiation: enc_cdef.c:clamp64 Unexecuted instantiation: enc_dec_process.c:clamp64 Unexecuted instantiation: enc_dec_results.c:clamp64 Unexecuted instantiation: enc_dec_tasks.c:clamp64 Unexecuted instantiation: enc_inter_prediction.c:clamp64 Unexecuted instantiation: enc_intra_prediction.c:clamp64 Unexecuted instantiation: enc_mode_config.c:clamp64 Unexecuted instantiation: entropy_coding.c:clamp64 Unexecuted instantiation: ec_process.c:clamp64 Unexecuted instantiation: ec_results.c:clamp64 Line | Count | Source | 617 | 10.4k | static INLINE int64_t clamp64(int64_t value, int64_t low, int64_t high) { | 618 | 10.4k | return value < low ? low : (value > high ? high : value); | 619 | 10.4k | } |
Unexecuted instantiation: grainSynthesis.c:clamp64 Unexecuted instantiation: hash.c:clamp64 Unexecuted instantiation: initial_rc_process.c:clamp64 Unexecuted instantiation: initial_rc_results.c:clamp64 Unexecuted instantiation: inter_prediction.c:clamp64 Unexecuted instantiation: intra_prediction.c:clamp64 Line | Count | Source | 617 | 314M | static INLINE int64_t clamp64(int64_t value, int64_t low, int64_t high) { | 618 | 314M | return value < low ? low : (value > high ? high : value); | 619 | 314M | } |
Unexecuted instantiation: md_rate_estimation.c:clamp64 Unexecuted instantiation: me_sad_calculation.c:clamp64 Unexecuted instantiation: mode_decision.c:clamp64 Unexecuted instantiation: md_config_process.c:clamp64 Unexecuted instantiation: md_process.c:clamp64 Unexecuted instantiation: motion_estimation.c:clamp64 Unexecuted instantiation: me_process.c:clamp64 Unexecuted instantiation: me_results.c:clamp64 Unexecuted instantiation: neighbor_arrays.c:clamp64 Unexecuted instantiation: packetization_process.c:clamp64 Unexecuted instantiation: packetization_reorder_queue.c:clamp64 Unexecuted instantiation: pic_analysis_process.c:clamp64 Unexecuted instantiation: pic_analysis_results.c:clamp64 Unexecuted instantiation: pic_buffer_desc.c:clamp64 Unexecuted instantiation: pcs.c:clamp64 Unexecuted instantiation: pd_process.c:clamp64 Unexecuted instantiation: pd_reorder_queue.c:clamp64 Unexecuted instantiation: pd_results.c:clamp64 Unexecuted instantiation: pic_demux_results.c:clamp64 Unexecuted instantiation: pic_manager_process.c:clamp64 Unexecuted instantiation: pic_manager_queue.c:clamp64 Unexecuted instantiation: pic_operators.c:clamp64 Unexecuted instantiation: pred_structure.c:clamp64 Unexecuted instantiation: product_coding_loop.c:clamp64 Unexecuted instantiation: ac_bias.c:clamp64 Unexecuted instantiation: rc_aq.c:clamp64 Unexecuted instantiation: rc_process.c:clamp64 Unexecuted instantiation: rc_results.c:clamp64 Unexecuted instantiation: rc_rtc_cbr.c:clamp64 Unexecuted instantiation: rc_tasks.c:clamp64 Unexecuted instantiation: rc_vbr_cbr.c:clamp64 Unexecuted instantiation: rd_cost.c:clamp64 Unexecuted instantiation: reference_object.c:clamp64 Unexecuted instantiation: resource_coordination_process.c:clamp64 Unexecuted instantiation: resource_coordination_results.c:clamp64 Unexecuted instantiation: rest_process.c:clamp64 Unexecuted instantiation: restoration_pick.c:clamp64 Unexecuted instantiation: segmentation_params.c:clamp64 Unexecuted instantiation: sequence_control_set.c:clamp64 Unexecuted instantiation: src_ops_process.c:clamp64 Unexecuted instantiation: super_res.c:clamp64 Unexecuted instantiation: svt_log.c:clamp64 Unexecuted instantiation: svt_malloc.c:clamp64 Unexecuted instantiation: svt_psnr.c:clamp64 Unexecuted instantiation: svt_threads.c:clamp64 Unexecuted instantiation: sys_resource_manager.c:clamp64 Unexecuted instantiation: kernel_dispatch.c:clamp64 Unexecuted instantiation: temporal_filtering.c:clamp64 Unexecuted instantiation: transforms.c:clamp64 Unexecuted instantiation: utility.c:clamp64 Unexecuted instantiation: vector.c:clamp64 Unexecuted instantiation: blend_a64_mask_c.c:clamp64 Unexecuted instantiation: cfl_c.c:clamp64 Unexecuted instantiation: compute_sad_c.c:clamp64 Unexecuted instantiation: encode_txb_ref_c.c:clamp64 Unexecuted instantiation: filterintra_c.c:clamp64 Unexecuted instantiation: inter_prediction_c.c:clamp64 Unexecuted instantiation: intra_prediction_c.c:clamp64 Unexecuted instantiation: pack_unpack_c.c:clamp64 Unexecuted instantiation: picture_operators_c.c:clamp64 Unexecuted instantiation: adaptive_mv_pred.c:clamp64 Unexecuted instantiation: block_structures.c:clamp64 Unexecuted instantiation: cabac_context_model.c:clamp64 Unexecuted instantiation: coding_loop.c:clamp64 Unexecuted instantiation: coding_unit.c:clamp64 Unexecuted instantiation: coefficients.c:clamp64 Unexecuted instantiation: deblocking_filter.c:clamp64 Unexecuted instantiation: enc_dec_segments.c:clamp64 Unexecuted instantiation: encode_context.c:clamp64 Unexecuted instantiation: global_me.c:clamp64 Unexecuted instantiation: global_me_cost.c:clamp64 Unexecuted instantiation: me_context.c:clamp64 Unexecuted instantiation: pd_queue.c:clamp64 Unexecuted instantiation: rc_crf_cqp.c:clamp64 Unexecuted instantiation: corner_detect.c:clamp64 Unexecuted instantiation: enc_warped_motion.c:clamp64 |
620 | | |
621 | | // from aom aom_dsp_common.h |
622 | 0 | static INLINE double fclamp(double value, double low, double high) { |
623 | 0 | return value < low ? low : (value > high ? high : value); |
624 | 0 | } Unexecuted instantiation: enc_handle.c:fclamp Unexecuted instantiation: enc_settings.c:fclamp Unexecuted instantiation: metadata_handle.c:fclamp Unexecuted instantiation: av1me.c:fclamp Unexecuted instantiation: bitstream_unit.c:fclamp Unexecuted instantiation: cdef_process.c:fclamp Unexecuted instantiation: common_dsp_rtcd.c:fclamp Unexecuted instantiation: common_utils.c:fclamp Unexecuted instantiation: deblocking_common.c:fclamp Unexecuted instantiation: dlf_process.c:fclamp Unexecuted instantiation: enc_cdef.c:fclamp Unexecuted instantiation: enc_dec_process.c:fclamp Unexecuted instantiation: enc_dec_results.c:fclamp Unexecuted instantiation: enc_dec_tasks.c:fclamp Unexecuted instantiation: enc_inter_prediction.c:fclamp Unexecuted instantiation: enc_intra_prediction.c:fclamp Unexecuted instantiation: enc_mode_config.c:fclamp Unexecuted instantiation: entropy_coding.c:fclamp Unexecuted instantiation: ec_process.c:fclamp Unexecuted instantiation: ec_results.c:fclamp Unexecuted instantiation: full_loop.c:fclamp Unexecuted instantiation: grainSynthesis.c:fclamp Unexecuted instantiation: hash.c:fclamp Unexecuted instantiation: initial_rc_process.c:fclamp Unexecuted instantiation: initial_rc_results.c:fclamp Unexecuted instantiation: inter_prediction.c:fclamp Unexecuted instantiation: intra_prediction.c:fclamp Unexecuted instantiation: inv_transforms.c:fclamp Unexecuted instantiation: md_rate_estimation.c:fclamp Unexecuted instantiation: me_sad_calculation.c:fclamp Unexecuted instantiation: mode_decision.c:fclamp Unexecuted instantiation: md_config_process.c:fclamp Unexecuted instantiation: md_process.c:fclamp Unexecuted instantiation: motion_estimation.c:fclamp Unexecuted instantiation: me_process.c:fclamp Unexecuted instantiation: me_results.c:fclamp Unexecuted instantiation: neighbor_arrays.c:fclamp Unexecuted instantiation: packetization_process.c:fclamp Unexecuted instantiation: packetization_reorder_queue.c:fclamp Unexecuted instantiation: pic_analysis_process.c:fclamp Unexecuted instantiation: pic_analysis_results.c:fclamp Unexecuted instantiation: pic_buffer_desc.c:fclamp Unexecuted instantiation: pcs.c:fclamp Unexecuted instantiation: pd_process.c:fclamp Unexecuted instantiation: pd_reorder_queue.c:fclamp Unexecuted instantiation: pd_results.c:fclamp Unexecuted instantiation: pic_demux_results.c:fclamp Unexecuted instantiation: pic_manager_process.c:fclamp Unexecuted instantiation: pic_manager_queue.c:fclamp Unexecuted instantiation: pic_operators.c:fclamp Unexecuted instantiation: pred_structure.c:fclamp Unexecuted instantiation: product_coding_loop.c:fclamp Unexecuted instantiation: ac_bias.c:fclamp Unexecuted instantiation: rc_aq.c:fclamp Unexecuted instantiation: rc_process.c:fclamp Unexecuted instantiation: rc_results.c:fclamp Unexecuted instantiation: rc_rtc_cbr.c:fclamp Unexecuted instantiation: rc_tasks.c:fclamp Unexecuted instantiation: rc_vbr_cbr.c:fclamp Unexecuted instantiation: rd_cost.c:fclamp Unexecuted instantiation: reference_object.c:fclamp Unexecuted instantiation: resource_coordination_process.c:fclamp Unexecuted instantiation: resource_coordination_results.c:fclamp Unexecuted instantiation: rest_process.c:fclamp Unexecuted instantiation: restoration_pick.c:fclamp Unexecuted instantiation: segmentation_params.c:fclamp Unexecuted instantiation: sequence_control_set.c:fclamp Unexecuted instantiation: src_ops_process.c:fclamp Unexecuted instantiation: super_res.c:fclamp Unexecuted instantiation: svt_log.c:fclamp Unexecuted instantiation: svt_malloc.c:fclamp Unexecuted instantiation: svt_psnr.c:fclamp Unexecuted instantiation: svt_threads.c:fclamp Unexecuted instantiation: sys_resource_manager.c:fclamp Unexecuted instantiation: kernel_dispatch.c:fclamp Unexecuted instantiation: temporal_filtering.c:fclamp Unexecuted instantiation: transforms.c:fclamp Unexecuted instantiation: utility.c:fclamp Unexecuted instantiation: vector.c:fclamp Unexecuted instantiation: blend_a64_mask_c.c:fclamp Unexecuted instantiation: cfl_c.c:fclamp Unexecuted instantiation: compute_sad_c.c:fclamp Unexecuted instantiation: encode_txb_ref_c.c:fclamp Unexecuted instantiation: filterintra_c.c:fclamp Unexecuted instantiation: inter_prediction_c.c:fclamp Unexecuted instantiation: intra_prediction_c.c:fclamp Unexecuted instantiation: pack_unpack_c.c:fclamp Unexecuted instantiation: picture_operators_c.c:fclamp Unexecuted instantiation: adaptive_mv_pred.c:fclamp Unexecuted instantiation: block_structures.c:fclamp Unexecuted instantiation: cabac_context_model.c:fclamp Unexecuted instantiation: coding_loop.c:fclamp Unexecuted instantiation: coding_unit.c:fclamp Unexecuted instantiation: coefficients.c:fclamp Unexecuted instantiation: deblocking_filter.c:fclamp Unexecuted instantiation: enc_dec_segments.c:fclamp Unexecuted instantiation: encode_context.c:fclamp Unexecuted instantiation: global_me.c:fclamp Unexecuted instantiation: global_me_cost.c:fclamp Unexecuted instantiation: me_context.c:fclamp Unexecuted instantiation: pd_queue.c:fclamp Unexecuted instantiation: rc_crf_cqp.c:fclamp Unexecuted instantiation: corner_detect.c:fclamp Unexecuted instantiation: enc_warped_motion.c:fclamp |
625 | | |
626 | 0 | static INLINE uint8_t clip_pixel(int32_t val) { |
627 | 0 | return (uint8_t)((val > 255) ? 255 : (val < 0) ? 0 : val); |
628 | 0 | } Unexecuted instantiation: enc_handle.c:clip_pixel Unexecuted instantiation: enc_settings.c:clip_pixel Unexecuted instantiation: metadata_handle.c:clip_pixel Unexecuted instantiation: av1me.c:clip_pixel Unexecuted instantiation: bitstream_unit.c:clip_pixel Unexecuted instantiation: cdef_process.c:clip_pixel Unexecuted instantiation: common_dsp_rtcd.c:clip_pixel Unexecuted instantiation: common_utils.c:clip_pixel Unexecuted instantiation: deblocking_common.c:clip_pixel Unexecuted instantiation: dlf_process.c:clip_pixel Unexecuted instantiation: enc_cdef.c:clip_pixel Unexecuted instantiation: enc_dec_process.c:clip_pixel Unexecuted instantiation: enc_dec_results.c:clip_pixel Unexecuted instantiation: enc_dec_tasks.c:clip_pixel Unexecuted instantiation: enc_inter_prediction.c:clip_pixel Unexecuted instantiation: enc_intra_prediction.c:clip_pixel Unexecuted instantiation: enc_mode_config.c:clip_pixel Unexecuted instantiation: entropy_coding.c:clip_pixel Unexecuted instantiation: ec_process.c:clip_pixel Unexecuted instantiation: ec_results.c:clip_pixel Unexecuted instantiation: full_loop.c:clip_pixel Unexecuted instantiation: grainSynthesis.c:clip_pixel Unexecuted instantiation: hash.c:clip_pixel Unexecuted instantiation: initial_rc_process.c:clip_pixel Unexecuted instantiation: initial_rc_results.c:clip_pixel Unexecuted instantiation: inter_prediction.c:clip_pixel Unexecuted instantiation: intra_prediction.c:clip_pixel Unexecuted instantiation: inv_transforms.c:clip_pixel Unexecuted instantiation: md_rate_estimation.c:clip_pixel Unexecuted instantiation: me_sad_calculation.c:clip_pixel Unexecuted instantiation: mode_decision.c:clip_pixel Unexecuted instantiation: md_config_process.c:clip_pixel Unexecuted instantiation: md_process.c:clip_pixel Unexecuted instantiation: motion_estimation.c:clip_pixel Unexecuted instantiation: me_process.c:clip_pixel Unexecuted instantiation: me_results.c:clip_pixel Unexecuted instantiation: neighbor_arrays.c:clip_pixel Unexecuted instantiation: packetization_process.c:clip_pixel Unexecuted instantiation: packetization_reorder_queue.c:clip_pixel Unexecuted instantiation: pic_analysis_process.c:clip_pixel Unexecuted instantiation: pic_analysis_results.c:clip_pixel Unexecuted instantiation: pic_buffer_desc.c:clip_pixel Unexecuted instantiation: pcs.c:clip_pixel Unexecuted instantiation: pd_process.c:clip_pixel Unexecuted instantiation: pd_reorder_queue.c:clip_pixel Unexecuted instantiation: pd_results.c:clip_pixel Unexecuted instantiation: pic_demux_results.c:clip_pixel Unexecuted instantiation: pic_manager_process.c:clip_pixel Unexecuted instantiation: pic_manager_queue.c:clip_pixel Unexecuted instantiation: pic_operators.c:clip_pixel Unexecuted instantiation: pred_structure.c:clip_pixel Unexecuted instantiation: product_coding_loop.c:clip_pixel Unexecuted instantiation: ac_bias.c:clip_pixel Unexecuted instantiation: rc_aq.c:clip_pixel Unexecuted instantiation: rc_process.c:clip_pixel Unexecuted instantiation: rc_results.c:clip_pixel Unexecuted instantiation: rc_rtc_cbr.c:clip_pixel Unexecuted instantiation: rc_tasks.c:clip_pixel Unexecuted instantiation: rc_vbr_cbr.c:clip_pixel Unexecuted instantiation: rd_cost.c:clip_pixel Unexecuted instantiation: reference_object.c:clip_pixel Unexecuted instantiation: resource_coordination_process.c:clip_pixel Unexecuted instantiation: resource_coordination_results.c:clip_pixel Unexecuted instantiation: rest_process.c:clip_pixel Unexecuted instantiation: restoration_pick.c:clip_pixel Unexecuted instantiation: segmentation_params.c:clip_pixel Unexecuted instantiation: sequence_control_set.c:clip_pixel Unexecuted instantiation: src_ops_process.c:clip_pixel Unexecuted instantiation: super_res.c:clip_pixel Unexecuted instantiation: svt_log.c:clip_pixel Unexecuted instantiation: svt_malloc.c:clip_pixel Unexecuted instantiation: svt_psnr.c:clip_pixel Unexecuted instantiation: svt_threads.c:clip_pixel Unexecuted instantiation: sys_resource_manager.c:clip_pixel Unexecuted instantiation: kernel_dispatch.c:clip_pixel Unexecuted instantiation: temporal_filtering.c:clip_pixel Unexecuted instantiation: transforms.c:clip_pixel Unexecuted instantiation: utility.c:clip_pixel Unexecuted instantiation: vector.c:clip_pixel Unexecuted instantiation: blend_a64_mask_c.c:clip_pixel Unexecuted instantiation: cfl_c.c:clip_pixel Unexecuted instantiation: compute_sad_c.c:clip_pixel Unexecuted instantiation: encode_txb_ref_c.c:clip_pixel Unexecuted instantiation: filterintra_c.c:clip_pixel Unexecuted instantiation: inter_prediction_c.c:clip_pixel Unexecuted instantiation: intra_prediction_c.c:clip_pixel Unexecuted instantiation: pack_unpack_c.c:clip_pixel Unexecuted instantiation: picture_operators_c.c:clip_pixel Unexecuted instantiation: adaptive_mv_pred.c:clip_pixel Unexecuted instantiation: block_structures.c:clip_pixel Unexecuted instantiation: cabac_context_model.c:clip_pixel Unexecuted instantiation: coding_loop.c:clip_pixel Unexecuted instantiation: coding_unit.c:clip_pixel Unexecuted instantiation: coefficients.c:clip_pixel Unexecuted instantiation: deblocking_filter.c:clip_pixel Unexecuted instantiation: enc_dec_segments.c:clip_pixel Unexecuted instantiation: encode_context.c:clip_pixel Unexecuted instantiation: global_me.c:clip_pixel Unexecuted instantiation: global_me_cost.c:clip_pixel Unexecuted instantiation: me_context.c:clip_pixel Unexecuted instantiation: pd_queue.c:clip_pixel Unexecuted instantiation: rc_crf_cqp.c:clip_pixel Unexecuted instantiation: corner_detect.c:clip_pixel Unexecuted instantiation: enc_warped_motion.c:clip_pixel |
629 | | |
630 | 29.8M | static INLINE uint16_t clip_pixel_highbd(int32_t val, int32_t bd) { |
631 | 29.8M | switch (bd) { |
632 | 29.8M | case 8: |
633 | 29.8M | default: |
634 | 29.8M | return (uint16_t)clamp(val, 0, 255); |
635 | 0 | case 10: |
636 | 0 | return (uint16_t)clamp(val, 0, 1023); |
637 | 0 | case 12: |
638 | 0 | return (uint16_t)clamp(val, 0, 4095); |
639 | 29.8M | } |
640 | 29.8M | } Unexecuted instantiation: enc_handle.c:clip_pixel_highbd Unexecuted instantiation: enc_settings.c:clip_pixel_highbd Unexecuted instantiation: metadata_handle.c:clip_pixel_highbd Unexecuted instantiation: av1me.c:clip_pixel_highbd Unexecuted instantiation: bitstream_unit.c:clip_pixel_highbd Unexecuted instantiation: cdef_process.c:clip_pixel_highbd Unexecuted instantiation: common_dsp_rtcd.c:clip_pixel_highbd Unexecuted instantiation: common_utils.c:clip_pixel_highbd Unexecuted instantiation: deblocking_common.c:clip_pixel_highbd Unexecuted instantiation: dlf_process.c:clip_pixel_highbd Unexecuted instantiation: enc_cdef.c:clip_pixel_highbd Unexecuted instantiation: enc_dec_process.c:clip_pixel_highbd Unexecuted instantiation: enc_dec_results.c:clip_pixel_highbd Unexecuted instantiation: enc_dec_tasks.c:clip_pixel_highbd Unexecuted instantiation: enc_inter_prediction.c:clip_pixel_highbd Unexecuted instantiation: enc_intra_prediction.c:clip_pixel_highbd Unexecuted instantiation: enc_mode_config.c:clip_pixel_highbd Unexecuted instantiation: entropy_coding.c:clip_pixel_highbd Unexecuted instantiation: ec_process.c:clip_pixel_highbd Unexecuted instantiation: ec_results.c:clip_pixel_highbd Unexecuted instantiation: full_loop.c:clip_pixel_highbd Unexecuted instantiation: grainSynthesis.c:clip_pixel_highbd Unexecuted instantiation: hash.c:clip_pixel_highbd Unexecuted instantiation: initial_rc_process.c:clip_pixel_highbd Unexecuted instantiation: initial_rc_results.c:clip_pixel_highbd Unexecuted instantiation: inter_prediction.c:clip_pixel_highbd Unexecuted instantiation: intra_prediction.c:clip_pixel_highbd inv_transforms.c:clip_pixel_highbd Line | Count | Source | 630 | 29.8M | static INLINE uint16_t clip_pixel_highbd(int32_t val, int32_t bd) { | 631 | 29.8M | switch (bd) { | 632 | 29.8M | case 8: | 633 | 29.8M | default: | 634 | 29.8M | return (uint16_t)clamp(val, 0, 255); | 635 | 0 | case 10: | 636 | 0 | return (uint16_t)clamp(val, 0, 1023); | 637 | 0 | case 12: | 638 | 0 | return (uint16_t)clamp(val, 0, 4095); | 639 | 29.8M | } | 640 | 29.8M | } |
Unexecuted instantiation: md_rate_estimation.c:clip_pixel_highbd Unexecuted instantiation: me_sad_calculation.c:clip_pixel_highbd Unexecuted instantiation: mode_decision.c:clip_pixel_highbd Unexecuted instantiation: md_config_process.c:clip_pixel_highbd Unexecuted instantiation: md_process.c:clip_pixel_highbd Unexecuted instantiation: motion_estimation.c:clip_pixel_highbd Unexecuted instantiation: me_process.c:clip_pixel_highbd Unexecuted instantiation: me_results.c:clip_pixel_highbd Unexecuted instantiation: neighbor_arrays.c:clip_pixel_highbd Unexecuted instantiation: packetization_process.c:clip_pixel_highbd Unexecuted instantiation: packetization_reorder_queue.c:clip_pixel_highbd Unexecuted instantiation: pic_analysis_process.c:clip_pixel_highbd Unexecuted instantiation: pic_analysis_results.c:clip_pixel_highbd Unexecuted instantiation: pic_buffer_desc.c:clip_pixel_highbd Unexecuted instantiation: pcs.c:clip_pixel_highbd Unexecuted instantiation: pd_process.c:clip_pixel_highbd Unexecuted instantiation: pd_reorder_queue.c:clip_pixel_highbd Unexecuted instantiation: pd_results.c:clip_pixel_highbd Unexecuted instantiation: pic_demux_results.c:clip_pixel_highbd Unexecuted instantiation: pic_manager_process.c:clip_pixel_highbd Unexecuted instantiation: pic_manager_queue.c:clip_pixel_highbd Unexecuted instantiation: pic_operators.c:clip_pixel_highbd Unexecuted instantiation: pred_structure.c:clip_pixel_highbd Unexecuted instantiation: product_coding_loop.c:clip_pixel_highbd Unexecuted instantiation: ac_bias.c:clip_pixel_highbd Unexecuted instantiation: rc_aq.c:clip_pixel_highbd Unexecuted instantiation: rc_process.c:clip_pixel_highbd Unexecuted instantiation: rc_results.c:clip_pixel_highbd Unexecuted instantiation: rc_rtc_cbr.c:clip_pixel_highbd Unexecuted instantiation: rc_tasks.c:clip_pixel_highbd Unexecuted instantiation: rc_vbr_cbr.c:clip_pixel_highbd Unexecuted instantiation: rd_cost.c:clip_pixel_highbd Unexecuted instantiation: reference_object.c:clip_pixel_highbd Unexecuted instantiation: resource_coordination_process.c:clip_pixel_highbd Unexecuted instantiation: resource_coordination_results.c:clip_pixel_highbd Unexecuted instantiation: rest_process.c:clip_pixel_highbd Unexecuted instantiation: restoration_pick.c:clip_pixel_highbd Unexecuted instantiation: segmentation_params.c:clip_pixel_highbd Unexecuted instantiation: sequence_control_set.c:clip_pixel_highbd Unexecuted instantiation: src_ops_process.c:clip_pixel_highbd Unexecuted instantiation: super_res.c:clip_pixel_highbd Unexecuted instantiation: svt_log.c:clip_pixel_highbd Unexecuted instantiation: svt_malloc.c:clip_pixel_highbd Unexecuted instantiation: svt_psnr.c:clip_pixel_highbd Unexecuted instantiation: svt_threads.c:clip_pixel_highbd Unexecuted instantiation: sys_resource_manager.c:clip_pixel_highbd Unexecuted instantiation: kernel_dispatch.c:clip_pixel_highbd Unexecuted instantiation: temporal_filtering.c:clip_pixel_highbd Unexecuted instantiation: transforms.c:clip_pixel_highbd Unexecuted instantiation: utility.c:clip_pixel_highbd Unexecuted instantiation: vector.c:clip_pixel_highbd Unexecuted instantiation: blend_a64_mask_c.c:clip_pixel_highbd Unexecuted instantiation: cfl_c.c:clip_pixel_highbd Unexecuted instantiation: compute_sad_c.c:clip_pixel_highbd Unexecuted instantiation: encode_txb_ref_c.c:clip_pixel_highbd Unexecuted instantiation: filterintra_c.c:clip_pixel_highbd Unexecuted instantiation: inter_prediction_c.c:clip_pixel_highbd Unexecuted instantiation: intra_prediction_c.c:clip_pixel_highbd Unexecuted instantiation: pack_unpack_c.c:clip_pixel_highbd Unexecuted instantiation: picture_operators_c.c:clip_pixel_highbd Unexecuted instantiation: adaptive_mv_pred.c:clip_pixel_highbd Unexecuted instantiation: block_structures.c:clip_pixel_highbd Unexecuted instantiation: cabac_context_model.c:clip_pixel_highbd Unexecuted instantiation: coding_loop.c:clip_pixel_highbd Unexecuted instantiation: coding_unit.c:clip_pixel_highbd Unexecuted instantiation: coefficients.c:clip_pixel_highbd Unexecuted instantiation: deblocking_filter.c:clip_pixel_highbd Unexecuted instantiation: enc_dec_segments.c:clip_pixel_highbd Unexecuted instantiation: encode_context.c:clip_pixel_highbd Unexecuted instantiation: global_me.c:clip_pixel_highbd Unexecuted instantiation: global_me_cost.c:clip_pixel_highbd Unexecuted instantiation: me_context.c:clip_pixel_highbd Unexecuted instantiation: pd_queue.c:clip_pixel_highbd Unexecuted instantiation: rc_crf_cqp.c:clip_pixel_highbd Unexecuted instantiation: corner_detect.c:clip_pixel_highbd Unexecuted instantiation: enc_warped_motion.c:clip_pixel_highbd |
641 | | |
642 | 0 | static INLINE unsigned int negative_to_zero(int value) { |
643 | 0 | return (value < 0) ? 0 : value; |
644 | 0 | } Unexecuted instantiation: enc_handle.c:negative_to_zero Unexecuted instantiation: enc_settings.c:negative_to_zero Unexecuted instantiation: metadata_handle.c:negative_to_zero Unexecuted instantiation: av1me.c:negative_to_zero Unexecuted instantiation: bitstream_unit.c:negative_to_zero Unexecuted instantiation: cdef_process.c:negative_to_zero Unexecuted instantiation: common_dsp_rtcd.c:negative_to_zero Unexecuted instantiation: common_utils.c:negative_to_zero Unexecuted instantiation: deblocking_common.c:negative_to_zero Unexecuted instantiation: dlf_process.c:negative_to_zero Unexecuted instantiation: enc_cdef.c:negative_to_zero Unexecuted instantiation: enc_dec_process.c:negative_to_zero Unexecuted instantiation: enc_dec_results.c:negative_to_zero Unexecuted instantiation: enc_dec_tasks.c:negative_to_zero Unexecuted instantiation: enc_inter_prediction.c:negative_to_zero Unexecuted instantiation: enc_intra_prediction.c:negative_to_zero Unexecuted instantiation: enc_mode_config.c:negative_to_zero Unexecuted instantiation: entropy_coding.c:negative_to_zero Unexecuted instantiation: ec_process.c:negative_to_zero Unexecuted instantiation: ec_results.c:negative_to_zero Unexecuted instantiation: full_loop.c:negative_to_zero Unexecuted instantiation: grainSynthesis.c:negative_to_zero Unexecuted instantiation: hash.c:negative_to_zero Unexecuted instantiation: initial_rc_process.c:negative_to_zero Unexecuted instantiation: initial_rc_results.c:negative_to_zero Unexecuted instantiation: inter_prediction.c:negative_to_zero Unexecuted instantiation: intra_prediction.c:negative_to_zero Unexecuted instantiation: inv_transforms.c:negative_to_zero Unexecuted instantiation: md_rate_estimation.c:negative_to_zero Unexecuted instantiation: me_sad_calculation.c:negative_to_zero Unexecuted instantiation: mode_decision.c:negative_to_zero Unexecuted instantiation: md_config_process.c:negative_to_zero Unexecuted instantiation: md_process.c:negative_to_zero Unexecuted instantiation: motion_estimation.c:negative_to_zero Unexecuted instantiation: me_process.c:negative_to_zero Unexecuted instantiation: me_results.c:negative_to_zero Unexecuted instantiation: neighbor_arrays.c:negative_to_zero Unexecuted instantiation: packetization_process.c:negative_to_zero Unexecuted instantiation: packetization_reorder_queue.c:negative_to_zero Unexecuted instantiation: pic_analysis_process.c:negative_to_zero Unexecuted instantiation: pic_analysis_results.c:negative_to_zero Unexecuted instantiation: pic_buffer_desc.c:negative_to_zero Unexecuted instantiation: pcs.c:negative_to_zero Unexecuted instantiation: pd_process.c:negative_to_zero Unexecuted instantiation: pd_reorder_queue.c:negative_to_zero Unexecuted instantiation: pd_results.c:negative_to_zero Unexecuted instantiation: pic_demux_results.c:negative_to_zero Unexecuted instantiation: pic_manager_process.c:negative_to_zero Unexecuted instantiation: pic_manager_queue.c:negative_to_zero Unexecuted instantiation: pic_operators.c:negative_to_zero Unexecuted instantiation: pred_structure.c:negative_to_zero Unexecuted instantiation: product_coding_loop.c:negative_to_zero Unexecuted instantiation: ac_bias.c:negative_to_zero Unexecuted instantiation: rc_aq.c:negative_to_zero Unexecuted instantiation: rc_process.c:negative_to_zero Unexecuted instantiation: rc_results.c:negative_to_zero Unexecuted instantiation: rc_rtc_cbr.c:negative_to_zero Unexecuted instantiation: rc_tasks.c:negative_to_zero Unexecuted instantiation: rc_vbr_cbr.c:negative_to_zero Unexecuted instantiation: rd_cost.c:negative_to_zero Unexecuted instantiation: reference_object.c:negative_to_zero Unexecuted instantiation: resource_coordination_process.c:negative_to_zero Unexecuted instantiation: resource_coordination_results.c:negative_to_zero Unexecuted instantiation: rest_process.c:negative_to_zero Unexecuted instantiation: restoration_pick.c:negative_to_zero Unexecuted instantiation: segmentation_params.c:negative_to_zero Unexecuted instantiation: sequence_control_set.c:negative_to_zero Unexecuted instantiation: src_ops_process.c:negative_to_zero Unexecuted instantiation: super_res.c:negative_to_zero Unexecuted instantiation: svt_log.c:negative_to_zero Unexecuted instantiation: svt_malloc.c:negative_to_zero Unexecuted instantiation: svt_psnr.c:negative_to_zero Unexecuted instantiation: svt_threads.c:negative_to_zero Unexecuted instantiation: sys_resource_manager.c:negative_to_zero Unexecuted instantiation: kernel_dispatch.c:negative_to_zero Unexecuted instantiation: temporal_filtering.c:negative_to_zero Unexecuted instantiation: transforms.c:negative_to_zero Unexecuted instantiation: utility.c:negative_to_zero Unexecuted instantiation: vector.c:negative_to_zero Unexecuted instantiation: blend_a64_mask_c.c:negative_to_zero Unexecuted instantiation: cfl_c.c:negative_to_zero Unexecuted instantiation: compute_sad_c.c:negative_to_zero Unexecuted instantiation: encode_txb_ref_c.c:negative_to_zero Unexecuted instantiation: filterintra_c.c:negative_to_zero Unexecuted instantiation: inter_prediction_c.c:negative_to_zero Unexecuted instantiation: intra_prediction_c.c:negative_to_zero Unexecuted instantiation: pack_unpack_c.c:negative_to_zero Unexecuted instantiation: picture_operators_c.c:negative_to_zero Unexecuted instantiation: adaptive_mv_pred.c:negative_to_zero Unexecuted instantiation: block_structures.c:negative_to_zero Unexecuted instantiation: cabac_context_model.c:negative_to_zero Unexecuted instantiation: coding_loop.c:negative_to_zero Unexecuted instantiation: coding_unit.c:negative_to_zero Unexecuted instantiation: coefficients.c:negative_to_zero Unexecuted instantiation: deblocking_filter.c:negative_to_zero Unexecuted instantiation: enc_dec_segments.c:negative_to_zero Unexecuted instantiation: encode_context.c:negative_to_zero Unexecuted instantiation: global_me.c:negative_to_zero Unexecuted instantiation: global_me_cost.c:negative_to_zero Unexecuted instantiation: me_context.c:negative_to_zero Unexecuted instantiation: pd_queue.c:negative_to_zero Unexecuted instantiation: rc_crf_cqp.c:negative_to_zero Unexecuted instantiation: corner_detect.c:negative_to_zero Unexecuted instantiation: enc_warped_motion.c:negative_to_zero |
645 | | |
646 | 0 | static INLINE int av1_num_planes(EbColorConfig* color_info) { |
647 | 0 | return color_info->mono_chrome ? 1 : MAX_PLANES; |
648 | 0 | } Unexecuted instantiation: enc_handle.c:av1_num_planes Unexecuted instantiation: enc_settings.c:av1_num_planes Unexecuted instantiation: metadata_handle.c:av1_num_planes Unexecuted instantiation: aom_dsp_rtcd.c:av1_num_planes Unexecuted instantiation: av1me.c:av1_num_planes Unexecuted instantiation: bitstream_unit.c:av1_num_planes Unexecuted instantiation: cdef_process.c:av1_num_planes Unexecuted instantiation: common_dsp_rtcd.c:av1_num_planes Unexecuted instantiation: common_utils.c:av1_num_planes Unexecuted instantiation: corner_match.c:av1_num_planes Unexecuted instantiation: deblocking_common.c:av1_num_planes Unexecuted instantiation: dlf_process.c:av1_num_planes Unexecuted instantiation: enc_cdef.c:av1_num_planes Unexecuted instantiation: enc_dec_process.c:av1_num_planes Unexecuted instantiation: enc_dec_results.c:av1_num_planes Unexecuted instantiation: enc_dec_tasks.c:av1_num_planes Unexecuted instantiation: enc_inter_prediction.c:av1_num_planes Unexecuted instantiation: enc_intra_prediction.c:av1_num_planes Unexecuted instantiation: enc_mode_config.c:av1_num_planes Unexecuted instantiation: entropy_coding.c:av1_num_planes Unexecuted instantiation: ec_process.c:av1_num_planes Unexecuted instantiation: ec_results.c:av1_num_planes Unexecuted instantiation: fft.c:av1_num_planes Unexecuted instantiation: full_loop.c:av1_num_planes Unexecuted instantiation: grainSynthesis.c:av1_num_planes Unexecuted instantiation: hash.c:av1_num_planes Unexecuted instantiation: initial_rc_process.c:av1_num_planes Unexecuted instantiation: initial_rc_results.c:av1_num_planes Unexecuted instantiation: inter_prediction.c:av1_num_planes Unexecuted instantiation: intra_prediction.c:av1_num_planes Unexecuted instantiation: inv_transforms.c:av1_num_planes Unexecuted instantiation: md_rate_estimation.c:av1_num_planes Unexecuted instantiation: me_sad_calculation.c:av1_num_planes Unexecuted instantiation: mode_decision.c:av1_num_planes Unexecuted instantiation: md_config_process.c:av1_num_planes Unexecuted instantiation: md_process.c:av1_num_planes Unexecuted instantiation: motion_estimation.c:av1_num_planes Unexecuted instantiation: me_process.c:av1_num_planes Unexecuted instantiation: me_results.c:av1_num_planes Unexecuted instantiation: neighbor_arrays.c:av1_num_planes Unexecuted instantiation: noise_model.c:av1_num_planes Unexecuted instantiation: noise_util.c:av1_num_planes Unexecuted instantiation: packetization_process.c:av1_num_planes Unexecuted instantiation: packetization_reorder_queue.c:av1_num_planes Unexecuted instantiation: pic_analysis_process.c:av1_num_planes Unexecuted instantiation: pic_analysis_results.c:av1_num_planes Unexecuted instantiation: pic_buffer_desc.c:av1_num_planes Unexecuted instantiation: pcs.c:av1_num_planes Unexecuted instantiation: pd_process.c:av1_num_planes Unexecuted instantiation: pd_reorder_queue.c:av1_num_planes Unexecuted instantiation: pd_results.c:av1_num_planes Unexecuted instantiation: pic_demux_results.c:av1_num_planes Unexecuted instantiation: pic_manager_process.c:av1_num_planes Unexecuted instantiation: pic_manager_queue.c:av1_num_planes Unexecuted instantiation: pic_operators.c:av1_num_planes Unexecuted instantiation: pred_structure.c:av1_num_planes Unexecuted instantiation: product_coding_loop.c:av1_num_planes Unexecuted instantiation: ac_bias.c:av1_num_planes Unexecuted instantiation: rc_aq.c:av1_num_planes Unexecuted instantiation: rc_process.c:av1_num_planes Unexecuted instantiation: rc_results.c:av1_num_planes Unexecuted instantiation: rc_rtc_cbr.c:av1_num_planes Unexecuted instantiation: rc_tasks.c:av1_num_planes Unexecuted instantiation: rc_vbr_cbr.c:av1_num_planes Unexecuted instantiation: rd_cost.c:av1_num_planes Unexecuted instantiation: reference_object.c:av1_num_planes Unexecuted instantiation: resource_coordination_process.c:av1_num_planes Unexecuted instantiation: resource_coordination_results.c:av1_num_planes Unexecuted instantiation: rest_process.c:av1_num_planes Unexecuted instantiation: restoration_pick.c:av1_num_planes Unexecuted instantiation: segmentation_params.c:av1_num_planes Unexecuted instantiation: sequence_control_set.c:av1_num_planes Unexecuted instantiation: src_ops_process.c:av1_num_planes Unexecuted instantiation: super_res.c:av1_num_planes Unexecuted instantiation: svt_log.c:av1_num_planes Unexecuted instantiation: svt_malloc.c:av1_num_planes Unexecuted instantiation: svt_psnr.c:av1_num_planes Unexecuted instantiation: svt_threads.c:av1_num_planes Unexecuted instantiation: sys_resource_manager.c:av1_num_planes Unexecuted instantiation: kernel_dispatch.c:av1_num_planes Unexecuted instantiation: temporal_filtering.c:av1_num_planes Unexecuted instantiation: transforms.c:av1_num_planes Unexecuted instantiation: utility.c:av1_num_planes Unexecuted instantiation: vector.c:av1_num_planes Unexecuted instantiation: warped_motion.c:av1_num_planes Unexecuted instantiation: blend_a64_mask_c.c:av1_num_planes Unexecuted instantiation: cfl_c.c:av1_num_planes Unexecuted instantiation: compute_sad_c.c:av1_num_planes Unexecuted instantiation: encode_txb_ref_c.c:av1_num_planes Unexecuted instantiation: filterintra_c.c:av1_num_planes Unexecuted instantiation: inter_prediction_c.c:av1_num_planes Unexecuted instantiation: intra_prediction_c.c:av1_num_planes Unexecuted instantiation: pack_unpack_c.c:av1_num_planes Unexecuted instantiation: picture_operators_c.c:av1_num_planes Unexecuted instantiation: sad_av1.c:av1_num_planes Unexecuted instantiation: adaptive_mv_pred.c:av1_num_planes Unexecuted instantiation: blend_a64_mask.c:av1_num_planes Unexecuted instantiation: block_structures.c:av1_num_planes Unexecuted instantiation: cabac_context_model.c:av1_num_planes Unexecuted instantiation: coding_loop.c:av1_num_planes Unexecuted instantiation: coding_unit.c:av1_num_planes Unexecuted instantiation: coefficients.c:av1_num_planes Unexecuted instantiation: deblocking_filter.c:av1_num_planes Unexecuted instantiation: enc_dec_segments.c:av1_num_planes Unexecuted instantiation: encode_context.c:av1_num_planes Unexecuted instantiation: global_me.c:av1_num_planes Unexecuted instantiation: global_me_cost.c:av1_num_planes Unexecuted instantiation: me_context.c:av1_num_planes Unexecuted instantiation: pd_queue.c:av1_num_planes Unexecuted instantiation: rc_crf_cqp.c:av1_num_planes Unexecuted instantiation: corner_detect.c:av1_num_planes Unexecuted instantiation: ransac.c:av1_num_planes Unexecuted instantiation: enc_warped_motion.c:av1_num_planes |
649 | | |
650 | | typedef struct IntraSize { |
651 | | uint8_t top; |
652 | | uint8_t left; |
653 | | } IntraSize; |
654 | | |
655 | 0 | #define MI_SIZE_W_8X8 2 |
656 | 0 | #define MI_SIZE_W_16X16 4 |
657 | 0 | #define MI_SIZE_W_64X64 16 |
658 | | |
659 | | //*********************************************************************************************************************// |
660 | | // enums.h |
661 | | typedef enum PdPass { |
662 | | PD_PASS_0, |
663 | | PD_PASS_1, |
664 | | PD_PASS_TOTAL, |
665 | | } PdPass; |
666 | | |
667 | | typedef enum ATTRIBUTE_PACKED { |
668 | | REGULAR_PD0 = |
669 | | -1, // The regular PD0 path; negative so that LPD1 can start at 0 (easy for indexing arrays in lpd0_ctrls) |
670 | | LPD0_LVL_0 = 0, |
671 | | LPD0_LVL_1 = 1, |
672 | | LPD0_LVL_2 = 2, |
673 | | LPD0_LVL_3 = 3, |
674 | | LPD0_LVL_4 = 4, |
675 | | VERY_LIGHT_PD0 = 5, // Lightest PD0 path, doesn't perform TX |
676 | | LPD0_LEVELS // Number of light-PD0 paths (regular PD0 isn't a light-PD0 path) |
677 | | } Pd0Level; |
678 | | |
679 | | typedef enum ATTRIBUTE_PACKED { |
680 | | REGULAR_PD1 = |
681 | | -1, // The regular PD1 path; negative so that LPD1 can start at 0 (easy for indexing arrays in lpd1_ctrls) |
682 | | LPD1_LVL_0 = 0, // Light-PD1 path, with safest feature levels |
683 | | LPD1_LVL_1 = 1, // Light PD1 path, having more shortcuts than previous LPD1 level |
684 | | LPD1_LVL_2 = 2, // Light PD1 path, having more shortcuts than previous LPD1 level |
685 | | LPD1_LVL_3 = 3, // Light PD1 path, having more shortcuts than previous LPD1 level |
686 | | LPD1_LVL_4 = 4, // Light PD1 path, having more shortcuts than previous LPD1 level |
687 | | #if OPT_LPD1 |
688 | | LPD1_LVL_5 = 5, // Light PD1 path, having more shortcuts than previous LPD1 level |
689 | | LPD1_LVL_6 = 6, // Light-PD1 path, with most aggressive feature levels |
690 | | #else |
691 | | LPD1_LVL_5 = 5, // Light-PD1 path, with most aggressive feature levels |
692 | | #endif |
693 | | LPD1_LEVELS // Number of light-PD1 paths (regular PD1 isn't a light-PD1 path) |
694 | | } Pd1Level; |
695 | | |
696 | | // If adding/removing a class, must also update is_intra_class func and MD_STAGE_NICS array |
697 | | typedef enum CandClass { |
698 | | CAND_CLASS_0, |
699 | | CAND_CLASS_1, |
700 | | CAND_CLASS_2, |
701 | | CAND_CLASS_3, |
702 | | CAND_CLASS_4, |
703 | | CAND_CLASS_TOTAL |
704 | | } CandClass; |
705 | | |
706 | | typedef enum MdStage { MD_STAGE_0, MD_STAGE_1, MD_STAGE_2, MD_STAGE_3, MD_STAGE_TOTAL, INVALID_MD_STAGE } MdStage; |
707 | | |
708 | | typedef enum MdStagingMode { |
709 | | MD_STAGING_MODE_0, |
710 | | MD_STAGING_MODE_1, |
711 | | MD_STAGING_MODE_2, |
712 | | MD_STAGING_MODE_TOTAL |
713 | | } MdStagingMode; |
714 | | |
715 | 1.22M | static INLINE bool is_intra_class(CandClass c) { |
716 | 1.22M | return (c == CAND_CLASS_0 || c == CAND_CLASS_3 || c == CAND_CLASS_4); |
717 | 1.22M | } Unexecuted instantiation: enc_handle.c:is_intra_class Unexecuted instantiation: enc_settings.c:is_intra_class Unexecuted instantiation: metadata_handle.c:is_intra_class Unexecuted instantiation: aom_dsp_rtcd.c:is_intra_class Unexecuted instantiation: av1me.c:is_intra_class Unexecuted instantiation: bitstream_unit.c:is_intra_class Unexecuted instantiation: cdef_process.c:is_intra_class Unexecuted instantiation: common_dsp_rtcd.c:is_intra_class Unexecuted instantiation: common_utils.c:is_intra_class Unexecuted instantiation: convolve.c:is_intra_class Unexecuted instantiation: corner_match.c:is_intra_class Unexecuted instantiation: deblocking_common.c:is_intra_class Unexecuted instantiation: dlf_process.c:is_intra_class Unexecuted instantiation: enc_cdef.c:is_intra_class Unexecuted instantiation: enc_dec_process.c:is_intra_class Unexecuted instantiation: enc_dec_results.c:is_intra_class Unexecuted instantiation: enc_dec_tasks.c:is_intra_class Unexecuted instantiation: enc_inter_prediction.c:is_intra_class Unexecuted instantiation: enc_intra_prediction.c:is_intra_class Unexecuted instantiation: enc_mode_config.c:is_intra_class Unexecuted instantiation: entropy_coding.c:is_intra_class Unexecuted instantiation: ec_process.c:is_intra_class Unexecuted instantiation: ec_results.c:is_intra_class Unexecuted instantiation: fft.c:is_intra_class Unexecuted instantiation: full_loop.c:is_intra_class Unexecuted instantiation: grainSynthesis.c:is_intra_class Unexecuted instantiation: hash.c:is_intra_class Unexecuted instantiation: hash_motion.c:is_intra_class Unexecuted instantiation: initial_rc_process.c:is_intra_class Unexecuted instantiation: initial_rc_results.c:is_intra_class Unexecuted instantiation: inter_prediction.c:is_intra_class Unexecuted instantiation: intra_prediction.c:is_intra_class Unexecuted instantiation: inv_transforms.c:is_intra_class Unexecuted instantiation: md_rate_estimation.c:is_intra_class Unexecuted instantiation: me_sad_calculation.c:is_intra_class Unexecuted instantiation: mode_decision.c:is_intra_class Unexecuted instantiation: md_config_process.c:is_intra_class Unexecuted instantiation: md_process.c:is_intra_class Unexecuted instantiation: motion_estimation.c:is_intra_class Unexecuted instantiation: me_process.c:is_intra_class Unexecuted instantiation: me_results.c:is_intra_class Unexecuted instantiation: neighbor_arrays.c:is_intra_class Unexecuted instantiation: noise_model.c:is_intra_class Unexecuted instantiation: noise_util.c:is_intra_class Unexecuted instantiation: packetization_process.c:is_intra_class Unexecuted instantiation: packetization_reorder_queue.c:is_intra_class Unexecuted instantiation: palette.c:is_intra_class Unexecuted instantiation: pic_analysis_process.c:is_intra_class Unexecuted instantiation: pic_analysis_results.c:is_intra_class Unexecuted instantiation: pic_buffer_desc.c:is_intra_class Unexecuted instantiation: pcs.c:is_intra_class Unexecuted instantiation: pd_process.c:is_intra_class Unexecuted instantiation: pd_reorder_queue.c:is_intra_class Unexecuted instantiation: pd_results.c:is_intra_class Unexecuted instantiation: pic_demux_results.c:is_intra_class Unexecuted instantiation: pic_manager_process.c:is_intra_class Unexecuted instantiation: pic_manager_queue.c:is_intra_class Unexecuted instantiation: pic_operators.c:is_intra_class Unexecuted instantiation: pred_structure.c:is_intra_class product_coding_loop.c:is_intra_class Line | Count | Source | 715 | 1.22M | static INLINE bool is_intra_class(CandClass c) { | 716 | 1.22M | return (c == CAND_CLASS_0 || c == CAND_CLASS_3 || c == CAND_CLASS_4); | 717 | 1.22M | } |
Unexecuted instantiation: ac_bias.c:is_intra_class Unexecuted instantiation: rc_aq.c:is_intra_class Unexecuted instantiation: rc_process.c:is_intra_class Unexecuted instantiation: rc_results.c:is_intra_class Unexecuted instantiation: rc_rtc_cbr.c:is_intra_class Unexecuted instantiation: rc_tasks.c:is_intra_class Unexecuted instantiation: rc_vbr_cbr.c:is_intra_class Unexecuted instantiation: rd_cost.c:is_intra_class Unexecuted instantiation: reference_object.c:is_intra_class Unexecuted instantiation: resize.c:is_intra_class Unexecuted instantiation: resource_coordination_process.c:is_intra_class Unexecuted instantiation: resource_coordination_results.c:is_intra_class Unexecuted instantiation: rest_process.c:is_intra_class Unexecuted instantiation: restoration.c:is_intra_class Unexecuted instantiation: restoration_pick.c:is_intra_class Unexecuted instantiation: segmentation.c:is_intra_class Unexecuted instantiation: segmentation_params.c:is_intra_class Unexecuted instantiation: sequence_control_set.c:is_intra_class Unexecuted instantiation: src_ops_process.c:is_intra_class Unexecuted instantiation: super_res.c:is_intra_class Unexecuted instantiation: svt_log.c:is_intra_class Unexecuted instantiation: svt_malloc.c:is_intra_class Unexecuted instantiation: svt_psnr.c:is_intra_class Unexecuted instantiation: svt_threads.c:is_intra_class Unexecuted instantiation: sys_resource_manager.c:is_intra_class Unexecuted instantiation: kernel_dispatch.c:is_intra_class Unexecuted instantiation: temporal_filtering.c:is_intra_class Unexecuted instantiation: transforms.c:is_intra_class Unexecuted instantiation: utility.c:is_intra_class Unexecuted instantiation: vector.c:is_intra_class Unexecuted instantiation: warped_motion.c:is_intra_class Unexecuted instantiation: blend_a64_mask_c.c:is_intra_class Unexecuted instantiation: cfl_c.c:is_intra_class Unexecuted instantiation: compute_sad_c.c:is_intra_class Unexecuted instantiation: encode_txb_ref_c.c:is_intra_class Unexecuted instantiation: filterintra_c.c:is_intra_class Unexecuted instantiation: inter_prediction_c.c:is_intra_class Unexecuted instantiation: intra_prediction_c.c:is_intra_class Unexecuted instantiation: pack_unpack_c.c:is_intra_class Unexecuted instantiation: picture_operators_c.c:is_intra_class Unexecuted instantiation: sad_av1.c:is_intra_class Unexecuted instantiation: variance.c:is_intra_class Unexecuted instantiation: adaptive_mv_pred.c:is_intra_class Unexecuted instantiation: blend_a64_mask.c:is_intra_class Unexecuted instantiation: block_structures.c:is_intra_class Unexecuted instantiation: cabac_context_model.c:is_intra_class Unexecuted instantiation: cdef.c:is_intra_class Unexecuted instantiation: coding_loop.c:is_intra_class Unexecuted instantiation: coding_unit.c:is_intra_class Unexecuted instantiation: coefficients.c:is_intra_class Unexecuted instantiation: deblocking_filter.c:is_intra_class Unexecuted instantiation: enc_dec_segments.c:is_intra_class Unexecuted instantiation: encode_context.c:is_intra_class Unexecuted instantiation: firstpass.c:is_intra_class Unexecuted instantiation: global_me.c:is_intra_class Unexecuted instantiation: global_me_cost.c:is_intra_class Unexecuted instantiation: mcomp.c:is_intra_class Unexecuted instantiation: me_context.c:is_intra_class Unexecuted instantiation: pass2_strategy.c:is_intra_class Unexecuted instantiation: pd_queue.c:is_intra_class Unexecuted instantiation: rc_crf_cqp.c:is_intra_class Unexecuted instantiation: corner_detect.c:is_intra_class Unexecuted instantiation: global_motion.c:is_intra_class Unexecuted instantiation: ransac.c:is_intra_class Unexecuted instantiation: enc_warped_motion.c:is_intra_class |
718 | | |
719 | 5.93k | #define NICS_PIC_TYPE 3 |
720 | 1.48k | #define NICS_SCALING_LEVELS 16 |
721 | | static const uint32_t MD_STAGE_NICS[NICS_PIC_TYPE][CAND_CLASS_TOTAL] = { |
722 | | // C0 C1 C2 C3 |
723 | | {64, 0, 0, 64, 64}, // I SLICE |
724 | | {32, 32, 32, 32, 32}, // REF FRAMES |
725 | | {16, 16, 16, 16, 16}, // NON-REF FRAMES |
726 | | }; |
727 | 530k | #define MD_STAGE_NICS_SCAL_DENUM 16 |
728 | | |
729 | | static const uint32_t MD_STAGE_NICS_SCAL_NUM[NICS_SCALING_LEVELS][MD_STAGE_TOTAL] = { |
730 | | // S0 S1 S2 S3 |
731 | | {0, 20, 20, 20}, // LEVEL 0 |
732 | | {0, 18, 18, 18}, // LEVEL 1 |
733 | | {0, 16, 16, 16}, // LEVEL 2 |
734 | | {0, 12, 12, 12}, // LEVEL 3 |
735 | | {0, 10, 10, 10}, // LEVEL 4 |
736 | | {0, 8, 8, 8}, // LEVEL 5 |
737 | | {0, 6, 6, 6}, // LEVEL 6 |
738 | | {0, 4, 5, 5}, // LEVEL 7 |
739 | | {0, 4, 4, 4}, // LEVEL 8 |
740 | | {0, 3, 4, 4}, // LEVEL 9 |
741 | | {0, 3, 3, 3}, // LEVEL 10 |
742 | | {0, 3, 2, 2}, // LEVEL 11 |
743 | | {0, 3, 1, 1}, // LEVEL 12 |
744 | | {0, 2, 1, 1}, // LEVEL 13 |
745 | | {0, 2, 0, 0}, // LEVEL 14 |
746 | | {0, 0, 0, 0} // LEVEL 15 |
747 | | }; |
748 | | |
749 | | typedef enum { |
750 | | EIGHTTAP_REGULAR, |
751 | | EIGHTTAP_SMOOTH, |
752 | | MULTITAP_SHARP, |
753 | | BILINEAR, |
754 | | INTERP_FILTERS_ALL, |
755 | | SWITCHABLE_FILTERS = BILINEAR, |
756 | | SWITCHABLE = SWITCHABLE_FILTERS + 1, /* the last switchable one */ |
757 | | EXTRA_FILTERS = INTERP_FILTERS_ALL - SWITCHABLE_FILTERS, |
758 | | } InterpFilter; |
759 | | |
760 | | enum { |
761 | | SPEL_ME, //ME |
762 | | SPEL_PME, //PME |
763 | | } UENUM1BYTE(SUBPEL_STAGE); |
764 | | |
765 | | enum { |
766 | | USE_2_TAPS_ORIG = 0, // This is used in temporal filtering. |
767 | | USE_2_TAPS, |
768 | | USE_4_TAPS, |
769 | | USE_8_TAPS, |
770 | | } UENUM1BYTE(SUBPEL_SEARCH_TYPE); |
771 | | |
772 | | enum { |
773 | | SUBPEL_TREE = 0, |
774 | | SUBPEL_TREE_PRUNED = 1, // Prunes 1/2-pel searches |
775 | | #if OPT_LPD1 |
776 | | SUBPEL_FIXED_STAGE_SEARCH = 2, |
777 | | #else |
778 | | //SUBPEL_TREE_PRUNED_MORE = 2, // Not supported - (from libaom: Prunes 1/2-pel searches more aggressively) |
779 | | //SUBPEL_TREE_PRUNED_EVENMORE = 3, // Not supported - (from libaom: Prunes 1/2- and 1/4-pel searches) |
780 | | #endif |
781 | | } UENUM1BYTE(SUBPEL_SEARCH_METHODS); |
782 | | |
783 | | enum { EIGHTH_PEL, QUARTER_PEL, HALF_PEL, FULL_PEL } UENUM1BYTE(SUBPEL_FORCE_STOP); |
784 | | |
785 | | typedef struct InterpFilterParams { |
786 | | const int16_t* filter_ptr; |
787 | | uint16_t taps; |
788 | | uint16_t subpel_shifts; |
789 | | InterpFilter interp_filter; |
790 | | } InterpFilterParams; |
791 | | |
792 | | typedef enum IfsLevel { |
793 | | IFS_OFF, // IFS OFF |
794 | | IFS_MDS0, // IFS @ md_stage_0() |
795 | | IFS_MDS1, // IFS @ md_stage_1() |
796 | | IFS_MDS2, // IFS @ md_stage_2() |
797 | | IFS_MDS3, // IFS @ md_stage_3() |
798 | | } IfsLevel; |
799 | | |
800 | | typedef enum SpatialSseLevel { |
801 | | SSSE_MDS1, // Spatial SSE @ md_stage_1() and beyond |
802 | | SSSE_MDS2, // Spatial SSE @ md_stage_2() and beyond |
803 | | SSSE_MDS3, // Spatial SSE @ md_stage_3() and beyond |
804 | | SSSE_OFF // Spatial SSE OFF |
805 | | } SpatialSseLevel; |
806 | | |
807 | | typedef enum DistortionType { SAD, VAR, SSD, DIST_TYPES } DistortionType; |
808 | | |
809 | | // Profile 0. 8-bit and 10-bit 4:2:0 and 4:0:0 only. |
810 | | // Profile 1. 8-bit and 10-bit 4:4:4 |
811 | | // Profile 2. 8-bit and 10-bit 4:2:2 |
812 | | // 12 bit 4:0:0, 4:2:2 and 4:4:4 |
813 | | typedef enum BitstreamProfile { PROFILE_0, PROFILE_1, PROFILE_2, MAX_PROFILES } BitstreamProfile; |
814 | | |
815 | | // Note: Some enums use the attribute 'packed' to use smallest possible integer |
816 | | // type, so that we can save memory when they are used in structs/arrays. |
817 | | |
818 | | typedef enum ATTRIBUTE_PACKED { |
819 | | BLOCK_4X4, |
820 | | BLOCK_4X8, |
821 | | BLOCK_8X4, |
822 | | BLOCK_8X8, |
823 | | BLOCK_8X16, |
824 | | BLOCK_16X8, |
825 | | BLOCK_16X16, |
826 | | BLOCK_16X32, |
827 | | BLOCK_32X16, |
828 | | BLOCK_32X32, |
829 | | BLOCK_32X64, |
830 | | BLOCK_64X32, |
831 | | BLOCK_64X64, |
832 | | BLOCK_64X128, |
833 | | BLOCK_128X64, |
834 | | BLOCK_128X128, |
835 | | BLOCK_4X16, |
836 | | BLOCK_16X4, |
837 | | BLOCK_8X32, |
838 | | BLOCK_32X8, |
839 | | BLOCK_16X64, |
840 | | BLOCK_64X16, |
841 | | BLOCK_SIZES_ALL, |
842 | | BLOCK_SIZES = BLOCK_4X16, |
843 | | BLOCK_INVALID = 255, |
844 | | BLOCK_LARGEST = (BLOCK_SIZES - 1) |
845 | | } BlockSize; |
846 | | |
847 | | typedef enum ATTRIBUTE_PACKED { |
848 | | PARTITION_NONE, |
849 | | PARTITION_HORZ, |
850 | | PARTITION_VERT, |
851 | | PARTITION_SPLIT, |
852 | | PARTITION_HORZ_A, // HORZ split and the top partition is split again |
853 | | PARTITION_HORZ_B, // HORZ split and the bottom partition is split again |
854 | | PARTITION_VERT_A, // VERT split and the left partition is split again |
855 | | PARTITION_VERT_B, // VERT split and the right partition is split again |
856 | | PARTITION_HORZ_4, // 4:1 horizontal partition |
857 | | PARTITION_VERT_4, // 4:1 vertical partition |
858 | | EXT_PARTITION_TYPES, |
859 | | PARTITION_TYPES = PARTITION_SPLIT + 1, |
860 | | PARTITION_INVALID = 255 |
861 | | } PartitionType; |
862 | | |
863 | | #define MAX_NUM_BLOCKS_ALLOC 4421 |
864 | | |
865 | | typedef enum ATTRIBUTE_PACKED { |
866 | | PART_N, |
867 | | PART_H, |
868 | | PART_V, |
869 | | PART_H4, |
870 | | PART_V4, |
871 | | PART_HA, |
872 | | PART_HB, |
873 | | PART_VA, |
874 | | PART_VB, |
875 | | PART_S |
876 | | } Part; |
877 | | |
878 | | typedef char PartitionContextType; |
879 | 528k | #define PARTITION_PLOFFSET 4 // number of probability models per block size |
880 | 9.95k | #define PARTITION_BLOCK_SIZES 5 |
881 | 9.95k | #define PARTITION_CONTEXTS (PARTITION_BLOCK_SIZES * PARTITION_PLOFFSET) |
882 | | |
883 | | // block transform size |
884 | | #ifdef _MSC_VER |
885 | | typedef uint8_t TxSize; |
886 | | |
887 | | enum ATTRIBUTE_PACKED { |
888 | | #else |
889 | | typedef enum ATTRIBUTE_PACKED { |
890 | | #endif |
891 | | TX_4X4, // 4x4 transform |
892 | | TX_8X8, // 8x8 transform |
893 | | TX_16X16, // 16x16 transform |
894 | | TX_32X32, // 32x32 transform |
895 | | TX_64X64, // 64x64 transform |
896 | | TX_4X8, // 4x8 transform |
897 | | TX_8X4, // 8x4 transform |
898 | | TX_8X16, // 8x16 transform |
899 | | TX_16X8, // 16x8 transform |
900 | | TX_16X32, // 16x32 transform |
901 | | TX_32X16, // 32x16 transform |
902 | | TX_32X64, // 32x64 transform |
903 | | TX_64X32, // 64x32 transform |
904 | | TX_4X16, // 4x16 transform |
905 | | TX_16X4, // 16x4 transform |
906 | | TX_8X32, // 8x32 transform |
907 | | TX_32X8, // 32x8 transform |
908 | | TX_16X64, // 16x64 transform |
909 | | TX_64X16, // 64x16 transform |
910 | | TX_SIZES_ALL, // Includes rectangular transforms |
911 | | TX_SIZES = TX_4X8, // Does NOT include rectangular transforms |
912 | | TX_SIZES_LARGEST = TX_64X64, |
913 | | TX_INVALID = 255 // Invalid transform size |
914 | | |
915 | | #ifdef _MSC_VER |
916 | | }; |
917 | | #else |
918 | | } TxSize; |
919 | | #endif |
920 | | |
921 | | // TranLow is the datatype used for final transform coefficients. |
922 | | typedef int32_t TranLow; |
923 | | typedef uint8_t QmVal; |
924 | | |
925 | | typedef enum TxClass { |
926 | | TX_CLASS_2D = 0, |
927 | | TX_CLASS_HORIZ = 1, |
928 | | TX_CLASS_VERT = 2, |
929 | | TX_CLASSES = 3, |
930 | | } TxClass; |
931 | | |
932 | 17.5k | #define ALIGN_POWER_OF_TWO(value, n) (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1)) |
933 | | |
934 | 74.4k | #define CONVERT_TO_SHORTPTR(x) ((uint16_t*)(((uintptr_t)(x)) << 1)) |
935 | 70.0k | #define CONVERT_TO_BYTEPTR(x) ((uint8_t*)(((uintptr_t)(x)) >> 1)) |
936 | | |
937 | 4.22M | #define AOMMIN(x, y) (((x) < (y)) ? (x) : (y)) |
938 | 2.68M | #define AOMMAX(x, y) (((x) > (y)) ? (x) : (y)) |
939 | | |
940 | | // frame transform mode |
941 | | typedef enum ATTRIBUTE_PACKED { |
942 | | ONLY_4X4, // use only 4x4 transform |
943 | | TX_MODE_LARGEST, // transform size is the largest possible for pu size |
944 | | TX_MODE_SELECT, // transform specified for each block |
945 | | TX_MODES, |
946 | | } TxMode; |
947 | | |
948 | | // 1D tx types |
949 | | typedef enum ATTRIBUTE_PACKED { |
950 | | DCT_1D, |
951 | | ADST_1D, |
952 | | FLIPADST_1D, |
953 | | IDTX_1D, |
954 | | TX_TYPES_1D, |
955 | | } TxType1D; |
956 | | |
957 | | #ifdef _MSC_VER |
958 | | typedef uint8_t TxType; |
959 | | |
960 | | enum ATTRIBUTE_PACKED { |
961 | | #else |
962 | | typedef enum ATTRIBUTE_PACKED { |
963 | | #endif |
964 | | DCT_DCT, // DCT in both horizontal and vertical |
965 | | ADST_DCT, // ADST in vertical, DCT in horizontal |
966 | | DCT_ADST, // DCT in vertical, ADST in horizontal |
967 | | ADST_ADST, // ADST in both directions |
968 | | FLIPADST_DCT, |
969 | | DCT_FLIPADST, |
970 | | FLIPADST_FLIPADST, |
971 | | ADST_FLIPADST, |
972 | | FLIPADST_ADST, |
973 | | IDTX, |
974 | | V_DCT, |
975 | | H_DCT, |
976 | | V_ADST, |
977 | | H_ADST, |
978 | | V_FLIPADST, |
979 | | H_FLIPADST, |
980 | | TX_TYPES, |
981 | | INVALID_TX_TYPE, |
982 | | #ifdef _MSC_VER |
983 | | }; |
984 | | #else |
985 | | } TxType; |
986 | | #endif |
987 | | |
988 | 0 | #define MAX_TX_TYPE_GROUP 6 |
989 | | static const TxType tx_type_group[MAX_TX_TYPE_GROUP][TX_TYPES] = {{DCT_DCT, INVALID_TX_TYPE}, |
990 | | {V_DCT, H_DCT, INVALID_TX_TYPE}, |
991 | | {ADST_ADST, INVALID_TX_TYPE}, |
992 | | {ADST_DCT, DCT_ADST, INVALID_TX_TYPE}, |
993 | | {FLIPADST_FLIPADST, IDTX, INVALID_TX_TYPE}, |
994 | | {FLIPADST_DCT, |
995 | | DCT_FLIPADST, |
996 | | ADST_FLIPADST, |
997 | | FLIPADST_ADST, |
998 | | V_ADST, |
999 | | H_ADST, |
1000 | | V_FLIPADST, |
1001 | | H_FLIPADST, |
1002 | | INVALID_TX_TYPE}}; |
1003 | | |
1004 | | typedef enum ATTRIBUTE_PACKED { |
1005 | | // DCT only |
1006 | | EXT_TX_SET_DCTONLY, |
1007 | | // DCT + Identity only |
1008 | | EXT_TX_SET_DCT_IDTX, |
1009 | | // Discrete Trig transforms w/o flip (4) + Identity (1) |
1010 | | EXT_TX_SET_DTT4_IDTX, |
1011 | | // Discrete Trig transforms w/o flip (4) + Identity (1) + 1D Hor/vert DCT (2) |
1012 | | EXT_TX_SET_DTT4_IDTX_1DDCT, |
1013 | | // Discrete Trig transforms w/ flip (9) + Identity (1) + 1D Hor/Ver DCT (2) |
1014 | | EXT_TX_SET_DTT9_IDTX_1DDCT, |
1015 | | // Discrete Trig transforms w/ flip (9) + Identity (1) + 1D Hor/Ver (6) |
1016 | | EXT_TX_SET_ALL16, |
1017 | | EXT_TX_SET_TYPES |
1018 | | } TxSetType; |
1019 | | |
1020 | | typedef struct TxfmParam { |
1021 | | // for both forward and inverse transforms |
1022 | | TxType tx_type; |
1023 | | TxSize tx_size; |
1024 | | int32_t lossless; |
1025 | | int32_t bd; |
1026 | | // are the pixel buffers octets or shorts? This should collapse to |
1027 | | // bd==8 implies !is_hbd, but that's not certain right now. |
1028 | | int32_t is_hbd; |
1029 | | TxSetType tx_set_type; |
1030 | | // for inverse transforms only |
1031 | | int32_t eob; |
1032 | | } TxfmParam; |
1033 | | |
1034 | | #define IS_2D_TRANSFORM(tx_type) (tx_type < IDTX) |
1035 | 2.37k | #define EXT_TX_SIZES 4 // number of sizes that use extended transforms |
1036 | 7.58k | #define EXT_TX_SETS_INTER 4 // Sets of transform selections for INTER |
1037 | 5.68k | #define EXT_TX_SETS_INTRA 3 // Sets of transform selections for INTRA |
1038 | | |
1039 | | typedef enum ATTRIBUTE_PACKED { |
1040 | | UNIDIR_COMP_REFERENCE, |
1041 | | BIDIR_COMP_REFERENCE, |
1042 | | COMP_REFERENCE_TYPES, |
1043 | | } CompReferenceType; |
1044 | | |
1045 | 66.3k | #define CFL_ALPHABET_SIZE_LOG2 4 |
1046 | 66.3k | #define CFL_ALPHABET_SIZE (1 << CFL_ALPHABET_SIZE_LOG2) |
1047 | 0 | #define CFL_IDX_U(idx) (idx >> CFL_ALPHABET_SIZE_LOG2) |
1048 | 0 | #define CFL_IDX_V(idx) (idx & (CFL_ALPHABET_SIZE - 1)) |
1049 | | |
1050 | | typedef enum ATTRIBUTE_PACKED { CFL_PRED_U, CFL_PRED_V, CFL_PRED_PLANES } CflPredType; |
1051 | | |
1052 | | typedef enum ATTRIBUTE_PACKED { CFL_SIGN_ZERO, CFL_SIGN_NEG, CFL_SIGN_POS, CFL_SIGNS } CflSignType; |
1053 | | |
1054 | | typedef enum ATTRIBUTE_PACKED { CFL_DISALLOWED, CFL_ALLOWED, CFL_ALLOWED_TYPES } CflAllowedType; |
1055 | | |
1056 | | // CFL_SIGN_ZERO,CFL_SIGN_ZERO is invalid |
1057 | 4.26k | #define CFL_JOINT_SIGNS (CFL_SIGNS * CFL_SIGNS - 1) |
1058 | | // CFL_SIGN_U is equivalent to (js + 1) / 3 for js in 0 to 8 |
1059 | 13.2k | #define CFL_SIGN_U(js) (((js + 1) * 11) >> 5) |
1060 | | // CFL_SIGN_V is equivalent to (js + 1) % 3 for js in 0 to 8 |
1061 | 6.63k | #define CFL_SIGN_V(js) ((js + 1) - CFL_SIGNS * CFL_SIGN_U(js)) |
1062 | | |
1063 | | // There is no context when the alpha for a given plane is zero. |
1064 | | // So there are 2 fewer contexts than joint signs. |
1065 | | #define CFL_ALPHA_CONTEXTS (CFL_JOINT_SIGNS + 1 - CFL_SIGNS) |
1066 | 2.84k | #define CFL_CONTEXT_U(js) (js + 1 - CFL_SIGNS) |
1067 | | // Also, the contexts are symmetric under swapping the planes. |
1068 | 2.84k | #define CFL_CONTEXT_V(js) (CFL_SIGN_V(js) * CFL_SIGNS + CFL_SIGN_U(js) - CFL_SIGNS) |
1069 | | |
1070 | | typedef enum ATTRIBUTE_PACKED { |
1071 | | PALETTE_MAP, |
1072 | | COLOR_MAP_TYPES, |
1073 | | } COLOR_MAP_TYPE; |
1074 | | |
1075 | | typedef enum ATTRIBUTE_PACKED { |
1076 | | TWO_COLORS, |
1077 | | THREE_COLORS, |
1078 | | FOUR_COLORS, |
1079 | | FIVE_COLORS, |
1080 | | SIX_COLORS, |
1081 | | SEVEN_COLORS, |
1082 | | EIGHT_COLORS, |
1083 | | PALETTE_SIZES |
1084 | | } PaletteSize; |
1085 | | |
1086 | | typedef enum ATTRIBUTE_PACKED { |
1087 | | PALETTE_COLOR_ONE, |
1088 | | PALETTE_COLOR_TWO, |
1089 | | PALETTE_COLOR_THREE, |
1090 | | PALETTE_COLOR_FOUR, |
1091 | | PALETTE_COLOR_FIVE, |
1092 | | PALETTE_COLOR_SIX, |
1093 | | PALETTE_COLOR_SEVEN, |
1094 | | PALETTE_COLOR_EIGHT, |
1095 | | PALETTE_COLORS |
1096 | | } PaletteColor; |
1097 | | |
1098 | | // Note: All directional predictors must be between V_PRED and D67_PRED (both |
1099 | | // inclusive). |
1100 | | typedef enum ATTRIBUTE_PACKED { |
1101 | | DC_PRED, // Average of above and left pixels |
1102 | | V_PRED, // Vertical |
1103 | | H_PRED, // Horizontal |
1104 | | D45_PRED, // Directional 45 degree |
1105 | | D135_PRED, // Directional 135 degree |
1106 | | D113_PRED, // Directional 113 degree |
1107 | | D157_PRED, // Directional 157 degree |
1108 | | D203_PRED, // Directional 203 degree |
1109 | | D67_PRED, // Directional 67 degree |
1110 | | SMOOTH_PRED, // Combination of horizontal and vertical interpolation |
1111 | | SMOOTH_V_PRED, // Vertical interpolation |
1112 | | SMOOTH_H_PRED, // Horizontal interpolation |
1113 | | PAETH_PRED, // Predict from the direction of smallest gradient |
1114 | | NEARESTMV, |
1115 | | NEARMV, |
1116 | | GLOBALMV, |
1117 | | NEWMV, |
1118 | | // Compound ref compound modes |
1119 | | NEAREST_NEARESTMV, |
1120 | | NEAR_NEARMV, |
1121 | | NEAREST_NEWMV, |
1122 | | NEW_NEARESTMV, |
1123 | | NEAR_NEWMV, |
1124 | | NEW_NEARMV, |
1125 | | GLOBAL_GLOBALMV, |
1126 | | NEW_NEWMV, |
1127 | | MB_MODE_COUNT, |
1128 | | INTRA_MODE_START = DC_PRED, |
1129 | | INTRA_MODE_END = NEARESTMV, |
1130 | | INTRA_MODE_NUM = INTRA_MODE_END - INTRA_MODE_START, |
1131 | | SINGLE_INTER_MODE_START = NEARESTMV, |
1132 | | SINGLE_INTER_MODE_END = NEAREST_NEARESTMV, |
1133 | | SINGLE_INTER_MODE_NUM = SINGLE_INTER_MODE_END - SINGLE_INTER_MODE_START, |
1134 | | COMP_INTER_MODE_START = NEAREST_NEARESTMV, |
1135 | | COMP_INTER_MODE_END = MB_MODE_COUNT, |
1136 | | COMP_INTER_MODE_NUM = COMP_INTER_MODE_END - COMP_INTER_MODE_START, |
1137 | | INTRA_MODES = PAETH_PRED + 1, // PAETH_PRED has to be the last intra mode. |
1138 | | INTRA_INVALID = MB_MODE_COUNT, // For uv_mode in inter blocks |
1139 | | } PredictionMode; |
1140 | | |
1141 | | #define MAX_UPSAMPLE_SZ 16 |
1142 | | |
1143 | | typedef enum ATTRIBUTE_PACKED { |
1144 | | UV_DC_PRED, // Average of above and left pixels |
1145 | | UV_V_PRED, // Vertical |
1146 | | UV_H_PRED, // Horizontal |
1147 | | UV_D45_PRED, // Directional 45 degree |
1148 | | UV_D135_PRED, // Directional 135 degree |
1149 | | UV_D113_PRED, // Directional 113 degree |
1150 | | UV_D157_PRED, // Directional 157 degree |
1151 | | UV_D203_PRED, // Directional 203 degree |
1152 | | UV_D67_PRED, // Directional 67 degree |
1153 | | UV_SMOOTH_PRED, // Combination of horizontal and vertical interpolation |
1154 | | UV_SMOOTH_V_PRED, // Vertical interpolation |
1155 | | UV_SMOOTH_H_PRED, // Horizontal interpolation |
1156 | | UV_PAETH_PRED, // Predict from the direction of smallest gradient |
1157 | | UV_CFL_PRED, // Chroma-from-Luma |
1158 | | UV_INTRA_MODES, |
1159 | | UV_MODE_INVALID, // For uv_mode in inter blocks |
1160 | | } UvPredictionMode; |
1161 | | |
1162 | | typedef enum ATTRIBUTE_PACKED { |
1163 | | SIMPLE_TRANSLATION, |
1164 | | OBMC_CAUSAL, // 2-sided OBMC |
1165 | | WARPED_CAUSAL, // 2-sided WARPED |
1166 | | MOTION_MODES |
1167 | | } MotionMode; |
1168 | | |
1169 | | typedef enum ATTRIBUTE_PACKED { II_DC_PRED, II_V_PRED, II_H_PRED, II_SMOOTH_PRED, INTERINTRA_MODES } InterIntraMode; |
1170 | | |
1171 | | typedef enum ATTRIBUTE_PACKED { |
1172 | | COMPOUND_AVERAGE, |
1173 | | COMPOUND_DISTWTD, |
1174 | | COMPOUND_WEDGE, |
1175 | | COMPOUND_DIFFWTD, |
1176 | | COMPOUND_TYPES, |
1177 | | MASKED_COMPOUND_TYPES = 2, |
1178 | | } CompoundType; |
1179 | | |
1180 | 0 | #define AOM_BLEND_A64_ROUND_BITS 6 |
1181 | 0 | #define AOM_BLEND_A64_MAX_ALPHA (1 << AOM_BLEND_A64_ROUND_BITS) // 64 |
1182 | | |
1183 | | #define AOM_BLEND_A64(a, v0, v1) \ |
1184 | 0 | ROUND_POWER_OF_TWO((a) * (v0) + (AOM_BLEND_A64_MAX_ALPHA - (a)) * (v1), AOM_BLEND_A64_ROUND_BITS) |
1185 | 0 | #define DIFF_FACTOR_LOG2 4 |
1186 | 0 | #define DIFF_FACTOR (1 << DIFF_FACTOR_LOG2) |
1187 | 0 | #define AOM_BLEND_AVG(v0, v1) ROUND_POWER_OF_TWO((v0) + (v1), 1) |
1188 | | typedef uint16_t CONV_BUF_TYPE; |
1189 | | #define MAX_WEDGE_TYPES (1 << 4) |
1190 | 1.28k | #define MAX_WEDGE_SIZE_LOG2 5 // 32x32 |
1191 | 1.28k | #define MAX_WEDGE_SIZE (1 << MAX_WEDGE_SIZE_LOG2) |
1192 | | #define MAX_WEDGE_SQUARE (MAX_WEDGE_SIZE * MAX_WEDGE_SIZE) |
1193 | 12.2k | #define WEDGE_WEIGHT_BITS 6 |
1194 | 1.28k | #define MASK_PRIMARY_SIZE ((MAX_WEDGE_SIZE) << 1) |
1195 | 577 | #define MASK_PRIMARY_STRIDE (MASK_PRIMARY_SIZE) |
1196 | | |
1197 | | enum { |
1198 | | MD_COMP_AVG, |
1199 | | MD_COMP_DIST, |
1200 | | MD_COMP_DIFF0, |
1201 | | MD_COMP_WEDGE, |
1202 | | MD_COMP_TYPES, |
1203 | | } UENUM1BYTE(MD_COMP_TYPE); |
1204 | | |
1205 | | #define COMPOUND_TYPE CompoundType |
1206 | 0 | #define MAX_DIFFWTD_MASK_BITS 1 |
1207 | | |
1208 | | enum { |
1209 | | DIFFWTD_38 = 0, |
1210 | | DIFFWTD_38_INV, |
1211 | | DIFFWTD_MASK_TYPES, |
1212 | | } UENUM1BYTE(DIFFWTD_MASK_TYPE); |
1213 | | |
1214 | | typedef struct { |
1215 | | /*!< Specifies how the two predictions should be blended together. */ |
1216 | | CompoundType type; |
1217 | | |
1218 | | /*!< Used to derive the direction and offset of the wedge mask used during blending. */ |
1219 | | uint8_t wedge_index; |
1220 | | |
1221 | | /*!< Specifies the sign of the wedge blend. */ |
1222 | | uint8_t wedge_sign; |
1223 | | |
1224 | | /*!< Specifies the type of mask to be used during blending. */ |
1225 | | DIFFWTD_MASK_TYPE mask_type; |
1226 | | } InterInterCompoundData; |
1227 | | |
1228 | | typedef enum ATTRIBUTE_PACKED { |
1229 | | FILTER_DC_PRED, |
1230 | | FILTER_V_PRED, |
1231 | | FILTER_H_PRED, |
1232 | | FILTER_D157_PRED, |
1233 | | FILTER_PAETH_PRED, |
1234 | | FILTER_INTRA_MODES, |
1235 | | } FilterIntraMode; |
1236 | | |
1237 | | static const PredictionMode fimode_to_intramode[FILTER_INTRA_MODES] = {DC_PRED, V_PRED, H_PRED, D157_PRED, PAETH_PRED}; |
1238 | 4.26k | #define DIRECTIONAL_MODES 8 |
1239 | 0 | #define MAX_ANGLE_DELTA 3 |
1240 | 0 | #define ANGLE_STEP 3 |
1241 | | |
1242 | | #define INTER_MODES (1 + NEWMV - NEARESTMV) |
1243 | | |
1244 | 0 | #define INTER_COMPOUND_MODES (1 + NEW_NEWMV - NEAREST_NEARESTMV) |
1245 | | |
1246 | 3.79k | #define SKIP_CONTEXTS 3 |
1247 | | #define SKIP_MODE_CONTEXTS 3 |
1248 | | |
1249 | 0 | #define COMP_INDEX_CONTEXTS 6 |
1250 | 0 | #define COMP_GROUP_IDX_CONTEXTS 6 |
1251 | | |
1252 | 0 | #define NEWMV_MODE_CONTEXTS 6 |
1253 | 0 | #define GLOBALMV_MODE_CONTEXTS 2 |
1254 | 0 | #define REFMV_MODE_CONTEXTS 6 |
1255 | 0 | #define DRL_MODE_CONTEXTS 3 |
1256 | | |
1257 | 0 | #define GLOBALMV_OFFSET 3 |
1258 | 0 | #define REFMV_OFFSET 4 |
1259 | | |
1260 | 0 | #define NEWMV_CTX_MASK ((1 << GLOBALMV_OFFSET) - 1) |
1261 | 0 | #define GLOBALMV_CTX_MASK ((1 << (REFMV_OFFSET - GLOBALMV_OFFSET)) - 1) |
1262 | 0 | #define REFMV_CTX_MASK ((1 << (8 - REFMV_OFFSET)) - 1) |
1263 | | |
1264 | | #define COMP_NEWMV_CTXS 5 |
1265 | 0 | #define INTER_MODE_CONTEXTS 8 |
1266 | | |
1267 | 0 | #define DELTA_Q_SMALL 3 |
1268 | 0 | #define DELTA_Q_PROBS (DELTA_Q_SMALL) |
1269 | 948 | #define DEFAULT_DELTA_Q_RES 1 |
1270 | | #define DELTA_LF_SMALL 3 |
1271 | | #define DELTA_LF_PROBS (DELTA_LF_SMALL) |
1272 | | |
1273 | | /* Segment Feature Masks */ |
1274 | 0 | #define MAX_MV_REF_CANDIDATES 2 |
1275 | | |
1276 | 0 | #define MAX_REF_MV_STACK_SIZE 8 |
1277 | 0 | #define REF_CAT_LEVEL 640 |
1278 | | |
1279 | 0 | #define INTRA_INTER_CONTEXTS 4 |
1280 | 0 | #define COMP_INTER_CONTEXTS 5 |
1281 | 0 | #define REF_CONTEXTS 3 |
1282 | | |
1283 | 0 | #define COMP_REF_TYPE_CONTEXTS 5 |
1284 | 0 | #define UNI_COMP_REF_CONTEXTS 3 |
1285 | | |
1286 | 10.4k | #define TXFM_PARTITION_CONTEXTS ((TX_SIZES - TX_8X8) * 6 - 3) |
1287 | | typedef uint8_t TXFM_CONTEXT; |
1288 | | |
1289 | | // frame types |
1290 | | enum { |
1291 | | NONE_FRAME = -1, |
1292 | | INTRA_FRAME, |
1293 | | LAST_FRAME, |
1294 | | LAST2_FRAME, |
1295 | | LAST3_FRAME, |
1296 | | GOLDEN_FRAME, |
1297 | | BWDREF_FRAME, |
1298 | | ALTREF2_FRAME, |
1299 | | ALTREF_FRAME, |
1300 | | REF_FRAMES, |
1301 | | |
1302 | | // Extra/scratch reference frame. It may be: |
1303 | | // - used to update the ALTREF2_FRAME ref (see lshift_bwd_ref_frames()), or |
1304 | | // - updated from ALTREF2_FRAME ref (see rshift_bwd_ref_frames()). |
1305 | | EXTREF_FRAME = REF_FRAMES, |
1306 | | |
1307 | | // Number of inter (non-intra) reference types. |
1308 | | INTER_REFS_PER_FRAME = ALTREF_FRAME - LAST_FRAME + 1, |
1309 | | |
1310 | | TOTAL_REFS_PER_FRAME = ALTREF_FRAME - INTRA_FRAME + 1, |
1311 | | |
1312 | | // Number of forward (aka past) reference types. |
1313 | | FWD_REFS = GOLDEN_FRAME - LAST_FRAME + 1, |
1314 | | |
1315 | | // Number of backward (aka future) reference types. |
1316 | | BWD_REFS = ALTREF_FRAME - BWDREF_FRAME + 1, |
1317 | | |
1318 | | SINGLE_REFS = FWD_REFS + BWD_REFS, |
1319 | | }; |
1320 | | |
1321 | 0 | #define REF_FRAMES_LOG2 3 |
1322 | | #define REFS_PER_FRAME 7 |
1323 | | |
1324 | 0 | #define LAST_BWD_FRAME 8 |
1325 | | |
1326 | 0 | #define FWD_RF_OFFSET(ref) (ref - LAST_FRAME) |
1327 | 0 | #define BWD_RF_OFFSET(ref) (ref - BWDREF_FRAME) |
1328 | | |
1329 | | typedef enum ATTRIBUTE_PACKED { |
1330 | | LAST_LAST2_FRAMES, // { LAST_FRAME, LAST2_FRAME } |
1331 | | LAST_LAST3_FRAMES, // { LAST_FRAME, LAST3_FRAME } |
1332 | | LAST_GOLDEN_FRAMES, // { LAST_FRAME, GOLDEN_FRAME } |
1333 | | BWDREF_ALTREF_FRAMES, // { BWDREF_FRAME, ALTREF_FRAME } |
1334 | | LAST2_LAST3_FRAMES, // { LAST2_FRAME, LAST3_FRAME } |
1335 | | LAST2_GOLDEN_FRAMES, // { LAST2_FRAME, GOLDEN_FRAME } |
1336 | | LAST3_GOLDEN_FRAMES, // { LAST3_FRAME, GOLDEN_FRAME } |
1337 | | BWDREF_ALTREF2_FRAMES, // { BWDREF_FRAME, ALTREF2_FRAME } |
1338 | | ALTREF2_ALTREF_FRAMES, // { ALTREF2_FRAME, ALTREF_FRAME } |
1339 | | TOTAL_UNIDIR_COMP_REFS, |
1340 | | // NOTE: UNIDIR_COMP_REFS is the number of uni-directional reference pairs |
1341 | | // that are explicitly signaled. |
1342 | | UNIDIR_COMP_REFS = BWDREF_ALTREF_FRAMES + 1, |
1343 | | } UniDirCompRef; |
1344 | | |
1345 | 247k | #define TOTAL_COMP_REFS (FWD_REFS * BWD_REFS + TOTAL_UNIDIR_COMP_REFS) |
1346 | | |
1347 | | #define COMP_REFS (FWD_REFS * BWD_REFS + UNIDIR_COMP_REFS) |
1348 | | |
1349 | | // NOTE: A limited number of unidirectional reference pairs can be signalled for |
1350 | | // compound prediction. The use of skip mode, on the other hand, makes it |
1351 | | // possible to have a reference pair not listed for explicit signaling. |
1352 | 247k | #define MODE_CTX_REF_FRAMES (TOTAL_REFS_PER_FRAME + TOTAL_COMP_REFS) |
1353 | | |
1354 | | typedef enum ATTRIBUTE_PACKED { |
1355 | | RESTORE_NONE, |
1356 | | RESTORE_WIENER, |
1357 | | RESTORE_SGRPROJ, |
1358 | | RESTORE_SWITCHABLE, |
1359 | | RESTORE_SWITCHABLE_TYPES = RESTORE_SWITCHABLE, |
1360 | | RESTORE_TYPES = 4, |
1361 | | } RestorationType; |
1362 | | |
1363 | 9.00k | #define SCALE_NUMERATOR 8 |
1364 | 0 | #define SUPERRES_SCALE_BITS 3 |
1365 | 0 | #define SUPERRES_SCALE_DENOMINATOR_MIN (SCALE_NUMERATOR + 1) |
1366 | 56.8k | #define NUM_SR_SCALES 8 // number of super-res scales |
1367 | 563k | #define NUM_RESIZE_SCALES 9 // number of resize scales, index 0~8 means 8/8~8/16 and index 9 means 3/4 for dynamic mode |
1368 | 0 | #define SCALE_DENOMINATOR_MAX 16 // maximum scaling denominator is 16 |
1369 | 0 | #define SCALE_THREE_QUATER 17 // 3/4 of resize dynamic mode is defined as 17 |
1370 | | |
1371 | | //**********************************************************************************************************************// |
1372 | | // onyxc_int.h |
1373 | 16.1k | #define CDEF_MAX_STRENGTHS 16 |
1374 | | |
1375 | 0 | #define UNDISP_QUEUE_SIZE (REF_FRAMES * 10) |
1376 | | |
1377 | | /* Constant values while waiting for the sequence header */ |
1378 | 5.21k | #define FRAME_ID_LENGTH 15 |
1379 | 5.21k | #define DELTA_FRAME_ID_LENGTH 14 |
1380 | | |
1381 | 0 | #define PRIMARY_REF_BITS 3 |
1382 | 6.88k | #define PRIMARY_REF_NONE 7 |
1383 | | |
1384 | 15.6k | #define MAX_NUM_TEMPORAL_LAYERS 8 |
1385 | 15.6k | #define MAX_NUM_SPATIAL_LAYERS 4 |
1386 | 15.6k | #define MAX_NUM_OPERATING_POINTS (MAX_NUM_TEMPORAL_LAYERS * MAX_NUM_SPATIAL_LAYERS) |
1387 | | |
1388 | | /* clang-format off */ |
1389 | 0 | static INLINE int32_t is_valid_seq_level_idx(uint8_t seq_level_idx) { |
1390 | 0 | return seq_level_idx == 31 || |
1391 | 0 | (seq_level_idx < 24 && |
1392 | | // The following levels are currently undefined. |
1393 | 0 | seq_level_idx != 2 && seq_level_idx != 3 && |
1394 | 0 | seq_level_idx != 6 && seq_level_idx != 7 && |
1395 | 0 | seq_level_idx != 10 && seq_level_idx != 11 && |
1396 | 0 | seq_level_idx != 20 && seq_level_idx != 21 && |
1397 | 0 | seq_level_idx != 22 && seq_level_idx != 23); |
1398 | 0 | } Unexecuted instantiation: enc_handle.c:is_valid_seq_level_idx Unexecuted instantiation: enc_settings.c:is_valid_seq_level_idx Unexecuted instantiation: metadata_handle.c:is_valid_seq_level_idx Unexecuted instantiation: aom_dsp_rtcd.c:is_valid_seq_level_idx Unexecuted instantiation: av1me.c:is_valid_seq_level_idx Unexecuted instantiation: bitstream_unit.c:is_valid_seq_level_idx Unexecuted instantiation: cdef_process.c:is_valid_seq_level_idx Unexecuted instantiation: common_dsp_rtcd.c:is_valid_seq_level_idx Unexecuted instantiation: common_utils.c:is_valid_seq_level_idx Unexecuted instantiation: corner_match.c:is_valid_seq_level_idx Unexecuted instantiation: deblocking_common.c:is_valid_seq_level_idx Unexecuted instantiation: dlf_process.c:is_valid_seq_level_idx Unexecuted instantiation: enc_cdef.c:is_valid_seq_level_idx Unexecuted instantiation: enc_dec_process.c:is_valid_seq_level_idx Unexecuted instantiation: enc_dec_results.c:is_valid_seq_level_idx Unexecuted instantiation: enc_dec_tasks.c:is_valid_seq_level_idx Unexecuted instantiation: enc_inter_prediction.c:is_valid_seq_level_idx Unexecuted instantiation: enc_intra_prediction.c:is_valid_seq_level_idx Unexecuted instantiation: enc_mode_config.c:is_valid_seq_level_idx Unexecuted instantiation: entropy_coding.c:is_valid_seq_level_idx Unexecuted instantiation: ec_process.c:is_valid_seq_level_idx Unexecuted instantiation: ec_results.c:is_valid_seq_level_idx Unexecuted instantiation: fft.c:is_valid_seq_level_idx Unexecuted instantiation: full_loop.c:is_valid_seq_level_idx Unexecuted instantiation: grainSynthesis.c:is_valid_seq_level_idx Unexecuted instantiation: hash.c:is_valid_seq_level_idx Unexecuted instantiation: initial_rc_process.c:is_valid_seq_level_idx Unexecuted instantiation: initial_rc_results.c:is_valid_seq_level_idx Unexecuted instantiation: inter_prediction.c:is_valid_seq_level_idx Unexecuted instantiation: intra_prediction.c:is_valid_seq_level_idx Unexecuted instantiation: inv_transforms.c:is_valid_seq_level_idx Unexecuted instantiation: md_rate_estimation.c:is_valid_seq_level_idx Unexecuted instantiation: me_sad_calculation.c:is_valid_seq_level_idx Unexecuted instantiation: mode_decision.c:is_valid_seq_level_idx Unexecuted instantiation: md_config_process.c:is_valid_seq_level_idx Unexecuted instantiation: md_process.c:is_valid_seq_level_idx Unexecuted instantiation: motion_estimation.c:is_valid_seq_level_idx Unexecuted instantiation: me_process.c:is_valid_seq_level_idx Unexecuted instantiation: me_results.c:is_valid_seq_level_idx Unexecuted instantiation: neighbor_arrays.c:is_valid_seq_level_idx Unexecuted instantiation: noise_model.c:is_valid_seq_level_idx Unexecuted instantiation: noise_util.c:is_valid_seq_level_idx Unexecuted instantiation: packetization_process.c:is_valid_seq_level_idx Unexecuted instantiation: packetization_reorder_queue.c:is_valid_seq_level_idx Unexecuted instantiation: pic_analysis_process.c:is_valid_seq_level_idx Unexecuted instantiation: pic_analysis_results.c:is_valid_seq_level_idx Unexecuted instantiation: pic_buffer_desc.c:is_valid_seq_level_idx Unexecuted instantiation: pcs.c:is_valid_seq_level_idx Unexecuted instantiation: pd_process.c:is_valid_seq_level_idx Unexecuted instantiation: pd_reorder_queue.c:is_valid_seq_level_idx Unexecuted instantiation: pd_results.c:is_valid_seq_level_idx Unexecuted instantiation: pic_demux_results.c:is_valid_seq_level_idx Unexecuted instantiation: pic_manager_process.c:is_valid_seq_level_idx Unexecuted instantiation: pic_manager_queue.c:is_valid_seq_level_idx Unexecuted instantiation: pic_operators.c:is_valid_seq_level_idx Unexecuted instantiation: pred_structure.c:is_valid_seq_level_idx Unexecuted instantiation: product_coding_loop.c:is_valid_seq_level_idx Unexecuted instantiation: ac_bias.c:is_valid_seq_level_idx Unexecuted instantiation: rc_aq.c:is_valid_seq_level_idx Unexecuted instantiation: rc_process.c:is_valid_seq_level_idx Unexecuted instantiation: rc_results.c:is_valid_seq_level_idx Unexecuted instantiation: rc_rtc_cbr.c:is_valid_seq_level_idx Unexecuted instantiation: rc_tasks.c:is_valid_seq_level_idx Unexecuted instantiation: rc_vbr_cbr.c:is_valid_seq_level_idx Unexecuted instantiation: rd_cost.c:is_valid_seq_level_idx Unexecuted instantiation: reference_object.c:is_valid_seq_level_idx Unexecuted instantiation: resource_coordination_process.c:is_valid_seq_level_idx Unexecuted instantiation: resource_coordination_results.c:is_valid_seq_level_idx Unexecuted instantiation: rest_process.c:is_valid_seq_level_idx Unexecuted instantiation: restoration_pick.c:is_valid_seq_level_idx Unexecuted instantiation: segmentation_params.c:is_valid_seq_level_idx Unexecuted instantiation: sequence_control_set.c:is_valid_seq_level_idx Unexecuted instantiation: src_ops_process.c:is_valid_seq_level_idx Unexecuted instantiation: super_res.c:is_valid_seq_level_idx Unexecuted instantiation: svt_log.c:is_valid_seq_level_idx Unexecuted instantiation: svt_malloc.c:is_valid_seq_level_idx Unexecuted instantiation: svt_psnr.c:is_valid_seq_level_idx Unexecuted instantiation: svt_threads.c:is_valid_seq_level_idx Unexecuted instantiation: sys_resource_manager.c:is_valid_seq_level_idx Unexecuted instantiation: kernel_dispatch.c:is_valid_seq_level_idx Unexecuted instantiation: temporal_filtering.c:is_valid_seq_level_idx Unexecuted instantiation: transforms.c:is_valid_seq_level_idx Unexecuted instantiation: utility.c:is_valid_seq_level_idx Unexecuted instantiation: vector.c:is_valid_seq_level_idx Unexecuted instantiation: warped_motion.c:is_valid_seq_level_idx Unexecuted instantiation: blend_a64_mask_c.c:is_valid_seq_level_idx Unexecuted instantiation: cfl_c.c:is_valid_seq_level_idx Unexecuted instantiation: compute_sad_c.c:is_valid_seq_level_idx Unexecuted instantiation: encode_txb_ref_c.c:is_valid_seq_level_idx Unexecuted instantiation: filterintra_c.c:is_valid_seq_level_idx Unexecuted instantiation: inter_prediction_c.c:is_valid_seq_level_idx Unexecuted instantiation: intra_prediction_c.c:is_valid_seq_level_idx Unexecuted instantiation: pack_unpack_c.c:is_valid_seq_level_idx Unexecuted instantiation: picture_operators_c.c:is_valid_seq_level_idx Unexecuted instantiation: sad_av1.c:is_valid_seq_level_idx Unexecuted instantiation: adaptive_mv_pred.c:is_valid_seq_level_idx Unexecuted instantiation: blend_a64_mask.c:is_valid_seq_level_idx Unexecuted instantiation: block_structures.c:is_valid_seq_level_idx Unexecuted instantiation: cabac_context_model.c:is_valid_seq_level_idx Unexecuted instantiation: coding_loop.c:is_valid_seq_level_idx Unexecuted instantiation: coding_unit.c:is_valid_seq_level_idx Unexecuted instantiation: coefficients.c:is_valid_seq_level_idx Unexecuted instantiation: deblocking_filter.c:is_valid_seq_level_idx Unexecuted instantiation: enc_dec_segments.c:is_valid_seq_level_idx Unexecuted instantiation: encode_context.c:is_valid_seq_level_idx Unexecuted instantiation: global_me.c:is_valid_seq_level_idx Unexecuted instantiation: global_me_cost.c:is_valid_seq_level_idx Unexecuted instantiation: me_context.c:is_valid_seq_level_idx Unexecuted instantiation: pd_queue.c:is_valid_seq_level_idx Unexecuted instantiation: rc_crf_cqp.c:is_valid_seq_level_idx Unexecuted instantiation: corner_detect.c:is_valid_seq_level_idx Unexecuted instantiation: ransac.c:is_valid_seq_level_idx Unexecuted instantiation: enc_warped_motion.c:is_valid_seq_level_idx |
1399 | | |
1400 | | /* clang-format on */ |
1401 | | |
1402 | | typedef enum { |
1403 | | SINGLE_REFERENCE = 0, |
1404 | | COMPOUND_REFERENCE = 1, |
1405 | | REFERENCE_MODE_SELECT = 2, |
1406 | | REFERENCE_MODES = 3, |
1407 | | } ReferenceMode; |
1408 | | |
1409 | | typedef enum RefreshFrameContextMode { |
1410 | | /** |
1411 | | * Frame context updates are disabled |
1412 | | */ |
1413 | | REFRESH_FRAME_CONTEXT_DISABLED, |
1414 | | /** |
1415 | | * Update frame context to values resulting from backward probability |
1416 | | * updates based on entropy/counts in the decoded frame |
1417 | | */ |
1418 | | REFRESH_FRAME_CONTEXT_BACKWARD, |
1419 | | } RefreshFrameContextMode; |
1420 | | |
1421 | | //**********************************************************************************************************************// |
1422 | | // aom_codec.h |
1423 | | /*!\brief Algorithm return codes */ |
1424 | | typedef enum AomCodecErr { |
1425 | | /*!\brief Operation completed without error */ |
1426 | | SVT_AOM_CODEC_OK, |
1427 | | /*!\brief Unspecified error */ |
1428 | | SVT_AOM_CODEC_ERROR, |
1429 | | /*!\brief Memory operation failed */ |
1430 | | SVT_AOM_CODEC_MEM_ERROR, |
1431 | | /*!\brief ABI version mismatch */ |
1432 | | SVT_AOM_CODEC_ABI_MISMATCH, |
1433 | | /*!\brief Algorithm does not have required capability */ |
1434 | | SVT_AOM_CODEC_INCAPABLE, |
1435 | | /*!\brief The given Bitstream is not supported. |
1436 | | * |
1437 | | * The Bitstream was unable to be parsed at the highest level. The decoder |
1438 | | * is unable to proceed. This error \ref SHOULD be treated as fatal to the |
1439 | | * stream. */ |
1440 | | SVT_AOM_CODEC_UNSUP_BITSTREAM, |
1441 | | /*!\brief Encoded Bitstream uses an unsupported feature |
1442 | | * |
1443 | | * The decoder does not implement a feature required by the encoder. This |
1444 | | * return code should only be used for features that prevent future |
1445 | | * pictures from being properly decoded. This error \ref MAY be treated as |
1446 | | * fatal to the stream or \ref MAY be treated as fatal to the current GOP. |
1447 | | */ |
1448 | | SVT_AOM_CODEC_UNSUP_FEATURE, |
1449 | | /*!\brief The coded data for this stream is corrupt or incomplete |
1450 | | * |
1451 | | * There was a problem decoding the current frame. This return code |
1452 | | * should only be used for failures that prevent future pictures from |
1453 | | * being properly decoded. This error \ref MAY be treated as fatal to the |
1454 | | * stream or \ref MAY be treated as fatal to the current GOP. If decoding |
1455 | | * is continued for the current GOP, artifacts may be present. |
1456 | | */ |
1457 | | SVT_AOM_CODEC_CORRUPT_FRAME, |
1458 | | /*!\brief An application-supplied parameter is not valid. |
1459 | | * |
1460 | | */ |
1461 | | SVT_AOM_CODEC_INVALID_PARAM, |
1462 | | /*!\brief An iterator reached the end of list. |
1463 | | * |
1464 | | */ |
1465 | | SVT_AOM_CODEC_LIST_END |
1466 | | } AomCodecErr; |
1467 | | |
1468 | | // above and left partition |
1469 | | typedef struct PartitionContext { |
1470 | | PartitionContextType above; |
1471 | | PartitionContextType left; |
1472 | | } PartitionContext; |
1473 | | |
1474 | | // Generates 5 bit field in which each bit set to 1 represents |
1475 | | // a BlockSize partition 11111 means we split 128x128, 64x64, 32x32, 16x16 |
1476 | | // and 8x8. 10000 means we just split the 128x128 to 64x64 |
1477 | | /* clang-format off */ |
1478 | | static const struct |
1479 | | { |
1480 | | PartitionContextType above; |
1481 | | PartitionContextType left; |
1482 | | } partition_context_lookup[BLOCK_SIZES_ALL] = { |
1483 | | { 31, 31 }, // 4X4 - {0b11111, 0b11111} |
1484 | | { 31, 30 }, // 4X8 - {0b11111, 0b11110} |
1485 | | { 30, 31 }, // 8X4 - {0b11110, 0b11111} |
1486 | | { 30, 30 }, // 8X8 - {0b11110, 0b11110} |
1487 | | { 30, 28 }, // 8X16 - {0b11110, 0b11100} |
1488 | | { 28, 30 }, // 16X8 - {0b11100, 0b11110} |
1489 | | { 28, 28 }, // 16X16 - {0b11100, 0b11100} |
1490 | | { 28, 24 }, // 16X32 - {0b11100, 0b11000} |
1491 | | { 24, 28 }, // 32X16 - {0b11000, 0b11100} |
1492 | | { 24, 24 }, // 32X32 - {0b11000, 0b11000} |
1493 | | { 24, 16 }, // 32X64 - {0b11000, 0b10000} |
1494 | | { 16, 24 }, // 64X32 - {0b10000, 0b11000} |
1495 | | { 16, 16 }, // 64X64 - {0b10000, 0b10000} |
1496 | | { 16, 0 }, // 64X128- {0b10000, 0b00000} |
1497 | | { 0, 16 }, // 128X64- {0b00000, 0b10000} |
1498 | | { 0, 0 }, // 128X128-{0b00000, 0b00000} |
1499 | | { 31, 28 }, // 4X16 - {0b11111, 0b11100} |
1500 | | { 28, 31 }, // 16X4 - {0b11100, 0b11111} |
1501 | | { 30, 24 }, // 8X32 - {0b11110, 0b11000} |
1502 | | { 24, 30 }, // 32X8 - {0b11000, 0b11110} |
1503 | | { 28, 16 }, // 16X64 - {0b11100, 0b10000} |
1504 | | { 16, 28 }, // 64X16 - {0b10000, 0b11100} |
1505 | | }; |
1506 | | |
1507 | | /* clang-format on */ |
1508 | | |
1509 | | typedef struct SgrParamsType { |
1510 | | int32_t r[2]; // radii |
1511 | | int32_t s[2]; // sgr parameters for r[0] and r[1], based on GenSgrprojVtable() |
1512 | | } SgrParamsType; |
1513 | | |
1514 | | //**********************************************************************************************************************// |
1515 | | // blockd.h |
1516 | | typedef enum FrameType { |
1517 | | KEY_FRAME = 0, |
1518 | | INTER_FRAME = 1, |
1519 | | INTRA_ONLY_FRAME = 2, // replaces intra-only |
1520 | | S_FRAME = 3, |
1521 | | FRAME_TYPES, |
1522 | | } FrameType; |
1523 | | |
1524 | | typedef int8_t MvReferenceFrame; |
1525 | | |
1526 | 745k | static INLINE bool is_intra_mode(PredictionMode mode) { |
1527 | 745k | return mode < INTRA_MODE_END; // && mode >= INTRA_MODE_START; // mode is always greater than INTRA_MODE_START |
1528 | 745k | } Unexecuted instantiation: enc_handle.c:is_intra_mode Unexecuted instantiation: enc_settings.c:is_intra_mode Unexecuted instantiation: metadata_handle.c:is_intra_mode Unexecuted instantiation: aom_dsp_rtcd.c:is_intra_mode Unexecuted instantiation: av1me.c:is_intra_mode Unexecuted instantiation: bitstream_unit.c:is_intra_mode Unexecuted instantiation: cdef_process.c:is_intra_mode Unexecuted instantiation: common_dsp_rtcd.c:is_intra_mode Unexecuted instantiation: common_utils.c:is_intra_mode Unexecuted instantiation: convolve.c:is_intra_mode Unexecuted instantiation: corner_match.c:is_intra_mode Unexecuted instantiation: deblocking_common.c:is_intra_mode Unexecuted instantiation: dlf_process.c:is_intra_mode Unexecuted instantiation: enc_cdef.c:is_intra_mode Unexecuted instantiation: enc_dec_process.c:is_intra_mode Unexecuted instantiation: enc_dec_results.c:is_intra_mode Unexecuted instantiation: enc_dec_tasks.c:is_intra_mode Unexecuted instantiation: enc_inter_prediction.c:is_intra_mode Unexecuted instantiation: enc_intra_prediction.c:is_intra_mode Unexecuted instantiation: enc_mode_config.c:is_intra_mode Unexecuted instantiation: entropy_coding.c:is_intra_mode Unexecuted instantiation: ec_process.c:is_intra_mode Unexecuted instantiation: ec_results.c:is_intra_mode Unexecuted instantiation: fft.c:is_intra_mode Unexecuted instantiation: full_loop.c:is_intra_mode Unexecuted instantiation: grainSynthesis.c:is_intra_mode Unexecuted instantiation: hash.c:is_intra_mode Unexecuted instantiation: hash_motion.c:is_intra_mode Unexecuted instantiation: initial_rc_process.c:is_intra_mode Unexecuted instantiation: initial_rc_results.c:is_intra_mode Unexecuted instantiation: inter_prediction.c:is_intra_mode Unexecuted instantiation: intra_prediction.c:is_intra_mode Unexecuted instantiation: inv_transforms.c:is_intra_mode Unexecuted instantiation: md_rate_estimation.c:is_intra_mode Unexecuted instantiation: me_sad_calculation.c:is_intra_mode mode_decision.c:is_intra_mode Line | Count | Source | 1526 | 492k | static INLINE bool is_intra_mode(PredictionMode mode) { | 1527 | 492k | return mode < INTRA_MODE_END; // && mode >= INTRA_MODE_START; // mode is always greater than INTRA_MODE_START | 1528 | 492k | } |
Unexecuted instantiation: md_config_process.c:is_intra_mode Unexecuted instantiation: md_process.c:is_intra_mode Unexecuted instantiation: motion_estimation.c:is_intra_mode Unexecuted instantiation: me_process.c:is_intra_mode Unexecuted instantiation: me_results.c:is_intra_mode Unexecuted instantiation: neighbor_arrays.c:is_intra_mode Unexecuted instantiation: noise_model.c:is_intra_mode Unexecuted instantiation: noise_util.c:is_intra_mode Unexecuted instantiation: packetization_process.c:is_intra_mode Unexecuted instantiation: packetization_reorder_queue.c:is_intra_mode Unexecuted instantiation: palette.c:is_intra_mode Unexecuted instantiation: pic_analysis_process.c:is_intra_mode Unexecuted instantiation: pic_analysis_results.c:is_intra_mode Unexecuted instantiation: pic_buffer_desc.c:is_intra_mode Unexecuted instantiation: pcs.c:is_intra_mode Unexecuted instantiation: pd_process.c:is_intra_mode Unexecuted instantiation: pd_reorder_queue.c:is_intra_mode Unexecuted instantiation: pd_results.c:is_intra_mode Unexecuted instantiation: pic_demux_results.c:is_intra_mode Unexecuted instantiation: pic_manager_process.c:is_intra_mode Unexecuted instantiation: pic_manager_queue.c:is_intra_mode Unexecuted instantiation: pic_operators.c:is_intra_mode Unexecuted instantiation: pred_structure.c:is_intra_mode product_coding_loop.c:is_intra_mode Line | Count | Source | 1526 | 252k | static INLINE bool is_intra_mode(PredictionMode mode) { | 1527 | 252k | return mode < INTRA_MODE_END; // && mode >= INTRA_MODE_START; // mode is always greater than INTRA_MODE_START | 1528 | 252k | } |
Unexecuted instantiation: ac_bias.c:is_intra_mode Unexecuted instantiation: rc_aq.c:is_intra_mode Unexecuted instantiation: rc_process.c:is_intra_mode Unexecuted instantiation: rc_results.c:is_intra_mode Unexecuted instantiation: rc_rtc_cbr.c:is_intra_mode Unexecuted instantiation: rc_tasks.c:is_intra_mode Unexecuted instantiation: rc_vbr_cbr.c:is_intra_mode Unexecuted instantiation: rd_cost.c:is_intra_mode Unexecuted instantiation: reference_object.c:is_intra_mode Unexecuted instantiation: resize.c:is_intra_mode Unexecuted instantiation: resource_coordination_process.c:is_intra_mode Unexecuted instantiation: resource_coordination_results.c:is_intra_mode Unexecuted instantiation: rest_process.c:is_intra_mode Unexecuted instantiation: restoration.c:is_intra_mode Unexecuted instantiation: restoration_pick.c:is_intra_mode Unexecuted instantiation: segmentation.c:is_intra_mode Unexecuted instantiation: segmentation_params.c:is_intra_mode Unexecuted instantiation: sequence_control_set.c:is_intra_mode Unexecuted instantiation: src_ops_process.c:is_intra_mode Unexecuted instantiation: super_res.c:is_intra_mode Unexecuted instantiation: svt_log.c:is_intra_mode Unexecuted instantiation: svt_malloc.c:is_intra_mode Unexecuted instantiation: svt_psnr.c:is_intra_mode Unexecuted instantiation: svt_threads.c:is_intra_mode Unexecuted instantiation: sys_resource_manager.c:is_intra_mode Unexecuted instantiation: kernel_dispatch.c:is_intra_mode Unexecuted instantiation: temporal_filtering.c:is_intra_mode Unexecuted instantiation: transforms.c:is_intra_mode Unexecuted instantiation: utility.c:is_intra_mode Unexecuted instantiation: vector.c:is_intra_mode Unexecuted instantiation: warped_motion.c:is_intra_mode Unexecuted instantiation: blend_a64_mask_c.c:is_intra_mode Unexecuted instantiation: cfl_c.c:is_intra_mode Unexecuted instantiation: compute_sad_c.c:is_intra_mode Unexecuted instantiation: encode_txb_ref_c.c:is_intra_mode Unexecuted instantiation: filterintra_c.c:is_intra_mode Unexecuted instantiation: inter_prediction_c.c:is_intra_mode Unexecuted instantiation: intra_prediction_c.c:is_intra_mode Unexecuted instantiation: pack_unpack_c.c:is_intra_mode Unexecuted instantiation: picture_operators_c.c:is_intra_mode Unexecuted instantiation: sad_av1.c:is_intra_mode Unexecuted instantiation: variance.c:is_intra_mode Unexecuted instantiation: adaptive_mv_pred.c:is_intra_mode Unexecuted instantiation: blend_a64_mask.c:is_intra_mode Unexecuted instantiation: block_structures.c:is_intra_mode Unexecuted instantiation: cabac_context_model.c:is_intra_mode Unexecuted instantiation: cdef.c:is_intra_mode Unexecuted instantiation: coding_loop.c:is_intra_mode Unexecuted instantiation: coding_unit.c:is_intra_mode Unexecuted instantiation: coefficients.c:is_intra_mode Unexecuted instantiation: deblocking_filter.c:is_intra_mode Unexecuted instantiation: enc_dec_segments.c:is_intra_mode Unexecuted instantiation: encode_context.c:is_intra_mode Unexecuted instantiation: firstpass.c:is_intra_mode Unexecuted instantiation: global_me.c:is_intra_mode Unexecuted instantiation: global_me_cost.c:is_intra_mode Unexecuted instantiation: mcomp.c:is_intra_mode Unexecuted instantiation: me_context.c:is_intra_mode Unexecuted instantiation: pass2_strategy.c:is_intra_mode Unexecuted instantiation: pd_queue.c:is_intra_mode Unexecuted instantiation: rc_crf_cqp.c:is_intra_mode Unexecuted instantiation: corner_detect.c:is_intra_mode Unexecuted instantiation: global_motion.c:is_intra_mode Unexecuted instantiation: ransac.c:is_intra_mode Unexecuted instantiation: enc_warped_motion.c:is_intra_mode |
1529 | | |
1530 | 2.47M | static INLINE bool is_inter_mode(PredictionMode mode) { |
1531 | 2.47M | return mode >= SINGLE_INTER_MODE_START && mode < COMP_INTER_MODE_END; |
1532 | 2.47M | } Unexecuted instantiation: enc_handle.c:is_inter_mode Unexecuted instantiation: enc_settings.c:is_inter_mode Unexecuted instantiation: metadata_handle.c:is_inter_mode Unexecuted instantiation: av1me.c:is_inter_mode Unexecuted instantiation: bitstream_unit.c:is_inter_mode Unexecuted instantiation: cdef_process.c:is_inter_mode Unexecuted instantiation: common_dsp_rtcd.c:is_inter_mode Unexecuted instantiation: common_utils.c:is_inter_mode Unexecuted instantiation: deblocking_common.c:is_inter_mode Unexecuted instantiation: dlf_process.c:is_inter_mode Unexecuted instantiation: enc_cdef.c:is_inter_mode Unexecuted instantiation: enc_dec_process.c:is_inter_mode Unexecuted instantiation: enc_dec_results.c:is_inter_mode Unexecuted instantiation: enc_dec_tasks.c:is_inter_mode Unexecuted instantiation: enc_inter_prediction.c:is_inter_mode Unexecuted instantiation: enc_intra_prediction.c:is_inter_mode Unexecuted instantiation: enc_mode_config.c:is_inter_mode entropy_coding.c:is_inter_mode Line | Count | Source | 1530 | 15.6k | static INLINE bool is_inter_mode(PredictionMode mode) { | 1531 | 15.6k | return mode >= SINGLE_INTER_MODE_START && mode < COMP_INTER_MODE_END; | 1532 | 15.6k | } |
Unexecuted instantiation: ec_process.c:is_inter_mode Unexecuted instantiation: ec_results.c:is_inter_mode Unexecuted instantiation: fft.c:is_inter_mode full_loop.c:is_inter_mode Line | Count | Source | 1530 | 127k | static INLINE bool is_inter_mode(PredictionMode mode) { | 1531 | 127k | return mode >= SINGLE_INTER_MODE_START && mode < COMP_INTER_MODE_END; | 1532 | 127k | } |
Unexecuted instantiation: grainSynthesis.c:is_inter_mode Unexecuted instantiation: hash.c:is_inter_mode Unexecuted instantiation: initial_rc_process.c:is_inter_mode Unexecuted instantiation: initial_rc_results.c:is_inter_mode Unexecuted instantiation: inter_prediction.c:is_inter_mode Unexecuted instantiation: intra_prediction.c:is_inter_mode Unexecuted instantiation: inv_transforms.c:is_inter_mode Unexecuted instantiation: md_rate_estimation.c:is_inter_mode Unexecuted instantiation: me_sad_calculation.c:is_inter_mode Unexecuted instantiation: mode_decision.c:is_inter_mode Unexecuted instantiation: md_config_process.c:is_inter_mode Unexecuted instantiation: md_process.c:is_inter_mode Unexecuted instantiation: motion_estimation.c:is_inter_mode Unexecuted instantiation: me_process.c:is_inter_mode Unexecuted instantiation: me_results.c:is_inter_mode Unexecuted instantiation: neighbor_arrays.c:is_inter_mode Unexecuted instantiation: noise_model.c:is_inter_mode Unexecuted instantiation: packetization_process.c:is_inter_mode Unexecuted instantiation: packetization_reorder_queue.c:is_inter_mode Unexecuted instantiation: pic_analysis_process.c:is_inter_mode Unexecuted instantiation: pic_analysis_results.c:is_inter_mode Unexecuted instantiation: pic_buffer_desc.c:is_inter_mode Unexecuted instantiation: pcs.c:is_inter_mode Unexecuted instantiation: pd_process.c:is_inter_mode Unexecuted instantiation: pd_reorder_queue.c:is_inter_mode Unexecuted instantiation: pd_results.c:is_inter_mode Unexecuted instantiation: pic_demux_results.c:is_inter_mode Unexecuted instantiation: pic_manager_process.c:is_inter_mode Unexecuted instantiation: pic_manager_queue.c:is_inter_mode Unexecuted instantiation: pic_operators.c:is_inter_mode Unexecuted instantiation: pred_structure.c:is_inter_mode product_coding_loop.c:is_inter_mode Line | Count | Source | 1530 | 2.32M | static INLINE bool is_inter_mode(PredictionMode mode) { | 1531 | 2.32M | return mode >= SINGLE_INTER_MODE_START && mode < COMP_INTER_MODE_END; | 1532 | 2.32M | } |
Unexecuted instantiation: ac_bias.c:is_inter_mode Unexecuted instantiation: rc_aq.c:is_inter_mode Unexecuted instantiation: rc_process.c:is_inter_mode Unexecuted instantiation: rc_results.c:is_inter_mode Unexecuted instantiation: rc_rtc_cbr.c:is_inter_mode Unexecuted instantiation: rc_tasks.c:is_inter_mode Unexecuted instantiation: rc_vbr_cbr.c:is_inter_mode Line | Count | Source | 1530 | 14.7k | static INLINE bool is_inter_mode(PredictionMode mode) { | 1531 | 14.7k | return mode >= SINGLE_INTER_MODE_START && mode < COMP_INTER_MODE_END; | 1532 | 14.7k | } |
Unexecuted instantiation: reference_object.c:is_inter_mode Unexecuted instantiation: resource_coordination_process.c:is_inter_mode Unexecuted instantiation: resource_coordination_results.c:is_inter_mode Unexecuted instantiation: rest_process.c:is_inter_mode Unexecuted instantiation: restoration_pick.c:is_inter_mode Unexecuted instantiation: segmentation_params.c:is_inter_mode Unexecuted instantiation: sequence_control_set.c:is_inter_mode Unexecuted instantiation: src_ops_process.c:is_inter_mode Unexecuted instantiation: super_res.c:is_inter_mode Unexecuted instantiation: svt_log.c:is_inter_mode Unexecuted instantiation: svt_malloc.c:is_inter_mode Unexecuted instantiation: svt_psnr.c:is_inter_mode Unexecuted instantiation: svt_threads.c:is_inter_mode Unexecuted instantiation: sys_resource_manager.c:is_inter_mode Unexecuted instantiation: kernel_dispatch.c:is_inter_mode Unexecuted instantiation: temporal_filtering.c:is_inter_mode Unexecuted instantiation: transforms.c:is_inter_mode Unexecuted instantiation: utility.c:is_inter_mode Unexecuted instantiation: vector.c:is_inter_mode Unexecuted instantiation: blend_a64_mask_c.c:is_inter_mode Unexecuted instantiation: cfl_c.c:is_inter_mode Unexecuted instantiation: compute_sad_c.c:is_inter_mode Unexecuted instantiation: encode_txb_ref_c.c:is_inter_mode Unexecuted instantiation: filterintra_c.c:is_inter_mode Unexecuted instantiation: inter_prediction_c.c:is_inter_mode Unexecuted instantiation: intra_prediction_c.c:is_inter_mode Unexecuted instantiation: pack_unpack_c.c:is_inter_mode Unexecuted instantiation: picture_operators_c.c:is_inter_mode Unexecuted instantiation: adaptive_mv_pred.c:is_inter_mode Unexecuted instantiation: block_structures.c:is_inter_mode Unexecuted instantiation: cabac_context_model.c:is_inter_mode Unexecuted instantiation: coding_loop.c:is_inter_mode Unexecuted instantiation: coding_unit.c:is_inter_mode Unexecuted instantiation: coefficients.c:is_inter_mode Unexecuted instantiation: deblocking_filter.c:is_inter_mode Unexecuted instantiation: enc_dec_segments.c:is_inter_mode Unexecuted instantiation: encode_context.c:is_inter_mode Unexecuted instantiation: global_me.c:is_inter_mode Unexecuted instantiation: global_me_cost.c:is_inter_mode Unexecuted instantiation: me_context.c:is_inter_mode Unexecuted instantiation: pd_queue.c:is_inter_mode Unexecuted instantiation: rc_crf_cqp.c:is_inter_mode Unexecuted instantiation: corner_detect.c:is_inter_mode Unexecuted instantiation: ransac.c:is_inter_mode Unexecuted instantiation: enc_warped_motion.c:is_inter_mode |
1533 | | |
1534 | 0 | static INLINE int32_t is_inter_compound_mode(PredictionMode mode) { |
1535 | 0 | return mode >= NEAREST_NEARESTMV && mode <= NEW_NEWMV; |
1536 | 0 | } Unexecuted instantiation: enc_handle.c:is_inter_compound_mode Unexecuted instantiation: enc_settings.c:is_inter_compound_mode Unexecuted instantiation: metadata_handle.c:is_inter_compound_mode Unexecuted instantiation: av1me.c:is_inter_compound_mode Unexecuted instantiation: bitstream_unit.c:is_inter_compound_mode Unexecuted instantiation: cdef_process.c:is_inter_compound_mode Unexecuted instantiation: common_dsp_rtcd.c:is_inter_compound_mode Unexecuted instantiation: common_utils.c:is_inter_compound_mode Unexecuted instantiation: deblocking_common.c:is_inter_compound_mode Unexecuted instantiation: dlf_process.c:is_inter_compound_mode Unexecuted instantiation: enc_cdef.c:is_inter_compound_mode Unexecuted instantiation: enc_dec_process.c:is_inter_compound_mode Unexecuted instantiation: enc_dec_results.c:is_inter_compound_mode Unexecuted instantiation: enc_dec_tasks.c:is_inter_compound_mode Unexecuted instantiation: enc_inter_prediction.c:is_inter_compound_mode Unexecuted instantiation: enc_intra_prediction.c:is_inter_compound_mode Unexecuted instantiation: enc_mode_config.c:is_inter_compound_mode Unexecuted instantiation: entropy_coding.c:is_inter_compound_mode Unexecuted instantiation: ec_process.c:is_inter_compound_mode Unexecuted instantiation: ec_results.c:is_inter_compound_mode Unexecuted instantiation: fft.c:is_inter_compound_mode Unexecuted instantiation: full_loop.c:is_inter_compound_mode Unexecuted instantiation: grainSynthesis.c:is_inter_compound_mode Unexecuted instantiation: hash.c:is_inter_compound_mode Unexecuted instantiation: initial_rc_process.c:is_inter_compound_mode Unexecuted instantiation: initial_rc_results.c:is_inter_compound_mode Unexecuted instantiation: inter_prediction.c:is_inter_compound_mode Unexecuted instantiation: intra_prediction.c:is_inter_compound_mode Unexecuted instantiation: inv_transforms.c:is_inter_compound_mode Unexecuted instantiation: md_rate_estimation.c:is_inter_compound_mode Unexecuted instantiation: me_sad_calculation.c:is_inter_compound_mode Unexecuted instantiation: mode_decision.c:is_inter_compound_mode Unexecuted instantiation: md_config_process.c:is_inter_compound_mode Unexecuted instantiation: md_process.c:is_inter_compound_mode Unexecuted instantiation: motion_estimation.c:is_inter_compound_mode Unexecuted instantiation: me_process.c:is_inter_compound_mode Unexecuted instantiation: me_results.c:is_inter_compound_mode Unexecuted instantiation: neighbor_arrays.c:is_inter_compound_mode Unexecuted instantiation: noise_model.c:is_inter_compound_mode Unexecuted instantiation: packetization_process.c:is_inter_compound_mode Unexecuted instantiation: packetization_reorder_queue.c:is_inter_compound_mode Unexecuted instantiation: pic_analysis_process.c:is_inter_compound_mode Unexecuted instantiation: pic_analysis_results.c:is_inter_compound_mode Unexecuted instantiation: pic_buffer_desc.c:is_inter_compound_mode Unexecuted instantiation: pcs.c:is_inter_compound_mode Unexecuted instantiation: pd_process.c:is_inter_compound_mode Unexecuted instantiation: pd_reorder_queue.c:is_inter_compound_mode Unexecuted instantiation: pd_results.c:is_inter_compound_mode Unexecuted instantiation: pic_demux_results.c:is_inter_compound_mode Unexecuted instantiation: pic_manager_process.c:is_inter_compound_mode Unexecuted instantiation: pic_manager_queue.c:is_inter_compound_mode Unexecuted instantiation: pic_operators.c:is_inter_compound_mode Unexecuted instantiation: pred_structure.c:is_inter_compound_mode Unexecuted instantiation: product_coding_loop.c:is_inter_compound_mode Unexecuted instantiation: ac_bias.c:is_inter_compound_mode Unexecuted instantiation: rc_aq.c:is_inter_compound_mode Unexecuted instantiation: rc_process.c:is_inter_compound_mode Unexecuted instantiation: rc_results.c:is_inter_compound_mode Unexecuted instantiation: rc_rtc_cbr.c:is_inter_compound_mode Unexecuted instantiation: rc_tasks.c:is_inter_compound_mode Unexecuted instantiation: rc_vbr_cbr.c:is_inter_compound_mode Unexecuted instantiation: rd_cost.c:is_inter_compound_mode Unexecuted instantiation: reference_object.c:is_inter_compound_mode Unexecuted instantiation: resource_coordination_process.c:is_inter_compound_mode Unexecuted instantiation: resource_coordination_results.c:is_inter_compound_mode Unexecuted instantiation: rest_process.c:is_inter_compound_mode Unexecuted instantiation: restoration_pick.c:is_inter_compound_mode Unexecuted instantiation: segmentation_params.c:is_inter_compound_mode Unexecuted instantiation: sequence_control_set.c:is_inter_compound_mode Unexecuted instantiation: src_ops_process.c:is_inter_compound_mode Unexecuted instantiation: super_res.c:is_inter_compound_mode Unexecuted instantiation: svt_log.c:is_inter_compound_mode Unexecuted instantiation: svt_malloc.c:is_inter_compound_mode Unexecuted instantiation: svt_psnr.c:is_inter_compound_mode Unexecuted instantiation: svt_threads.c:is_inter_compound_mode Unexecuted instantiation: sys_resource_manager.c:is_inter_compound_mode Unexecuted instantiation: kernel_dispatch.c:is_inter_compound_mode Unexecuted instantiation: temporal_filtering.c:is_inter_compound_mode Unexecuted instantiation: transforms.c:is_inter_compound_mode Unexecuted instantiation: utility.c:is_inter_compound_mode Unexecuted instantiation: vector.c:is_inter_compound_mode Unexecuted instantiation: blend_a64_mask_c.c:is_inter_compound_mode Unexecuted instantiation: cfl_c.c:is_inter_compound_mode Unexecuted instantiation: compute_sad_c.c:is_inter_compound_mode Unexecuted instantiation: encode_txb_ref_c.c:is_inter_compound_mode Unexecuted instantiation: filterintra_c.c:is_inter_compound_mode Unexecuted instantiation: inter_prediction_c.c:is_inter_compound_mode Unexecuted instantiation: intra_prediction_c.c:is_inter_compound_mode Unexecuted instantiation: pack_unpack_c.c:is_inter_compound_mode Unexecuted instantiation: picture_operators_c.c:is_inter_compound_mode Unexecuted instantiation: adaptive_mv_pred.c:is_inter_compound_mode Unexecuted instantiation: block_structures.c:is_inter_compound_mode Unexecuted instantiation: cabac_context_model.c:is_inter_compound_mode Unexecuted instantiation: coding_loop.c:is_inter_compound_mode Unexecuted instantiation: coding_unit.c:is_inter_compound_mode Unexecuted instantiation: coefficients.c:is_inter_compound_mode Unexecuted instantiation: deblocking_filter.c:is_inter_compound_mode Unexecuted instantiation: enc_dec_segments.c:is_inter_compound_mode Unexecuted instantiation: encode_context.c:is_inter_compound_mode Unexecuted instantiation: global_me.c:is_inter_compound_mode Unexecuted instantiation: global_me_cost.c:is_inter_compound_mode Unexecuted instantiation: me_context.c:is_inter_compound_mode Unexecuted instantiation: pd_queue.c:is_inter_compound_mode Unexecuted instantiation: rc_crf_cqp.c:is_inter_compound_mode Unexecuted instantiation: corner_detect.c:is_inter_compound_mode Unexecuted instantiation: ransac.c:is_inter_compound_mode Unexecuted instantiation: enc_warped_motion.c:is_inter_compound_mode |
1537 | | |
1538 | 0 | static INLINE int is_inter_singleref_mode(PredictionMode mode) { |
1539 | 0 | return mode >= SINGLE_INTER_MODE_START && mode < SINGLE_INTER_MODE_END; |
1540 | 0 | } Unexecuted instantiation: enc_handle.c:is_inter_singleref_mode Unexecuted instantiation: enc_settings.c:is_inter_singleref_mode Unexecuted instantiation: metadata_handle.c:is_inter_singleref_mode Unexecuted instantiation: av1me.c:is_inter_singleref_mode Unexecuted instantiation: bitstream_unit.c:is_inter_singleref_mode Unexecuted instantiation: cdef_process.c:is_inter_singleref_mode Unexecuted instantiation: common_dsp_rtcd.c:is_inter_singleref_mode Unexecuted instantiation: common_utils.c:is_inter_singleref_mode Unexecuted instantiation: deblocking_common.c:is_inter_singleref_mode Unexecuted instantiation: dlf_process.c:is_inter_singleref_mode Unexecuted instantiation: enc_cdef.c:is_inter_singleref_mode Unexecuted instantiation: enc_dec_process.c:is_inter_singleref_mode Unexecuted instantiation: enc_dec_results.c:is_inter_singleref_mode Unexecuted instantiation: enc_dec_tasks.c:is_inter_singleref_mode Unexecuted instantiation: enc_inter_prediction.c:is_inter_singleref_mode Unexecuted instantiation: enc_intra_prediction.c:is_inter_singleref_mode Unexecuted instantiation: enc_mode_config.c:is_inter_singleref_mode Unexecuted instantiation: entropy_coding.c:is_inter_singleref_mode Unexecuted instantiation: ec_process.c:is_inter_singleref_mode Unexecuted instantiation: ec_results.c:is_inter_singleref_mode Unexecuted instantiation: fft.c:is_inter_singleref_mode Unexecuted instantiation: full_loop.c:is_inter_singleref_mode Unexecuted instantiation: grainSynthesis.c:is_inter_singleref_mode Unexecuted instantiation: hash.c:is_inter_singleref_mode Unexecuted instantiation: initial_rc_process.c:is_inter_singleref_mode Unexecuted instantiation: initial_rc_results.c:is_inter_singleref_mode Unexecuted instantiation: inter_prediction.c:is_inter_singleref_mode Unexecuted instantiation: intra_prediction.c:is_inter_singleref_mode Unexecuted instantiation: inv_transforms.c:is_inter_singleref_mode Unexecuted instantiation: md_rate_estimation.c:is_inter_singleref_mode Unexecuted instantiation: me_sad_calculation.c:is_inter_singleref_mode Unexecuted instantiation: mode_decision.c:is_inter_singleref_mode Unexecuted instantiation: md_config_process.c:is_inter_singleref_mode Unexecuted instantiation: md_process.c:is_inter_singleref_mode Unexecuted instantiation: motion_estimation.c:is_inter_singleref_mode Unexecuted instantiation: me_process.c:is_inter_singleref_mode Unexecuted instantiation: me_results.c:is_inter_singleref_mode Unexecuted instantiation: neighbor_arrays.c:is_inter_singleref_mode Unexecuted instantiation: noise_model.c:is_inter_singleref_mode Unexecuted instantiation: packetization_process.c:is_inter_singleref_mode Unexecuted instantiation: packetization_reorder_queue.c:is_inter_singleref_mode Unexecuted instantiation: pic_analysis_process.c:is_inter_singleref_mode Unexecuted instantiation: pic_analysis_results.c:is_inter_singleref_mode Unexecuted instantiation: pic_buffer_desc.c:is_inter_singleref_mode Unexecuted instantiation: pcs.c:is_inter_singleref_mode Unexecuted instantiation: pd_process.c:is_inter_singleref_mode Unexecuted instantiation: pd_reorder_queue.c:is_inter_singleref_mode Unexecuted instantiation: pd_results.c:is_inter_singleref_mode Unexecuted instantiation: pic_demux_results.c:is_inter_singleref_mode Unexecuted instantiation: pic_manager_process.c:is_inter_singleref_mode Unexecuted instantiation: pic_manager_queue.c:is_inter_singleref_mode Unexecuted instantiation: pic_operators.c:is_inter_singleref_mode Unexecuted instantiation: pred_structure.c:is_inter_singleref_mode Unexecuted instantiation: product_coding_loop.c:is_inter_singleref_mode Unexecuted instantiation: ac_bias.c:is_inter_singleref_mode Unexecuted instantiation: rc_aq.c:is_inter_singleref_mode Unexecuted instantiation: rc_process.c:is_inter_singleref_mode Unexecuted instantiation: rc_results.c:is_inter_singleref_mode Unexecuted instantiation: rc_rtc_cbr.c:is_inter_singleref_mode Unexecuted instantiation: rc_tasks.c:is_inter_singleref_mode Unexecuted instantiation: rc_vbr_cbr.c:is_inter_singleref_mode Unexecuted instantiation: rd_cost.c:is_inter_singleref_mode Unexecuted instantiation: reference_object.c:is_inter_singleref_mode Unexecuted instantiation: resource_coordination_process.c:is_inter_singleref_mode Unexecuted instantiation: resource_coordination_results.c:is_inter_singleref_mode Unexecuted instantiation: rest_process.c:is_inter_singleref_mode Unexecuted instantiation: restoration_pick.c:is_inter_singleref_mode Unexecuted instantiation: segmentation_params.c:is_inter_singleref_mode Unexecuted instantiation: sequence_control_set.c:is_inter_singleref_mode Unexecuted instantiation: src_ops_process.c:is_inter_singleref_mode Unexecuted instantiation: super_res.c:is_inter_singleref_mode Unexecuted instantiation: svt_log.c:is_inter_singleref_mode Unexecuted instantiation: svt_malloc.c:is_inter_singleref_mode Unexecuted instantiation: svt_psnr.c:is_inter_singleref_mode Unexecuted instantiation: svt_threads.c:is_inter_singleref_mode Unexecuted instantiation: sys_resource_manager.c:is_inter_singleref_mode Unexecuted instantiation: kernel_dispatch.c:is_inter_singleref_mode Unexecuted instantiation: temporal_filtering.c:is_inter_singleref_mode Unexecuted instantiation: transforms.c:is_inter_singleref_mode Unexecuted instantiation: utility.c:is_inter_singleref_mode Unexecuted instantiation: vector.c:is_inter_singleref_mode Unexecuted instantiation: blend_a64_mask_c.c:is_inter_singleref_mode Unexecuted instantiation: cfl_c.c:is_inter_singleref_mode Unexecuted instantiation: compute_sad_c.c:is_inter_singleref_mode Unexecuted instantiation: encode_txb_ref_c.c:is_inter_singleref_mode Unexecuted instantiation: filterintra_c.c:is_inter_singleref_mode Unexecuted instantiation: inter_prediction_c.c:is_inter_singleref_mode Unexecuted instantiation: intra_prediction_c.c:is_inter_singleref_mode Unexecuted instantiation: pack_unpack_c.c:is_inter_singleref_mode Unexecuted instantiation: picture_operators_c.c:is_inter_singleref_mode Unexecuted instantiation: adaptive_mv_pred.c:is_inter_singleref_mode Unexecuted instantiation: block_structures.c:is_inter_singleref_mode Unexecuted instantiation: cabac_context_model.c:is_inter_singleref_mode Unexecuted instantiation: coding_loop.c:is_inter_singleref_mode Unexecuted instantiation: coding_unit.c:is_inter_singleref_mode Unexecuted instantiation: coefficients.c:is_inter_singleref_mode Unexecuted instantiation: deblocking_filter.c:is_inter_singleref_mode Unexecuted instantiation: enc_dec_segments.c:is_inter_singleref_mode Unexecuted instantiation: encode_context.c:is_inter_singleref_mode Unexecuted instantiation: global_me.c:is_inter_singleref_mode Unexecuted instantiation: global_me_cost.c:is_inter_singleref_mode Unexecuted instantiation: me_context.c:is_inter_singleref_mode Unexecuted instantiation: pd_queue.c:is_inter_singleref_mode Unexecuted instantiation: rc_crf_cqp.c:is_inter_singleref_mode Unexecuted instantiation: corner_detect.c:is_inter_singleref_mode Unexecuted instantiation: ransac.c:is_inter_singleref_mode Unexecuted instantiation: enc_warped_motion.c:is_inter_singleref_mode |
1541 | | |
1542 | | //**********************************************************************************************************************// |
1543 | | // encoder.h |
1544 | | typedef enum FrameContextIndex { |
1545 | | // regular inter frame |
1546 | | REGULAR_FRAME = 0, |
1547 | | // alternate reference frame |
1548 | | ARF_FRAME = 1, |
1549 | | // overlay frame |
1550 | | OVERLAY_FRAME = 2, |
1551 | | // golden frame |
1552 | | GLD_FRAME = 3, |
1553 | | // backward reference frame |
1554 | | BRF_FRAME = 4, |
1555 | | // extra alternate reference frame |
1556 | | EXT_ARF_FRAME = 5, |
1557 | | FRAME_CONTEXT_INDEXES |
1558 | | } FrameContextIndex; |
1559 | | |
1560 | | //**********************************************************************************************************************// |
1561 | | // common.h |
1562 | 101k | #define av1_zero(dest) memset(&(dest), 0, sizeof(dest)) |
1563 | | //**********************************************************************************************************************// |
1564 | | // alloccommon.h |
1565 | 948 | #define INVALID_IDX -1 // Invalid buffer index. |
1566 | | |
1567 | | //**********************************************************************************************************************// |
1568 | | // quant_common.h |
1569 | 121k | #define MINQ 0 |
1570 | 995k | #define MAXQ 255 |
1571 | 121k | #define QINDEX_RANGE (MAXQ - MINQ + 1) |
1572 | 474 | #define QINDEX_BITS 8 |
1573 | 7.80k | #define MIN_QP_VALUE 0 |
1574 | 1.09M | #define MAX_QP_VALUE 63 |
1575 | | // Total number of QM sets stored |
1576 | 1.66M | #define QM_LEVEL_BITS 4 |
1577 | 1.66M | #define NUM_QM_LEVELS (1 << QM_LEVEL_BITS) |
1578 | | // av1_loopfilter.h |
1579 | 54.8k | #define MAX_LOOP_FILTER 63 |
1580 | 87.6k | #define SIMD_WIDTH 16 |
1581 | | |
1582 | | typedef struct LoopFilter { |
1583 | | int32_t filter_level[2]; |
1584 | | int32_t filter_level_u; |
1585 | | int32_t filter_level_v; |
1586 | | |
1587 | | int32_t sharpness_level; |
1588 | | |
1589 | | uint8_t mode_ref_delta_enabled; |
1590 | | uint8_t mode_ref_delta_update; |
1591 | | |
1592 | | // 0 = Intra, Last, Last2+Last3, |
1593 | | // GF, BRF, ARF2, ARF |
1594 | | int8_t ref_deltas[REF_FRAMES]; |
1595 | | |
1596 | | // 0 = ZERO_MV, MV |
1597 | | int8_t mode_deltas[MAX_MODE_LF_DELTAS]; |
1598 | | int32_t combine_vert_horz_lf; |
1599 | | } LoopFilter; |
1600 | | |
1601 | 6.77k | #define MAX_SEGMENTS 8 |
1602 | | |
1603 | | // Need to align this structure so when it is declared and |
1604 | | // passed it can be loaded into vector registers. |
1605 | | typedef struct LoopFilterThresh { |
1606 | | DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, mblim[SIMD_WIDTH]); |
1607 | | DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, lim[SIMD_WIDTH]); |
1608 | | DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, hev_thr[SIMD_WIDTH]); |
1609 | | } LoopFilterThresh; |
1610 | | |
1611 | | typedef struct LoopFilterInfoN { |
1612 | | LoopFilterThresh lfthr[MAX_LOOP_FILTER + 1]; |
1613 | | uint8_t lvl[MAX_PLANES][MAX_SEGMENTS][2][REF_FRAMES][MAX_MODE_LF_DELTAS]; |
1614 | | } LoopFilterInfoN; |
1615 | | |
1616 | | #define CDEF_PRI_STRENGTHS 16 |
1617 | | #define CDEF_SEC_STRENGTHS 4 |
1618 | | // Bits of precision used for the model |
1619 | 7.58k | #define WARPEDMODEL_PREC_BITS 16 |
1620 | | // The following constants describe the various precisions |
1621 | | // of different parameters in the global motion experiment. |
1622 | | // |
1623 | | // Given the general homography: |
1624 | | // [x' (a b c [x |
1625 | | // z . y' = d e f * y |
1626 | | // 1] 0 0 1) 1] |
1627 | | // |
1628 | | // Constants using the name ALPHA here are related to parameters |
1629 | | // a, b, d, e. Constants using the name TRANS are related |
1630 | | // to parameters c and f. |
1631 | | // |
1632 | | // Anything ending in PREC_BITS is the number of bits of precision |
1633 | | // to maintain when converting from double to integer. |
1634 | | // |
1635 | | // The ABS parameters are used to create an upper and lower bound |
1636 | | // for each parameter. In other words, after a parameter is integerized |
1637 | | // it is clamped between -(1 << ABS_XXX_BITS) and (1 << ABS_XXX_BITS). |
1638 | | // |
1639 | | // XXX_PREC_DIFF and XXX_DECODE_FACTOR |
1640 | | // are computed once here to prevent repetitive |
1641 | | // computation on the decoder side. These are |
1642 | | // to allow the global motion parameters to be encoded in a lower |
1643 | | // precision than the warped model precision. This means that they |
1644 | | // need to be changed to warped precision when they are decoded. |
1645 | | // |
1646 | | // XX_MIN, XX_MAX are also computed to avoid repeated computation |
1647 | | |
1648 | 0 | #define SUBEXPFIN_K 3 |
1649 | 0 | #define GM_TRANS_PREC_BITS 6 |
1650 | 0 | #define GM_ABS_TRANS_BITS 12 |
1651 | 0 | #define GM_ABS_TRANS_ONLY_BITS (GM_ABS_TRANS_BITS - GM_TRANS_PREC_BITS + 3) |
1652 | 0 | #define GM_TRANS_PREC_DIFF (WARPEDMODEL_PREC_BITS - GM_TRANS_PREC_BITS) |
1653 | 0 | #define GM_TRANS_ONLY_PREC_DIFF (WARPEDMODEL_PREC_BITS - 3) |
1654 | 0 | #define GM_TRANS_DECODE_FACTOR (1 << GM_TRANS_PREC_DIFF) |
1655 | | |
1656 | 0 | #define GM_ALPHA_PREC_BITS 15 |
1657 | 0 | #define GM_ABS_ALPHA_BITS 12 |
1658 | 0 | #define GM_ALPHA_PREC_DIFF (WARPEDMODEL_PREC_BITS - GM_ALPHA_PREC_BITS) |
1659 | | #define GM_ALPHA_DECODE_FACTOR (1 << GM_ALPHA_PREC_DIFF) |
1660 | | |
1661 | 0 | #define GM_TRANS_MAX (1 << GM_ABS_TRANS_BITS) |
1662 | 0 | #define GM_ALPHA_MAX (1 << GM_ABS_ALPHA_BITS) |
1663 | | |
1664 | 0 | #define GM_TRANS_MIN -GM_TRANS_MAX |
1665 | | #define GM_ALPHA_MIN -GM_ALPHA_MAX |
1666 | | |
1667 | | typedef enum TransformationType { |
1668 | | IDENTITY = 0, // identity transformation, 0-parameter |
1669 | | TRANSLATION = 1, // translational motion 2-parameter |
1670 | | ROTZOOM = 2, // simplified affine with rotation + zoom only, 4-parameter |
1671 | | AFFINE = 3, // affine, 6-parameter |
1672 | | TRANS_TYPES, |
1673 | | } TransformationType; |
1674 | | |
1675 | 0 | #define MAX_PARAMDIM 6 |
1676 | | |
1677 | | // The order of values in the wmmat matrix below is best described |
1678 | | // by the affine transformation: |
1679 | | // [x' (m2 m3 m0 [x |
1680 | | // z . y' = m4 m5 m1 * y |
1681 | | // 1] 0 0 1) 1] |
1682 | | typedef struct WarpedMotionParams { |
1683 | | TransformationType wmtype; |
1684 | | int32_t wmmat[MAX_PARAMDIM]; |
1685 | | int16_t alpha, beta, gamma, delta; |
1686 | | int8_t invalid; |
1687 | | } WarpedMotionParams; |
1688 | | |
1689 | | /*! Scale factors and scaling function pointers when reference and current frame dimensions are not equal */ |
1690 | | typedef struct ScaleFactors { |
1691 | | int32_t x_scale_fp; // horizontal fixed point scale factor |
1692 | | int32_t y_scale_fp; // vertical fixed point scale factor |
1693 | | int32_t x_step_q4; |
1694 | | int32_t y_step_q4; |
1695 | | |
1696 | | int32_t (*scale_value_x)(int32_t val, const struct ScaleFactors* sf); |
1697 | | int32_t (*scale_value_y)(int32_t val, const struct ScaleFactors* sf); |
1698 | | } ScaleFactors; |
1699 | | |
1700 | | /* clang-format off */ |
1701 | | static const WarpedMotionParams default_warp_params = { |
1702 | | IDENTITY, |
1703 | | {0, 0, (1 << WARPEDMODEL_PREC_BITS), 0, 0, (1 << WARPEDMODEL_PREC_BITS)}, |
1704 | | 0, 0, 0, 0, |
1705 | | 0, |
1706 | | }; |
1707 | | |
1708 | | /*********************************** AV1_OBU ********************************/ |
1709 | | |
1710 | | //**********************************************************************************************************************// |
1711 | | //**********************************************************************************************************************// |
1712 | | |
1713 | | // ***************************** Definitions ***************************** |
1714 | | |
1715 | 0 | #define SC_FRAMES_TO_IGNORE 1000 // The speed control algorith starts after SC_FRAMES_TO_IGNORE number frames. |
1716 | 0 | #define SC_FRAMES_INTERVAL_SPEED 60 // The speed control Interval To Check the speed |
1717 | 0 | #define SC_FRAMES_INTERVAL_T1 60 // The speed control Interval Threshold1 |
1718 | 0 | #define SC_FRAMES_INTERVAL_T2 180 // The speed control Interval Threshold2 |
1719 | | #define SC_FRAMES_INTERVAL_T3 120 // The speed control Interval Threshold3 |
1720 | | |
1721 | | /** Redefine ASSERT() to avoid warnings |
1722 | | */ |
1723 | | #if defined _DEBUG || _DEBUG_ |
1724 | | #define ASSERT assert |
1725 | | #elif defined _DEBUG |
1726 | | #define ASSERT assert |
1727 | | #else |
1728 | 101k | #define ASSERT(exp) ((void)sizeof(exp)) |
1729 | | #endif |
1730 | | |
1731 | 0 | #define ME_FILTER_TAP 4 |
1732 | 948 | #define SUB_SAD_SEARCH 0 |
1733 | 0 | #define FULL_SAD_SEARCH 1 |
1734 | | /************************ INPUT CLASS **************************/ |
1735 | | typedef enum ResolutionRange { |
1736 | | INPUT_SIZE_240p_RANGE = 0, |
1737 | | INPUT_SIZE_360p_RANGE = 1, |
1738 | | INPUT_SIZE_480p_RANGE = 2, |
1739 | | INPUT_SIZE_720p_RANGE = 3, |
1740 | | INPUT_SIZE_1080p_RANGE = 4, |
1741 | | INPUT_SIZE_4K_RANGE = 5, |
1742 | | INPUT_SIZE_8K_RANGE = 6, |
1743 | | INPUT_SIZE_COUNT = 7 |
1744 | | } ResolutionRange; |
1745 | | |
1746 | 2.84k | #define INPUT_SIZE_240p_TH 0x28500 // 0.165 Million |
1747 | 0 | #define INPUT_SIZE_360p_TH 0x4CE00 // 0.315 Million |
1748 | 0 | #define INPUT_SIZE_480p_TH 0xA1400 // 0.661 Million |
1749 | 0 | #define INPUT_SIZE_720p_TH 0x16DA00 // 1.5 Million |
1750 | 0 | #define INPUT_SIZE_1080p_TH 0x535200 // 5.46 Million |
1751 | 1.42k | #define INPUT_SIZE_4K_TH 0x140A000 // 21 Million |
1752 | | #define INPUT_SIZE_8K_TH 0X5028000 // 84 Million |
1753 | | |
1754 | | // There must absolutely be no reason to use more than 2x of original bytes, assuming 4:2:0 |
1755 | 474 | #define BITSTREAM_BUFFER_SIZE(pixels) ((pixels) * 3 / 2 * 2) |
1756 | | |
1757 | | /** The EbPtr type is intended to be used to pass pointers to and from the eBrisk |
1758 | | API. This is a 32 bit pointer and is aligned on a 32 bit word boundary. |
1759 | | */ |
1760 | | typedef void *EbPtr; |
1761 | | |
1762 | | /** The EbString type is intended to be used to pass "C" type strings to and |
1763 | | from the eBrisk API. The EbString type is a 32 bit pointer to a zero terminated |
1764 | | string. The pointer is word aligned and the string is byte aligned. |
1765 | | */ |
1766 | | typedef char * EbString; |
1767 | | |
1768 | | /** The EbByte type is intended to be used to pass arrays of bytes such as |
1769 | | buffers to and from the eBrisk API. The EbByte type is a 32 bit pointer. |
1770 | | The pointer is word aligned and the buffer is byte aligned. |
1771 | | */ |
1772 | | typedef uint8_t * EbByte; |
1773 | | |
1774 | | /** The EB_SAMPLE type is intended to be used to pass arrays of bytes such as |
1775 | | buffers to and from the eBrisk API. The EbByte type is a 32 bit pointer. |
1776 | | The pointer is word aligned and the buffer is byte aligned. |
1777 | | */ |
1778 | | |
1779 | | /** The MD_BIT_DEPTH_MODE type is used to describe the bitdepth of MD path. |
1780 | | */ |
1781 | | |
1782 | | typedef enum MD_BIT_DEPTH_MODE |
1783 | | { |
1784 | | EB_8_BIT_MD = 0, // 8bit mode decision |
1785 | | EB_10_BIT_MD = 1, // 10bit mode decision |
1786 | | EB_DUAL_BIT_MD = 2 // Auto: 8bit & 10bit mode decision |
1787 | | } MD_BIT_DEPTH_MODE; |
1788 | | |
1789 | | typedef enum Tune { |
1790 | | TUNE_VQ = 0, // Visual Quality (video) |
1791 | | TUNE_PSNR = 1, // Average of (PSNR, SSIM, VMAF) |
1792 | | TUNE_SSIM = 2, // SSIM-optimized |
1793 | | TUNE_IQ = 3, // Image Quality |
1794 | | #if FTR_TUNE_VMAF |
1795 | | TUNE_MS_SSIM = 4, // MS_SSIM and SSIMULACRA2 optimized |
1796 | | TUNE_VMAF = 5 // VMAF preprocessing (unsharp filter on luma) |
1797 | | #else |
1798 | | TUNE_MS_SSIM = 4 // MS_SSIM and SSIMULACRA2 optimized |
1799 | | |
1800 | | #endif |
1801 | | } Tune; |
1802 | | |
1803 | | /* |
1804 | | * The SliceType type is used to describe the slice prediction type. |
1805 | | */ |
1806 | | typedef enum ATTRIBUTE_PACKED { |
1807 | | B_SLICE = 0, // Inter frame |
1808 | | I_SLICE = 1, // Intra only frame |
1809 | | INVALID_SLICE = 0xFF |
1810 | | } SliceType; |
1811 | | |
1812 | 474 | #define SPEED_CONTROL_INIT_MOD ENC_M5; |
1813 | | typedef enum ATTRIBUTE_PACKED { |
1814 | | REF_LIST_0 = 0, |
1815 | | REF_LIST_1 = 1, |
1816 | | TOTAL_NUM_OF_REF_LISTS = 2, |
1817 | | INVALID_LIST = 0xFF |
1818 | | } RefList; |
1819 | | |
1820 | | typedef enum ATTRIBUTE_PACKED { |
1821 | | UNI_PRED_LIST_0 = 0, |
1822 | | UNI_PRED_LIST_1 = 1, |
1823 | | BI_PRED = 2, |
1824 | | EB_PREDDIRECTION_TOTAL = 3, |
1825 | | INVALID_PRED_DIRECTION = 0xFF |
1826 | | } PredDirection; |
1827 | | |
1828 | 0 | #define MAX_PAL_CAND 14 |
1829 | | |
1830 | | typedef struct { |
1831 | | // Value of base colors for Y only |
1832 | | uint16_t palette_colors[PALETTE_MAX_SIZE]; |
1833 | | // Number of base colors for Y only |
1834 | | uint8_t palette_size; |
1835 | | } PaletteLumaModeInfo; |
1836 | | |
1837 | | typedef struct { |
1838 | | // Value of base colors for Y, U, and V |
1839 | | uint16_t palette_colors[3 * PALETTE_MAX_SIZE]; |
1840 | | // Number of base colors for Y (0) and UV (1) |
1841 | | } PaletteModeInfo; |
1842 | | |
1843 | | typedef struct { |
1844 | | PaletteModeInfo pmi; |
1845 | | uint8_t *color_idx_map; |
1846 | | } PaletteInfo; |
1847 | | /** The EbHandle type is used to define OS object handles for threads, |
1848 | | semaphores, mutexs, etc. |
1849 | | */ |
1850 | | typedef void * EbHandle; |
1851 | | |
1852 | | /** The AtomicVarU32 type is used to define sn obj with its mutex |
1853 | | */ |
1854 | | typedef struct AtomicVarU32 { |
1855 | | uint32_t obj; |
1856 | | EbHandle mutex; |
1857 | | } AtomicVarU32; |
1858 | | |
1859 | | /** |
1860 | | object_ptr is a EbPtr to the object being constructed. |
1861 | | object_init_data_ptr is a EbPtr to a data structure used to initialize the object. |
1862 | | */ |
1863 | | typedef EbErrorType(*EbCreator)( |
1864 | | EbPtr *object_dbl_ptr, |
1865 | | EbPtr object_init_data_ptr); |
1866 | | typedef enum DistCalcType |
1867 | | { |
1868 | | DIST_CALC_RESIDUAL = 0, // SSE(Coefficients - ReconCoefficients) |
1869 | | DIST_CALC_PREDICTION = 1, // SSE(Coefficients) *Note - useful in modes that don't send residual coeff bits |
1870 | | DIST_CALC_TOTAL = 2 |
1871 | | } DistCalcType; |
1872 | | |
1873 | | typedef enum DistType |
1874 | | { |
1875 | | DIST_SSD = 0, |
1876 | | DIST_SSIM = 1, |
1877 | | DIST_TOTAL = 2 |
1878 | | } DistType; |
1879 | | |
1880 | | typedef enum EbPtrType |
1881 | | { |
1882 | | EB_N_PTR = 0, // malloc'd pointer |
1883 | | EB_C_PTR = 1, // calloc'd pointer |
1884 | | EB_A_PTR = 2, // malloc'd pointer aligned |
1885 | | EB_MUTEX = 3, // mutex |
1886 | | EB_SEMAPHORE = 4, // semaphore |
1887 | | EB_THREAD = 5, // thread handle |
1888 | | EB_PTR_TYPE_TOTAL, |
1889 | | } EbPtrType; |
1890 | | |
1891 | | typedef struct EbMemoryMapEntry |
1892 | | { |
1893 | | EbPtr ptr; // points to a memory pointer |
1894 | | EbPtrType ptr_type; // pointer type |
1895 | | EbPtr prev_entry; // pointer to the prev entry |
1896 | | } EbMemoryMapEntry; |
1897 | | |
1898 | 406k | #define ALVALUE 64 |
1899 | | |
1900 | | #define EB_CREATE_SEMAPHORE(pointer, initial_count, max_count) \ |
1901 | 55.4k | do { \ |
1902 | 55.4k | pointer = svt_create_semaphore(initial_count, max_count); \ |
1903 | 55.4k | EB_ADD_MEM(pointer, 1, EB_SEMAPHORE); \ |
1904 | 55.4k | }while (0) |
1905 | | |
1906 | | #define EB_DESTROY_SEMAPHORE(pointer) \ |
1907 | 55.4k | do { \ |
1908 | 55.4k | if (pointer) { \ |
1909 | 55.4k | svt_destroy_semaphore(pointer); \ |
1910 | 55.4k | EB_REMOVE_MEM_ENTRY(pointer, EB_SEMAPHORE); \ |
1911 | 55.4k | pointer = NULL; \ |
1912 | 55.4k | } \ |
1913 | 55.4k | }while (0) |
1914 | | |
1915 | | #define EB_CREATE_MUTEX(pointer) \ |
1916 | 373k | do { \ |
1917 | 373k | pointer = svt_create_mutex(); \ |
1918 | 373k | EB_ADD_MEM(pointer, 1, EB_MUTEX); \ |
1919 | 373k | } while (0) |
1920 | | |
1921 | | #define EB_DESTROY_MUTEX(pointer) \ |
1922 | 373k | do { \ |
1923 | 373k | if (pointer) { \ |
1924 | 373k | svt_destroy_mutex(pointer); \ |
1925 | 373k | EB_REMOVE_MEM_ENTRY(pointer, EB_MUTEX); \ |
1926 | 373k | pointer = NULL; \ |
1927 | 373k | } \ |
1928 | 373k | } while (0) |
1929 | | |
1930 | 5.21k | #define EB_MEMSET(dst, val, count) \ |
1931 | 5.21k | memset(dst, val, count) |
1932 | | |
1933 | | /************************************** |
1934 | | * Callback Functions |
1935 | | **************************************/ |
1936 | | typedef struct EbCallback |
1937 | | { |
1938 | | EbPtr app_private_data; |
1939 | | EbPtr handle; |
1940 | | void(*error_handler)( |
1941 | | EbPtr handle, |
1942 | | uint32_t errorCode); |
1943 | | } EbCallback; |
1944 | | |
1945 | | // Common Macros |
1946 | 103k | #define UNUSED(x) (void)(x) |
1947 | | |
1948 | | //***Encoding Parameters*** |
1949 | 6.16k | #define BLOCK_SIZE_64 64u |
1950 | 2.26k | #define LOG_MIN_BLOCK_SIZE 3 |
1951 | 2.26k | #define MIN_BLOCK_SIZE (1 << LOG_MIN_BLOCK_SIZE) |
1952 | | |
1953 | | // super-resolution definitions |
1954 | 1.89k | #define MIN_SUPERRES_DENOM 8 |
1955 | 948 | #define MAX_SUPERRES_DENOM 16 |
1956 | | |
1957 | | // reference scaling definitions |
1958 | 1.89k | #define MIN_RESIZE_DENOM 8 |
1959 | 948 | #define MAX_RESIZE_DENOM 16 |
1960 | | |
1961 | | //***Prediction Structure*** |
1962 | 4.74k | #define MAX_TEMPORAL_LAYERS 6 |
1963 | | #define MAX_MINIGOP_SIZE (1 << (MAX_TEMPORAL_LAYERS - 1)) |
1964 | 0 | #define MAX_NUM_OF_REF_PIC_LIST 2 |
1965 | | #define MAX_REF_IDX 4 |
1966 | | #define MAX_ELAPSED_IDR_COUNT 1024 |
1967 | | |
1968 | 0 | #define _MVXT(mv) ( (int16_t)((mv) & 0xFFFF) ) |
1969 | 0 | #define _MVYT(mv) ( (int16_t)((mv) >> 16 ) ) |
1970 | | |
1971 | 474 | #define HIGHER_THAN_CLASS_1_REGION_SPLIT_PER_WIDTH 4 |
1972 | 474 | #define HIGHER_THAN_CLASS_1_REGION_SPLIT_PER_HEIGHT 4 |
1973 | | |
1974 | | #define EbBlockMeanPrec uint8_t |
1975 | 6.22k | #define BLOCK_MEAN_PREC_FULL 0 |
1976 | 474 | #define BLOCK_MEAN_PREC_SUB 1 |
1977 | | typedef enum { |
1978 | | DEFAULT_SHAPE = 0, |
1979 | | N2_SHAPE = 1, |
1980 | | N4_SHAPE = 2, |
1981 | | ONLY_DC_SHAPE = 3 |
1982 | | }TxCoeffShape; |
1983 | | |
1984 | | typedef enum { |
1985 | | CHROMA_MODE_0 = 0, // Full chroma search @ MD |
1986 | | CHROMA_MODE_1 = 1, // Fast chroma search @ MD |
1987 | | CHROMA_MODE_2 = 2 // Chroma blind @ MD |
1988 | | }ChromaLevel; |
1989 | | |
1990 | | // Multi-Pass Partitioning Depth(Multi - Pass PD) performs multiple PD stages for the same SB towards 1 final Partitioning Structure |
1991 | | // As we go from PDn to PDn + 1, the prediction accuracy of the MD feature(s) increases while the number of block(s) decreases |
1992 | | typedef enum MultiPassPdLevel { |
1993 | | MULTI_PASS_PD_OFF = 0, // Multi-Pass PD OFF = 1-single PD Pass |
1994 | | MULTI_PASS_PD_ON = 1, // Multi-Pass PD ON = PD0 | PD0_REFINEMENT | PD1 |
1995 | | MULTI_PASS_PD_INVALID = 0, // Invalid Multi-Pass PD Mode |
1996 | | } MultiPassPdLevel; |
1997 | | |
1998 | | typedef enum RasterScanCuIndex { |
1999 | | // 2Nx2N [85 partitions] |
2000 | | RASTER_SCAN_CU_INDEX_64x64 = 0, |
2001 | | RASTER_SCAN_CU_INDEX_32x32_0 = 1, |
2002 | | RASTER_SCAN_CU_INDEX_32x32_1 = 2, |
2003 | | RASTER_SCAN_CU_INDEX_32x32_2 = 3, |
2004 | | RASTER_SCAN_CU_INDEX_32x32_3 = 4, |
2005 | | RASTER_SCAN_CU_INDEX_16x16_0 = 5, |
2006 | | RASTER_SCAN_CU_INDEX_16x16_1 = 6, |
2007 | | RASTER_SCAN_CU_INDEX_16x16_2 = 7, |
2008 | | RASTER_SCAN_CU_INDEX_16x16_3 = 8, |
2009 | | RASTER_SCAN_CU_INDEX_16x16_4 = 9, |
2010 | | RASTER_SCAN_CU_INDEX_16x16_5 = 10, |
2011 | | RASTER_SCAN_CU_INDEX_16x16_6 = 11, |
2012 | | RASTER_SCAN_CU_INDEX_16x16_7 = 12, |
2013 | | RASTER_SCAN_CU_INDEX_16x16_8 = 13, |
2014 | | RASTER_SCAN_CU_INDEX_16x16_9 = 14, |
2015 | | RASTER_SCAN_CU_INDEX_16x16_10 = 15, |
2016 | | RASTER_SCAN_CU_INDEX_16x16_11 = 16, |
2017 | | RASTER_SCAN_CU_INDEX_16x16_12 = 17, |
2018 | | RASTER_SCAN_CU_INDEX_16x16_13 = 18, |
2019 | | RASTER_SCAN_CU_INDEX_16x16_14 = 19, |
2020 | | RASTER_SCAN_CU_INDEX_16x16_15 = 20, |
2021 | | RASTER_SCAN_CU_INDEX_8x8_0 = 21, |
2022 | | RASTER_SCAN_CU_INDEX_8x8_1 = 22, |
2023 | | RASTER_SCAN_CU_INDEX_8x8_2 = 23, |
2024 | | RASTER_SCAN_CU_INDEX_8x8_3 = 24, |
2025 | | RASTER_SCAN_CU_INDEX_8x8_4 = 25, |
2026 | | RASTER_SCAN_CU_INDEX_8x8_5 = 26, |
2027 | | RASTER_SCAN_CU_INDEX_8x8_6 = 27, |
2028 | | RASTER_SCAN_CU_INDEX_8x8_7 = 28, |
2029 | | RASTER_SCAN_CU_INDEX_8x8_8 = 29, |
2030 | | RASTER_SCAN_CU_INDEX_8x8_9 = 30, |
2031 | | RASTER_SCAN_CU_INDEX_8x8_10 = 31, |
2032 | | RASTER_SCAN_CU_INDEX_8x8_11 = 32, |
2033 | | RASTER_SCAN_CU_INDEX_8x8_12 = 33, |
2034 | | RASTER_SCAN_CU_INDEX_8x8_13 = 34, |
2035 | | RASTER_SCAN_CU_INDEX_8x8_14 = 35, |
2036 | | RASTER_SCAN_CU_INDEX_8x8_15 = 36, |
2037 | | RASTER_SCAN_CU_INDEX_8x8_16 = 37, |
2038 | | RASTER_SCAN_CU_INDEX_8x8_17 = 38, |
2039 | | RASTER_SCAN_CU_INDEX_8x8_18 = 39, |
2040 | | RASTER_SCAN_CU_INDEX_8x8_19 = 40, |
2041 | | RASTER_SCAN_CU_INDEX_8x8_20 = 41, |
2042 | | RASTER_SCAN_CU_INDEX_8x8_21 = 42, |
2043 | | RASTER_SCAN_CU_INDEX_8x8_22 = 43, |
2044 | | RASTER_SCAN_CU_INDEX_8x8_23 = 44, |
2045 | | RASTER_SCAN_CU_INDEX_8x8_24 = 45, |
2046 | | RASTER_SCAN_CU_INDEX_8x8_25 = 46, |
2047 | | RASTER_SCAN_CU_INDEX_8x8_26 = 47, |
2048 | | RASTER_SCAN_CU_INDEX_8x8_27 = 48, |
2049 | | RASTER_SCAN_CU_INDEX_8x8_28 = 49, |
2050 | | RASTER_SCAN_CU_INDEX_8x8_29 = 50, |
2051 | | RASTER_SCAN_CU_INDEX_8x8_30 = 51, |
2052 | | RASTER_SCAN_CU_INDEX_8x8_31 = 52, |
2053 | | RASTER_SCAN_CU_INDEX_8x8_32 = 53, |
2054 | | RASTER_SCAN_CU_INDEX_8x8_33 = 54, |
2055 | | RASTER_SCAN_CU_INDEX_8x8_34 = 55, |
2056 | | RASTER_SCAN_CU_INDEX_8x8_35 = 56, |
2057 | | RASTER_SCAN_CU_INDEX_8x8_36 = 57, |
2058 | | RASTER_SCAN_CU_INDEX_8x8_37 = 58, |
2059 | | RASTER_SCAN_CU_INDEX_8x8_38 = 59, |
2060 | | RASTER_SCAN_CU_INDEX_8x8_39 = 60, |
2061 | | RASTER_SCAN_CU_INDEX_8x8_40 = 61, |
2062 | | RASTER_SCAN_CU_INDEX_8x8_41 = 62, |
2063 | | RASTER_SCAN_CU_INDEX_8x8_42 = 63, |
2064 | | RASTER_SCAN_CU_INDEX_8x8_43 = 64, |
2065 | | RASTER_SCAN_CU_INDEX_8x8_44 = 65, |
2066 | | RASTER_SCAN_CU_INDEX_8x8_45 = 66, |
2067 | | RASTER_SCAN_CU_INDEX_8x8_46 = 67, |
2068 | | RASTER_SCAN_CU_INDEX_8x8_47 = 68, |
2069 | | RASTER_SCAN_CU_INDEX_8x8_48 = 69, |
2070 | | RASTER_SCAN_CU_INDEX_8x8_49 = 70, |
2071 | | RASTER_SCAN_CU_INDEX_8x8_50 = 71, |
2072 | | RASTER_SCAN_CU_INDEX_8x8_51 = 72, |
2073 | | RASTER_SCAN_CU_INDEX_8x8_52 = 73, |
2074 | | RASTER_SCAN_CU_INDEX_8x8_53 = 74, |
2075 | | RASTER_SCAN_CU_INDEX_8x8_54 = 75, |
2076 | | RASTER_SCAN_CU_INDEX_8x8_55 = 76, |
2077 | | RASTER_SCAN_CU_INDEX_8x8_56 = 77, |
2078 | | RASTER_SCAN_CU_INDEX_8x8_57 = 78, |
2079 | | RASTER_SCAN_CU_INDEX_8x8_58 = 79, |
2080 | | RASTER_SCAN_CU_INDEX_8x8_59 = 80, |
2081 | | RASTER_SCAN_CU_INDEX_8x8_60 = 81, |
2082 | | RASTER_SCAN_CU_INDEX_8x8_61 = 82, |
2083 | | RASTER_SCAN_CU_INDEX_8x8_62 = 83, |
2084 | | RASTER_SCAN_CU_INDEX_8x8_63 = 84 |
2085 | | } RasterScanCuIndex; |
2086 | | |
2087 | | typedef struct StatStruct { |
2088 | | uint64_t poc; |
2089 | | uint64_t total_num_bits; |
2090 | | uint8_t qindex; |
2091 | | uint8_t worst_qindex; |
2092 | | uint8_t temporal_layer_index; |
2093 | | } StatStruct; |
2094 | | |
2095 | | extern const uint8_t me_idx_85_8x8_to_16x16_conversion[64]; |
2096 | | extern const uint8_t me_idx_16x16_to_parent_32x32_conversion[16]; |
2097 | | |
2098 | | typedef enum IntrabcMotionDirection |
2099 | | { |
2100 | | IBC_MOTION_ABOVE, |
2101 | | IBC_MOTION_LEFT, |
2102 | | IBC_MOTION_DIRECTIONS |
2103 | | } IntrabcMotionDirection; |
2104 | | typedef struct _EbEncHandle EbEncHandle; |
2105 | | typedef struct _EbThreadContext EbThreadContext; |
2106 | | typedef enum { |
2107 | | // level of using SSIM based function to calculate distortion in MD |
2108 | | SSIM_LVL_0 = 0, // default, feature off |
2109 | | SSIM_LVL_1 = 1, // use ssim cost to find best candidate in product_full_mode_decision() |
2110 | | SSIM_LVL_2 = 2, // use ssim cost to find best tx type in tx_type_search() |
2111 | | SSIM_LVL_3 = 3 // for both product_full_mode_decision() and tx_type_search() |
2112 | | } SsimLevel; |
2113 | | |
2114 | 0 | #define MAX_U32 0xFFFFFFFF |
2115 | | |
2116 | | // Both SFRAME_FLEXIBLE_BASE and SFRAME_DEC_POSI_BASE use flexible insertion |
2117 | 474 | #define IS_SFRAME_FLEXIBLE_INSERT(mode) (mode == SFRAME_FLEXIBLE_BASE || mode == SFRAME_DEC_POSI_BASE) |
2118 | | |
2119 | | #ifdef __cplusplus |
2120 | | } |
2121 | | #endif |
2122 | | /* clang-format on */ |
2123 | | #endif // EbDefinitions_h |