AOMedia AV1 Codec: av1/encoder/speed_features.h Source File

| AOMedia AV1 Codec

speed_features.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
3 *
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10 */
11
12#ifndef AOM_AV1_ENCODER_SPEED_FEATURES_H_
13#define AOM_AV1_ENCODER_SPEED_FEATURES_H_
14
15#include "av1/common/enums.h"
16#include "av1/encoder/enc_enums.h"
17#include "av1/encoder/mcomp.h"
18#include "av1/encoder/encodemb.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
25
27#define MAX_MESH_STEP 4
28
29typedef struct MESH_PATTERN {
30 int range;
31 int interval;
32} MESH_PATTERN;
33
34enum {
35 GM_FULL_SEARCH,
36 GM_REDUCED_REF_SEARCH_SKIP_L2_L3,
37 GM_REDUCED_REF_SEARCH_SKIP_L2_L3_ARF2,
38
39 // Same as GM_REDUCED_REF_SEARCH_SKIP_L2_L3_ARF2 but with extra filtering
40 // to keep at most two ref frames
41 GM_SEARCH_CLOSEST_REFS_ONLY,
42
43 GM_DISABLE_SEARCH
44} UENUM1BYTE(GM_SEARCH_TYPE);
45
46enum {
47 DIST_WTD_COMP_ENABLED,
48 DIST_WTD_COMP_SKIP_MV_SEARCH,
49 DIST_WTD_COMP_DISABLED,
50} UENUM1BYTE(DIST_WTD_COMP_FLAG);
51
52enum {
53 INTRA_ALL = (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED) | (1 << D45_PRED) |
54 (1 << D135_PRED) | (1 << D113_PRED) | (1 << D157_PRED) |
55 (1 << D203_PRED) | (1 << D67_PRED) | (1 << SMOOTH_PRED) |
56 (1 << SMOOTH_V_PRED) | (1 << SMOOTH_H_PRED) | (1 << PAETH_PRED),
57 UV_INTRA_ALL =
58 (1 << UV_DC_PRED) | (1 << UV_V_PRED) | (1 << UV_H_PRED) |
59 (1 << UV_D45_PRED) | (1 << UV_D135_PRED) | (1 << UV_D113_PRED) |
60 (1 << UV_D157_PRED) | (1 << UV_D203_PRED) | (1 << UV_D67_PRED) |
61 (1 << UV_SMOOTH_PRED) | (1 << UV_SMOOTH_V_PRED) |
62 (1 << UV_SMOOTH_H_PRED) | (1 << UV_PAETH_PRED) | (1 << UV_CFL_PRED),
63 UV_INTRA_DC = (1 << UV_DC_PRED),
64 UV_INTRA_DC_CFL = (1 << UV_DC_PRED) | (1 << UV_CFL_PRED),
65 UV_INTRA_DC_TM = (1 << UV_DC_PRED) | (1 << UV_PAETH_PRED),
66 UV_INTRA_DC_PAETH_CFL =
67 (1 << UV_DC_PRED) | (1 << UV_PAETH_PRED) | (1 << UV_CFL_PRED),
68 UV_INTRA_DC_H_V = (1 << UV_DC_PRED) | (1 << UV_V_PRED) | (1 << UV_H_PRED),
69 UV_INTRA_DC_H_V_CFL = (1 << UV_DC_PRED) | (1 << UV_V_PRED) |
70 (1 << UV_H_PRED) | (1 << UV_CFL_PRED),
71 UV_INTRA_DC_PAETH_H_V = (1 << UV_DC_PRED) | (1 << UV_PAETH_PRED) |
72 (1 << UV_V_PRED) | (1 << UV_H_PRED),
73 UV_INTRA_DC_PAETH_H_V_CFL = (1 << UV_DC_PRED) | (1 << UV_PAETH_PRED) |
74 (1 << UV_V_PRED) | (1 << UV_H_PRED) |
75 (1 << UV_CFL_PRED),
76 INTRA_DC = (1 << DC_PRED),
77 INTRA_DC_TM = (1 << DC_PRED) | (1 << PAETH_PRED),
78 INTRA_DC_H_V = (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED),
79 INTRA_DC_H_V_SMOOTH =
80 (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED) | (1 << SMOOTH_PRED),
81 INTRA_DC_PAETH_H_V =
82 (1 << DC_PRED) | (1 << PAETH_PRED) | (1 << V_PRED) | (1 << H_PRED)
83};
84
85enum {
86 INTER_ALL = (1 << NEARESTMV) | (1 << NEARMV) | (1 << GLOBALMV) |
87 (1 << NEWMV) | (1 << NEAREST_NEARESTMV) | (1 << NEAR_NEARMV) |
88 (1 << NEW_NEWMV) | (1 << NEAREST_NEWMV) | (1 << NEAR_NEWMV) |
89 (1 << NEW_NEARMV) | (1 << NEW_NEARESTMV) | (1 << GLOBAL_GLOBALMV),
90 INTER_NEAREST_NEAR_ZERO = (1 << NEARESTMV) | (1 << NEARMV) | (1 << GLOBALMV) |
91 (1 << NEAREST_NEARESTMV) | (1 << GLOBAL_GLOBALMV) |
92 (1 << NEAREST_NEWMV) | (1 << NEW_NEARESTMV) |
93 (1 << NEW_NEARMV) | (1 << NEAR_NEWMV) |
94 (1 << NEAR_NEARMV),
95 INTER_SINGLE_ALL =
96 (1 << NEARESTMV) | (1 << NEARMV) | (1 << GLOBALMV) | (1 << NEWMV),
97};
98
99enum {
100 DISABLE_ALL_INTER_SPLIT = (1 << THR_COMP_GA) | (1 << THR_COMP_LA) |
101 (1 << THR_ALTR) | (1 << THR_GOLD) | (1 << THR_LAST),
102
103 DISABLE_ALL_SPLIT = (1 << THR_INTRA) | DISABLE_ALL_INTER_SPLIT,
104
105 DISABLE_COMPOUND_SPLIT = (1 << THR_COMP_GA) | (1 << THR_COMP_LA),
106
107 LAST_AND_INTRA_SPLIT_ONLY = (1 << THR_COMP_GA) | (1 << THR_COMP_LA) |
108 (1 << THR_ALTR) | (1 << THR_GOLD)
109};
110
111enum {
112 TXFM_CODING_SF = 1,
113 INTER_PRED_SF = 2,
114 INTRA_PRED_SF = 4,
115 PARTITION_SF = 8,
116 LOOP_FILTER_SF = 16,
117 RD_SKIP_SF = 32,
118 RESERVE_2_SF = 64,
119 RESERVE_3_SF = 128,
120} UENUM1BYTE(DEV_SPEED_FEATURES);
121
122/* This enumeration defines when the rate control recode loop will be
123 * enabled.
124 */
125enum {
126 /*
127 * No recodes allowed
128 */
129 DISALLOW_RECODE = 0,
130 /*
131 * Allow recode only for KF/ARF/GF frames
132 */
133 ALLOW_RECODE_KFARFGF = 1,
134 /*
135 * Allow recode for all frame types based on bitrate constraints.
136 */
137 ALLOW_RECODE = 2,
138} UENUM1BYTE(RECODE_LOOP_TYPE);
139
140enum {
141 SUBPEL_TREE = 0,
142 SUBPEL_TREE_PRUNED = 1, // Prunes 1/2-pel searches
143 SUBPEL_TREE_PRUNED_MORE = 2, // Prunes 1/2-pel searches more aggressively
144 SUBPEL_SEARCH_METHODS
145} UENUM1BYTE(SUBPEL_SEARCH_METHOD);
146
147enum {
148 // Try the full image with different values.
149 LPF_PICK_FROM_FULL_IMAGE,
150 // Try the full image filter search with non-dual filter only.
151 LPF_PICK_FROM_FULL_IMAGE_NON_DUAL,
152 // Try a small portion of the image with different values.
153 LPF_PICK_FROM_SUBIMAGE,
154 // Estimate the level based on quantizer and frame type
155 LPF_PICK_FROM_Q,
156 // Pick 0 to disable LPF if LPF was enabled last frame
157 LPF_PICK_MINIMAL_LPF
158} UENUM1BYTE(LPF_PICK_METHOD);
160
164 typedef enum {
165 CDEF_FULL_SEARCH,
166 CDEF_FAST_SEARCH_LVL1,
167 CDEF_FAST_SEARCH_LVL2,
168 CDEF_FAST_SEARCH_LVL3,
170 CDEF_FAST_SEARCH_LVL4,
171 CDEF_FAST_SEARCH_LVL5,
172 CDEF_PICK_FROM_Q,
173 CDEF_PICK_METHODS
174} CDEF_PICK_METHOD;
175
177enum {
178 // Terminate search early based on distortion so far compared to
179 // qp step, distortion in the neighborhood of the frame, etc.
180 FLAG_EARLY_TERMINATE = 1 << 0,
181
182 // Skips comp inter modes if the best so far is an intra mode.
183 FLAG_SKIP_COMP_BESTINTRA = 1 << 1,
184
185 // Skips oblique intra modes if the best so far is an inter mode.
186 FLAG_SKIP_INTRA_BESTINTER = 1 << 3,
187
188 // Skips oblique intra modes at angles 27, 63, 117, 153 if the best
189 // intra so far is not one of the neighboring directions.
190 FLAG_SKIP_INTRA_DIRMISMATCH = 1 << 4,
191
192 // Skips intra modes other than DC_PRED if the source variance is small
193 FLAG_SKIP_INTRA_LOWVAR = 1 << 5,
194} UENUM1BYTE(MODE_SEARCH_SKIP_LOGIC);
195
196enum {
197 // No tx type pruning
198 TX_TYPE_PRUNE_0 = 0,
199 // adaptively prunes the least perspective tx types out of all 16
200 // (tuned to provide negligible quality loss)
201 TX_TYPE_PRUNE_1 = 1,
202 // similar, but applies much more aggressive pruning to get better speed-up
203 TX_TYPE_PRUNE_2 = 2,
204 TX_TYPE_PRUNE_3 = 3,
205 // More aggressive pruning based on tx type score and allowed tx count
206 TX_TYPE_PRUNE_4 = 4,
207 TX_TYPE_PRUNE_5 = 5,
208} UENUM1BYTE(TX_TYPE_PRUNE_MODE);
209
210enum {
211 // No reaction to rate control on a detected slide/scene change.
212 NO_DETECTION = 0,
213
214 // Set to larger Q based only on the detected slide/scene change and
215 // current/past Q.
216 FAST_DETECTION_MAXQ = 1,
217} UENUM1BYTE(OVERSHOOT_DETECTION_CBR);
218
219enum {
220 // Turns off multi-winner mode. So we will do txfm search on either all modes
221 // if winner mode is off, or we will only on txfm search on a single winner
222 // mode.
223 MULTI_WINNER_MODE_OFF = 0,
224
225 // Limits the number of winner modes to at most 2
226 MULTI_WINNER_MODE_FAST = 1,
227
228 // Uses the default number of winner modes, which is 3 for intra mode, and 1
229 // for inter mode.
230 MULTI_WINNER_MODE_DEFAULT = 2,
231
232 // Maximum number of winner modes allowed.
233 MULTI_WINNER_MODE_LEVELS,
234} UENUM1BYTE(MULTI_WINNER_MODE_TYPE);
235
236enum {
237 PRUNE_NEARMV_OFF = 0, // Turn off nearmv pruning
238 PRUNE_NEARMV_LEVEL1 = 1, // Prune nearmv for qindex (0-85)
239 PRUNE_NEARMV_LEVEL2 = 2, // Prune nearmv for qindex (0-170)
240 PRUNE_NEARMV_LEVEL3 = 3, // Prune nearmv more aggressively for qindex (0-170)
241 PRUNE_NEARMV_MAX = PRUNE_NEARMV_LEVEL3,
242} UENUM1BYTE(PRUNE_NEARMV_LEVEL);
243
244enum {
245 // Default transform search used in evaluation of best inter candidates
246 // (MODE_EVAL stage) and motion mode winner processing (WINNER_MODE_EVAL
247 // stage).
248 TX_SEARCH_DEFAULT = 0,
249 // Transform search in motion mode rd during MODE_EVAL stage.
250 TX_SEARCH_MOTION_MODE,
251 // Transform search in compound type mode rd during MODE_EVAL stage.
252 TX_SEARCH_COMP_TYPE_MODE,
253 // All transform search cases
254 TX_SEARCH_CASES
255} UENUM1BYTE(TX_SEARCH_CASE);
256
257typedef struct {
258 TX_TYPE_PRUNE_MODE prune_2d_txfm_mode;
259
260 // Limit the intra transform search type.
261 // 1 : Limit the intra transform search type to the ones in the table
262 // av1_derived_intra_tx_used_flag[INTRA_MODES].
263 // 2 : Limit the intra transform search type to the default transform.
264 int fast_intra_tx_type_search;
265
266 // INT_MAX: Disable fast search.
267 // 1 - 1024: Probability threshold used for conditionally forcing tx type,
268 // during mode search.
269 // 0: Force tx type to be DCT_DCT unconditionally, during
270 // mode search.
271 int fast_inter_tx_type_prob_thresh;
272
273 // Prune less likely chosen transforms for each intra mode. The speed
274 // feature ranges from 0 to 2, for different speed / compression trade offs.
275 int use_reduced_intra_txset;
276
277 // Use a skip flag prediction model to detect blocks with skip = 1 early
278 // and avoid doing full TX type search for such blocks.
279 int use_skip_flag_prediction;
280
281 // Threshold used by the ML based method to predict TX block split decisions.
282 int ml_tx_split_thresh;
283
284 // skip remaining transform type search when we found the rdcost of skip is
285 // better than applying transform
286 int skip_tx_search;
287
288 // Prune tx type search using previous frame stats.
289 int prune_tx_type_using_stats;
290 // Prune tx type search using estimated RDcost
291 int prune_tx_type_est_rd;
292
293 // Flag used to control the winner mode processing for tx type pruning for
294 // inter blocks. It enables further tx type mode pruning based on ML model for
295 // mode evaluation and disables tx type mode pruning for winner mode
296 // processing.
297 int winner_mode_tx_type_pruning;
298} TX_TYPE_SEARCH;
299
300enum {
301 // Search partitions using RD criterion
302 SEARCH_PARTITION,
303
304 // Always use a fixed size partition
305 FIXED_PARTITION,
306
307 // Partition using source variance
308 VAR_BASED_PARTITION,
309
310#if CONFIG_RT_ML_PARTITIONING
311 // Partition using ML model
312 ML_BASED_PARTITION
313#endif
314} UENUM1BYTE(PARTITION_SEARCH_TYPE);
315
316enum {
317 NOT_IN_USE,
318 DIRECT_PRED,
319 RELAXED_PRED,
320 ADAPT_PRED
321} UENUM1BYTE(MAX_PART_PRED_MODE);
322
323enum {
324 LAST_MV_DATA,
325 CURRENT_Q,
326 QTR_ONLY,
327} UENUM1BYTE(MV_PREC_LOGIC);
328
329enum {
330 SUPERRES_AUTO_ALL, // Tries all possible superres ratios
331 SUPERRES_AUTO_DUAL, // Tries no superres and q-based superres ratios
332 SUPERRES_AUTO_SOLO, // Only apply the q-based superres ratio
333} UENUM1BYTE(SUPERRES_AUTO_SEARCH_TYPE);
335
351 typedef enum {
352 INTERNAL_COST_UPD_OFF,
353 INTERNAL_COST_UPD_TILE,
354 INTERNAL_COST_UPD_SBROW_SET,
355 INTERNAL_COST_UPD_SBROW,
356 INTERNAL_COST_UPD_SB,
357} INTERNAL_COST_UPDATE_TYPE;
358
363 typedef enum {
364 NO_PRUNING = -1,
365 SIMPLE_AGG_LVL0,
366 SIMPLE_AGG_LVL1,
367 SIMPLE_AGG_LVL2,
368 SIMPLE_AGG_LVL3,
369 SIMPLE_AGG_LVL4,
370 SIMPLE_AGG_LVL5,
371 QIDX_BASED_AGG_LVL1,
374 TOTAL_SIMPLE_AGG_LVLS = QIDX_BASED_AGG_LVL1,
376 TOTAL_QINDEX_BASED_AGG_LVLS =
377 QIDX_BASED_AGG_LVL1 -
378 SIMPLE_AGG_LVL5,
380 TOTAL_AGG_LVLS = TOTAL_SIMPLE_AGG_LVLS +
381 TOTAL_QINDEX_BASED_AGG_LVLS,
382} SIMPLE_MOTION_SEARCH_PRUNE_LEVEL;
383
387 typedef enum {
388 PRUNE_MESH_SEARCH_DISABLED = 0,
389 PRUNE_MESH_SEARCH_LVL_1 = 1,
390 PRUNE_MESH_SEARCH_LVL_2 = 2,
391} PRUNE_MESH_SEARCH_LEVEL;
392
397 typedef enum {
398 EARLY_TERM_DISABLED =
399 0,
400 EARLY_TERM_IDX_1 =
401 1,
402 EARLY_TERM_IDX_2 =
403 2,
404 EARLY_TERM_IDX_3 =
405 3,
406 EARLY_TERM_IDX_4 =
407 4,
408 EARLY_TERM_INDICES,
409} INTER_SEARCH_EARLY_TERM_IDX;
410
414 typedef struct HIGH_LEVEL_SPEED_FEATURES {
416 int frame_parameter_update;
417
421 RECODE_LOOP_TYPE recode_loop;
422
427 int recode_tolerance;
428
435 MV_PREC_LOGIC high_precision_mv_usage;
436
444 int static_segmentation;
445
449 SUPERRES_AUTO_SEARCH_TYPE superres_auto_search_type;
450
454 int disable_extra_sc_testing;
455
459 int second_alt_ref_filtering;
460
469 int adjust_num_frames_for_arf_filtering;
470
476 int accurate_bit_estimate;
477
483 int weight_calc_level_in_tf;
484
491 int allow_sub_blk_me_in_tf;
492
499 int ref_frame_mvs_lvl;
500
506 int screen_detection_mode2_fast_detection;
507
513 int weighted_chroma_distortion;
514} HIGH_LEVEL_SPEED_FEATURES;
515
519 typedef struct FIRST_PASS_SPEED_FEATURES {
526 int reduce_mv_step_param;
527
531 int skip_motion_search_threshold;
532
536 int disable_recon;
537
541 int skip_zeromv_motion_search;
542} FIRST_PASS_SPEED_FEATURES;
543
545typedef struct TPL_SPEED_FEATURES {
546 // GOP length adaptive decision.
547 // If set to 0, tpl model decides whether a shorter gf interval is better.
548 // If set to 1, tpl stats of ARFs from base layer, (base+1) layer and
549 // (base+2) layer decide whether a shorter gf interval is better.
550 // If set to 2, tpl stats of ARFs from base layer, (base+1) layer and GF boost
551 // decide whether a shorter gf interval is better.
552 // If set to 3, gop length adaptive decision is disabled.
553 int gop_length_decision_method;
554 // Prune the intra modes search by tpl.
555 // If set to 0, we will search all intra modes from DC_PRED to PAETH_PRED.
556 // If set to 1, we only search DC_PRED, V_PRED, and H_PRED.
557 int prune_intra_modes;
558 // This parameter controls which step in the n-step process we start at.
559 int reduce_first_step_size;
560 // Skip motion estimation based on the precision of center MVs and the
561 // difference between center MVs.
562 // If set to 0, motion estimation is skipped for duplicate center MVs
563 // (default). If set to 1, motion estimation is skipped for duplicate
564 // full-pixel center MVs. If set to 2, motion estimation is skipped if the
565 // difference between center MVs is less than the threshold.
566 int skip_alike_starting_mv;
567
568 // When to stop subpel search.
569 SUBPEL_FORCE_STOP subpel_force_stop;
570
571 // Which search method to use.
572 SEARCH_METHODS search_method;
573
574 // Prune starting mvs in TPL based on sad scores.
575 int prune_starting_mv;
576
577 // Prune reference frames in TPL.
578 int prune_ref_frames_in_tpl;
579
580 // Support compound predictions.
581 int allow_compound_pred;
582
583 // Calculate rate and distortion based on Y plane only.
584 int use_y_only_rate_distortion;
585
586 // Use SAD instead of SATD during intra/inter mode search.
587 // If set to 0, use SATD always.
588 // If set to 1, use SAD during intra/inter mode search for frames in the
589 // higher temporal layers of the hierarchical prediction structure.
590 // If set to 2, use SAD during intra/inter mode search for all frames.
591 // This sf is disabled for the first GF group of the key-frame interval,
592 // i.e., SATD is used during intra/inter mode search of the first GF group.
593 int use_sad_for_mode_decision;
594
595 // Skip tpl processing for frames of type LF_UPDATE.
596 // This sf is disabled for the first GF group of the key-frame interval.
597 int reduce_num_frames;
598} TPL_SPEED_FEATURES;
599
600typedef struct GLOBAL_MOTION_SPEED_FEATURES {
601 GM_SEARCH_TYPE gm_search_type;
602
603 // During global motion estimation, prune remaining reference frames in a
604 // given direction(past/future), if the evaluated ref_frame in that direction
605 // yields gm_type as INVALID/TRANSLATION/IDENTITY
606 int prune_ref_frame_for_gm_search;
607
608 // When the current GM type is set to ZEROMV, prune ZEROMV if its performance
609 // is worse than NEWMV under SSE metric.
610 // 0 : no pruning
611 // 1 : conservative pruning
612 // 2 : aggressive pruning
613 int prune_zero_mv_with_sse;
614
615 // Disable global motion estimation based on stats of previous frames in the
616 // GF group
617 int disable_gm_search_based_on_stats;
618
619 // Downsampling pyramid level to use for global motion estimation
620 int downsample_level;
621
622 // Number of refinement steps to apply after initial model generation
623 int num_refinement_steps;
624
625 // Error advantage threshold level used to determine whether global motion
626 // compensation should be enabled. It Can take values 0 - 2 increasing
627 // aggressiveness of skipping GM in order.
628 int gm_erroradv_tr_level;
629} GLOBAL_MOTION_SPEED_FEATURES;
630
631typedef struct PARTITION_SPEED_FEATURES {
632 PARTITION_SEARCH_TYPE partition_search_type;
633
634 // Used if partition_search_type = FIXED_PARTITION
635 BLOCK_SIZE fixed_partition_size;
636
637 // Prune extended partition types search based on the current best partition
638 // and the combined rdcost of the subblocks estimated from previous
639 // partitions. Can take values 0 - 2, 0 referring to no pruning, and 1 - 2
640 // increasing aggressiveness of pruning in order.
641 int prune_ext_partition_types_search_level;
642
643 // Prune part4 based on block size
644 int prune_part4_search;
645
646 // Use a ML model to prune rectangular, ab and 4-way horz
647 // and vert partitions
648 int ml_prune_partition;
649
650 // Use a ML model to adaptively terminate partition search after trying
651 // PARTITION_SPLIT. Can take values 0 - 2, 0 meaning not being enabled, and
652 // 1 - 2 increasing aggressiveness in order.
653 int ml_early_term_after_part_split_level;
654
655 // Skip rectangular partition test when partition type none gives better
656 // rd than partition type split. Can take values 0 - 2, 0 referring to no
657 // skipping, and 1 - 2 increasing aggressiveness of skipping in order.
658 int less_rectangular_check_level;
659
660 // Use square partition only beyond this block size.
661 BLOCK_SIZE use_square_partition_only_threshold;
662
663 // Sets max square partition levels for this superblock based on
664 // motion vector and prediction error distribution produced from 16x16
665 // simple motion search
666 MAX_PART_PRED_MODE auto_max_partition_based_on_simple_motion;
667
668 // Min and max square partition size we enable (block_size) as per auto
669 // min max, but also used by adjust partitioning, and pick_partitioning.
670 BLOCK_SIZE default_min_partition_size;
671 BLOCK_SIZE default_max_partition_size;
672
673 // Sets level of adjustment of variance-based partitioning during
674 // rd_use_partition 0 - no partition adjustment, 1 - try to merge partitions
675 // for small blocks and high QP, 2 - try to merge partitions, 3 - try to merge
676 // and split leaf partitions and 0 - 3 decreasing aggressiveness in order.
677 int adjust_var_based_rd_partitioning;
678
679 // Partition search early breakout thresholds.
680 int64_t partition_search_breakout_dist_thr;
681 int partition_search_breakout_rate_thr;
682
683 // Thresholds for ML based partition search breakout.
684 float ml_partition_search_breakout_thresh[PARTITION_BLOCK_SIZES];
685
686 // ML based partition search breakout model index
687 int ml_partition_search_breakout_model_index;
688
689 // ML based partition search breakout model index
690 int ml_4_partition_search_level_index;
691
692 // Aggressiveness levels for pruning split and rectangular partitions based on
693 // simple_motion_search. SIMPLE_AGG_LVL0 to SIMPLE_AGG_LVL5 correspond to
694 // simple motion search based pruning. QIDX_BASED_AGG_LVL1 corresponds to
695 // qindex based and simple motion search based pruning.
696 int simple_motion_search_prune_agg;
697
698 // Perform simple_motion_search on each possible subblock and use it to prune
699 // PARTITION_HORZ and PARTITION_VERT.
700 int simple_motion_search_prune_rect;
701
702 // Perform simple motion search before none_partition to decide if we
703 // want to remove all partitions other than PARTITION_SPLIT. If set to 0, this
704 // model is disabled. If set to 1, the model attempts to perform
705 // PARTITION_SPLIT only. If set to 2, the model also attempts to prune
706 // PARTITION_SPLIT.
707 int simple_motion_search_split;
708
709 // Use features from simple_motion_search to terminate prediction block
710 // partition after PARTITION_NONE
711 int simple_motion_search_early_term_none;
712
713 // Controls whether to reduce the number of motion search steps. If this is 0,
714 // then simple_motion_search has the same number of steps as
715 // single_motion_search (assuming no other speed features). Otherwise, reduce
716 // the number of steps by the value contained in this variable.
717 int simple_motion_search_reduce_search_steps;
718
719 // This variable controls the maximum block size where intra blocks can be
720 // used in inter frames.
721 // TODO(aconverse): Fold this into one of the other many mode skips
722 BLOCK_SIZE max_intra_bsize;
723
724 // Use CNN with luma pixels on source frame on each of the 64x64 subblock to
725 // perform partition pruning in intra frames.
726 // 0: No Pruning
727 // 1: Prune split and rectangular partitions only
728 // 2: Prune none, split and rectangular partitions
729 int intra_cnn_based_part_prune_level;
730
731 // Disable extended partition search if the current bsize is greater than the
732 // threshold. Must be a square block size BLOCK_8X8 or higher.
733 BLOCK_SIZE ext_partition_eval_thresh;
734
735 // Use best partition decision so far to tune 'ext_partition_eval_thresh'
736 int ext_part_eval_based_on_cur_best;
737
738 // Disable rectangular partitions for larger block sizes.
739 int rect_partition_eval_thresh;
740
741 // Prune extended partition search based on whether the split/rect partitions
742 // provided an improvement in the previous search.
743 // 0 : no pruning
744 // 1 : prune 1:4 partition search using winner info from split partitions
745 // 2 : prune 1:4 and AB partition search using split and HORZ/VERT info
746 int prune_ext_part_using_split_info;
747
748 // Prunt rectangular, AB and 4-way partition based on q index and block size
749 // 0 : no pruning
750 // 1 : prune sub_8x8 at very low quantizers
751 // 2 : prune all block size based on qindex
752 int prune_rectangular_split_based_on_qidx;
753
754 // Prune rectangular partitions based on 4x4 sub-block variance
755 // false : no pruning
756 // true : prune rectangular partitions based on 4x4 sub-block variance
757 // deviation
758 //
759 // For allintra encode, this speed feature reduces instruction count by 6.4%
760 // for speed=6 with coding performance change less than 0.24%. For AVIF image
761 // encode, this speed feature reduces encode time by 8.14% for speed 6 on a
762 // typical image dataset with coding performance change less than 0.16%. This
763 // speed feature is not applicable to speed >= 7.
764 bool prune_rect_part_using_4x4_var_deviation;
765
766 // Prune rectangular partitions based on prediction mode chosen by NONE
767 // partition.
768 // false : no pruning
769 // true : prunes rectangular partition as described below
770 // If prediction mode chosen by NONE partition is
771 // DC_PRED or SMOOTH_PRED: Prunes both horizontal and vertical partitions if
772 // at least one of the left and top neighbor blocks is larger than the
773 // current block.
774 // Directional Mode: Prunes either of the horizontal and vertical partition
775 // based on center angle of the prediction mode chosen by NONE partition. For
776 // example, vertical partition is pruned if center angle of the prediction
777 // mode chosen by NONE partition is close to 180 degrees (i.e. horizontal
778 // direction) and vice versa.
779 // For allintra encode, this speed feature reduces instruction count by 5.1%
780 // for speed=6 with coding performance change less than 0.22%. For AVIF image
781 // encode, this speed feature reduces encode time by 4.44% for speed 6 on a
782 // typical image dataset with coding performance change less than 0.15%.
783 // For speed >= 7, variance-based logic is used to determine the partition
784 // structure instead of recursive partition search. Therefore, this speed
785 // feature is not applicable in such cases.
786 bool prune_rect_part_using_none_pred_mode;
787
788 // Terminate partition search for child partition,
789 // when NONE and SPLIT partition rd_costs are INT64_MAX.
790 int early_term_after_none_split;
791
792 // Level used to adjust threshold for av1_ml_predict_breakout(). At lower
793 // levels, more conservative threshold is used, and value of 0 indicates
794 // av1_ml_predict_breakout() is disabled. Value of 3 corresponds to default
795 // case with no adjustment to lbd thresholds.
796 int ml_predict_breakout_level;
797
798 // Prune sub_8x8 (BLOCK_4X4, BLOCK_4X8 and BLOCK_8X4) partitions.
799 // 0 : no pruning
800 // 1 : pruning based on neighbour block information
801 // 2 : prune always
802 int prune_sub_8x8_partition_level;
803
804 // Prune rectangular split based on simple motion search split/no_split score.
805 // 0: disable pruning, 1: enable pruning
806 int simple_motion_search_rect_split;
807
808 // The current encoder adopts a DFS search for block partitions.
809 // Therefore the mode selection and associated rdcost is ready for smaller
810 // blocks before the mode selection for some partition types.
811 // AB partition could use previous rd information and skip mode search.
812 // An example is:
813 //
814 // current block
815 // +---+---+
816 // | |
817 // + +
818 // | |
819 // +-------+
820 //
821 // SPLIT partition has been searched first before trying HORZ_A
822 // +---+---+
823 // | R | R |
824 // +---+---+
825 // | R | R |
826 // +---+---+
827 //
828 // HORZ_A
829 // +---+---+
830 // | | |
831 // +---+---+
832 // | |
833 // +-------+
834 //
835 // With this speed feature, the top two sub blocks can directly use rdcost
836 // searched in split partition, and the mode info is also copied from
837 // saved info. Similarly, the bottom rectangular block can also use
838 // the available information from previous rectangular search.
839 int reuse_prev_rd_results_for_part_ab;
840
841 // Reuse the best prediction modes found in PARTITION_SPLIT and PARTITION_RECT
842 // when encoding PARTITION_AB.
843 int reuse_best_prediction_for_part_ab;
844
845 // The current partition search records the best rdcost so far and uses it
846 // in mode search and transform search to early skip when some criteria is
847 // met. For example, when the current rdcost is larger than the best rdcost,
848 // or the model rdcost is larger than the best rdcost times some thresholds.
849 // By default, this feature is turned on to speed up the encoder partition
850 // search.
851 // If disabling it, at speed 0, 30 frames, we could get
852 // about -0.25% quality gain (psnr, ssim, vmaf), with about 13% slowdown.
853 int use_best_rd_for_pruning;
854
855 // Skip evaluation of non-square partitions based on the corresponding NONE
856 // partition.
857 // 0: no pruning
858 // 1: prune extended partitions if NONE is skippable
859 // 2: on top of 1, prune rectangular partitions if NONE is inter, not a newmv
860 // mode and skippable
861 int skip_non_sq_part_based_on_none;
862
863 // Disables 8x8 and below partitions for low quantizers.
864 int disable_8x8_part_based_on_qidx;
865
866 // Disables either of PARTITION_HORZ_4 or PARTITION_VERT_4 using SSE from
867 // simple motion search.
868 bool prune_h_or_v_4part_using_sms_info;
869
870 // Decoder side speed feature to add penalty for use of smaller partitions.
871 // Takes values 0 - 2, 0 indicating no penalty and higher level indicating
872 // increased penalty.
873 int split_partition_penalty_level;
874} PARTITION_SPEED_FEATURES;
875
876typedef struct MV_SPEED_FEATURES {
877 // Motion search method (Diamond, NSTEP, Hex, Big Diamond, Square, etc).
878 SEARCH_METHODS search_method;
879
880 // Enable the use of faster, less accurate mv search method
881 // 0: Disable
882 // 1 - 3: Disable for larger bsize
883 // 4: Based on bsize, SAD and qp
884 // TODO(chiyotsai@google.com): Take the clip's resolution and mv activity into
885 // account.
886 int use_bsize_dependent_search_method;
887
888 // If this is set to 1, we limit the motion search range to 2 times the
889 // largest motion vector found in the last frame.
890 int auto_mv_step_size;
891
892 // Subpel_search_method can only be subpel_tree which does a subpixel
893 // logarithmic search that keeps stepping at 1/2 pixel units until
894 // you stop getting a gain, and then goes on to 1/4 and repeats
895 // the same process. Along the way it skips many diagonals.
896 SUBPEL_SEARCH_METHOD subpel_search_method;
897
898 // Maximum number of steps in logarithmic subpel search before giving up.
899 int subpel_iters_per_step;
900
901 // When to stop subpel search.
902 SUBPEL_FORCE_STOP subpel_force_stop;
903
904 // When to stop subpel search in simple motion search.
905 SUBPEL_FORCE_STOP simple_motion_subpel_force_stop;
906
907 // If true, sub-pixel search uses the exact convolve function used for final
908 // encoding and decoding; otherwise, it uses bilinear interpolation.
909 SUBPEL_SEARCH_TYPE use_accurate_subpel_search;
910
911 // Threshold for allowing exhaustive motion search.
912 int exhaustive_searches_thresh;
913
914 // Pattern to be used for any exhaustive mesh searches (except intraBC ME).
915 MESH_PATTERN mesh_patterns[MAX_MESH_STEP];
916
917 // Pattern to be used for exhaustive mesh searches of intraBC ME.
918 MESH_PATTERN intrabc_mesh_patterns[MAX_MESH_STEP];
919
920 // Reduce single motion search range based on MV result of prior ref_mv_idx.
921 int reduce_search_range;
922
923 // Prune mesh search.
924 PRUNE_MESH_SEARCH_LEVEL prune_mesh_search;
925
926 // Use the rd cost around the best FULLPEL_MV to speed up subpel search
927 int use_fullpel_costlist;
928
929 // Set the full pixel search level of obmc
930 // 0: obmc_full_pixel_diamond
931 // 1: obmc_refining_search_sad (faster)
932 int obmc_full_pixel_search_level;
933
934 // Accurate full pixel motion search based on TPL stats.
935 int full_pixel_search_level;
936
937 // Allow intrabc motion search
938 int use_intrabc;
939
940 // Prune intrabc candidate block hash search
941 // 0: check every block hash candidate
942 // 1: check the first 64 block hash candidates only
943 int prune_intrabc_candidate_block_hash_search;
944
945 // Intrabc search level
946 // 0: top + left search, all block sizes, always hash plus pixel search
947 // 1: top search only, 4x4, 8x8 and 16x16 block sizes only, perform pixel
948 // search if and only if hash search failed to find a candidate
949 int intrabc_search_level;
950
951 // Whether the maximum intrabc block size to hash is 8x8
952 // 0: Hash from 4x4 up to superblock size
953 // 1: Hash 4x4 and 8x8 only
954 int hash_max_8x8_intrabc_blocks;
955
956 // Whether to downsample the rows in sad calculation during motion search.
957 // This is only active when there are at least 16 rows. When this sf is
958 // active, if there is a large discrepancy in the SAD values for the final
959 // motion vector between skipping vs not skipping, motion search is redone
960 // with skip row features off.
961 // 0: Disabled (do not downsample rows)
962 // 1: Skip SAD calculation of odd rows if the SAD deviation of the even and
963 // odd rows for the starting MV is small. Redo motion search with sf off
964 // when SAD deviation is high for the final motion vector.
965 // 2: Skip SAD calculation of odd rows. SAD deviation is not tested for the
966 // start MV and tested only for the final MV.
967 int use_downsampled_sad;
968
969 // Enable/disable extensive joint motion search.
970 int disable_extensive_joint_motion_search;
971
972 // Enable second best mv check in joint mv search.
973 // 0: allow second MV (use rd cost as the metric)
974 // 1: use var as the metric
975 // 2: disable second MV
976 int disable_second_mv;
977
978 // Skips full pixel search based on closeness of start mv and ref mv
979 // of previous search.
980 // 0: Disabled
981 // 1: Skips the full pixel search upto 4 neighbor full-pel start MV and ref MV
982 // positions.
983 // 2: Skips the full pixel search upto 8 neighbor full-pel start MV and ref MV
984 // positions.
985 int skip_fullpel_search_using_startmv_refmv;
986
987 // Method to use for refining WARPED_CAUSAL motion vectors
988 // TODO(rachelbarker): Can this be unified with OBMC in some way?
989 WARP_SEARCH_METHOD warp_search_method;
990
991 // Maximum number of iterations in WARPED_CAUSAL refinement search
992 int warp_search_iters;
993} MV_SPEED_FEATURES;
994
995typedef struct INTER_MODE_SPEED_FEATURES {
996 // 2-pass inter mode model estimation where the preliminary pass skips
997 // transform search and uses a model to estimate rd, while the final pass
998 // computes the full transform search. Two types of models are supported:
999 // 0: not used
1000 // 1: used with online dynamic rd model
1001 // 2: used with static rd model
1002 int inter_mode_rd_model_estimation;
1003
1004 // Bypass transform search based on skip rd at following stages
1005 // i. Compound type mode search
1006 // ii. Motion mode search (mode evaluation and winner motion mode stage)
1007 // iii. Transform search for best inter candidates
1008 int txfm_rd_gate_level[TX_SEARCH_CASES];
1009
1010 // Limit the inter mode tested in the RD loop
1011 int reduce_inter_modes;
1012
1013 // This variable is used to cap the maximum number of times we skip testing a
1014 // mode to be evaluated. A high value means we will be faster.
1015 int adaptive_rd_thresh;
1016
1017 // Aggressively prune inter modes when best mode is skippable.
1018 int prune_inter_modes_if_skippable;
1019
1020 // Drop less likely to be picked reference frames in the RD search.
1021 // Has seven levels for now: 0, 1, 2, 3, 4, 5 and 6 where higher levels prune
1022 // more aggressively than lower ones. (0 means no pruning).
1023 int selective_ref_frame;
1024
1025 // Prune reference frames for rectangular partitions.
1026 // 0 implies no pruning
1027 // 1 implies prune for extended partition
1028 // 2 implies prune horiz, vert and extended partition
1029 int prune_ref_frame_for_rect_partitions;
1030
1031 // Prune inter modes w.r.t past reference frames
1032 // 0 no pruning
1033 // 1 prune inter modes w.r.t ALTREF2 and ALTREF reference frames
1034 // 2 prune inter modes w.r.t BWDREF, ALTREF2 and ALTREF reference frames
1035 int alt_ref_search_fp;
1036
1037 // Prune reference frames for single prediction modes based on temporal
1038 // distance and pred MV SAD. Feasible values are 0-4. The feature is
1039 // disabled for 0. An increasing value indicates more aggressive pruning
1040 // threshold.
1041 int prune_single_ref;
1042
1043 // Prune compound reference frames
1044 // 0 no pruning
1045 // 1 prune based on temporal distance and pred_mv_sad. However, disallow
1046 // pruning of important reference frame pairs decided based on temporal
1047 // distance and quality.
1048 // 2 prune compound references which do not satisfy the two conditions:
1049 // a) The references are at a nearest distance from the current frame in
1050 // both past and future direction.
1051 // b) The references have minimum pred_mv_sad in both past and future
1052 // direction.
1053 // 3 prune compound references except the one with nearest distance from the
1054 // current frame in both past and future direction.
1055 int prune_comp_ref_frames;
1056
1057 // Skip the current ref_mv in NEW_MV mode based on mv, rate cost, etc.
1058 // This speed feature equaling 0 means no skipping.
1059 // If the speed feature equals 1 or 2, skip the current ref_mv in NEW_MV mode
1060 // if we have already encountered ref_mv in the drl such that:
1061 // 1. The other drl has the same mv during the SIMPLE_TRANSLATION search
1062 // process as the current mv.
1063 // 2. The rate needed to encode the current mv is larger than that for the
1064 // other ref_mv.
1065 // The speed feature equaling 1 means using subpel mv in the comparison.
1066 // The speed feature equaling 2 means using fullpel mv in the comparison.
1067 // If the speed feature >= 3, skip the current ref_mv in NEW_MV mode based on
1068 // known full_mv bestsme and drl cost.
1069 int skip_newmv_in_drl;
1070
1071 // This speed feature checks duplicate ref MVs among NEARESTMV, NEARMV,
1072 // GLOBALMV and skips NEARMV or GLOBALMV (in order) if a duplicate is found
1073 // TODO(any): Instead of skipping repeated ref mv, use the recalculated
1074 // rd-cost based on mode rate and skip the mode evaluation
1075 int skip_repeated_ref_mv;
1076
1077 // Flag used to control the ref_best_rd based gating for chroma
1078 int perform_best_rd_based_gating_for_chroma;
1079
1080 // Reuse the inter_intra_mode search result from NEARESTMV mode to other
1081 // single ref modes
1082 int reuse_inter_intra_mode;
1083
1084 // prune wedge and compound segment approximate rd evaluation based on
1085 // compound average modeled rd
1086 int prune_comp_type_by_model_rd;
1087
1088 // prune wedge and compound segment approximate rd evaluation based on
1089 // compound average rd/ref_best_rd
1090 int prune_comp_type_by_comp_avg;
1091
1092 // Skip some ref frames in compound motion search by single motion search
1093 // result. Has three levels for now: 0 referring to no skipping, and 1 - 3
1094 // increasing aggressiveness of skipping in order.
1095 // Note: The search order might affect the result. It assumes that the single
1096 // reference modes are searched before compound modes. It is better to search
1097 // same single inter mode as a group.
1098 int prune_comp_search_by_single_result;
1099
1100 // Instead of performing a full MV search, do a simple translation first
1101 // and only perform a full MV search on the motion vectors that performed
1102 // well.
1103 int prune_mode_search_simple_translation;
1104
1105 // Only search compound modes with at least one "good" reference frame.
1106 // A reference frame is good if, after looking at its performance among
1107 // the single reference modes, it is one of the two best performers.
1108 int prune_compound_using_single_ref;
1109
1110 // Skip extended compound mode (NEAREST_NEWMV, NEW_NEARESTMV, NEAR_NEWMV,
1111 // NEW_NEARMV) using ref frames of above and left neighbor
1112 // blocks.
1113 // 0 : no pruning
1114 // 1 : prune ext compound modes using neighbor blocks (less aggressiveness)
1115 // 2 : prune ext compound modes using neighbor blocks (high aggressiveness)
1116 // 3 : prune ext compound modes unconditionally (highest aggressiveness)
1117 int prune_ext_comp_using_neighbors;
1118
1119 // Skip NEW_NEARMV and NEAR_NEWMV extended compound modes
1120 int skip_ext_comp_nearmv_mode;
1121
1122 // Skip extended compound mode when ref frame corresponding to NEWMV does not
1123 // have NEWMV as single mode winner.
1124 // 0 : no pruning
1125 // 1 : prune extended compound mode (less aggressiveness)
1126 // 2 : prune extended compound mode (high aggressiveness)
1127 int prune_comp_using_best_single_mode_ref;
1128
1129 // Skip NEARESTMV and NEARMV using weight computed in ref mv list population
1130 //
1131 // Pruning is enabled only when both the top and left neighbor blocks are
1132 // available and when the current block already has a valid inter prediction.
1133 int prune_nearest_near_mv_using_refmv_weight;
1134
1135 // Based on previous ref_mv_idx search result, prune the following search.
1136 int prune_ref_mv_idx_search;
1137
1138 // Disable one sided compound modes.
1139 int disable_onesided_comp;
1140
1141 // Prune obmc search using previous frame stats.
1142 // INT_MAX : disable obmc search
1143 int prune_obmc_prob_thresh;
1144
1145 // Prune warped motion search using previous frame stats.
1146 int prune_warped_prob_thresh;
1147
1148 // Variance threshold to enable/disable Interintra wedge search
1149 unsigned int disable_interintra_wedge_var_thresh;
1150
1151 // Variance threshold to enable/disable Interinter wedge search
1152 unsigned int disable_interinter_wedge_var_thresh;
1153
1154 // De-couple wedge and mode search during interintra RDO.
1155 int fast_interintra_wedge_search;
1156
1157 // Whether fast wedge sign estimate is used
1158 int fast_wedge_sign_estimate;
1159
1160 // Enable/disable ME for interinter wedge search.
1161 int disable_interinter_wedge_newmv_search;
1162
1163 // Decide when and how to use joint_comp.
1164 DIST_WTD_COMP_FLAG use_dist_wtd_comp_flag;
1165
1166 // Clip the frequency of updating the mv cost.
1167 INTERNAL_COST_UPDATE_TYPE mv_cost_upd_level;
1168
1169 // Clip the frequency of updating the coeff cost.
1170 INTERNAL_COST_UPDATE_TYPE coeff_cost_upd_level;
1171
1172 // Clip the frequency of updating the mode cost.
1173 INTERNAL_COST_UPDATE_TYPE mode_cost_upd_level;
1174
1175 // Prune inter modes based on tpl stats
1176 // 0 : no pruning
1177 // 1 : Allow pruning of LAST2 frame
1178 // 2 - 4: Allow pruning of all reference frames with increased aggressiveness
1179 // of pruning in order
1180 int prune_inter_modes_based_on_tpl;
1181
1182 // Skip NEARMV and NEAR_NEARMV modes using ref frames of above and left
1183 // neighbor blocks and qindex.
1184 PRUNE_NEARMV_LEVEL prune_nearmv_using_neighbors;
1185
1186 // Model based breakout after interpolation filter search
1187 // 0: no breakout
1188 // 1: use model based rd breakout
1189 int model_based_post_interp_filter_breakout;
1190
1191 // Reuse compound type rd decision when exact match is found
1192 // 0: No reuse
1193 // 1: Reuse the compound type decision
1194 int reuse_compound_type_decision;
1195
1196 // Enable/disable masked compound.
1197 int disable_masked_comp;
1198
1199 // Enable/disable MV refinement for compound modes corresponds to compound
1200 // types COMPOUND_AVERAGE, COMPOUND_DISTWTD (currently, this compound type
1201 // is disabled for speeds >= 2 using the sf 'use_dist_wtd_comp_flag') and
1202 // COMPOUND_DIFFWTD based on the availability. Levels 0 to 3 indicate
1203 // increasing order of aggressiveness to disable MV refinement.
1204 // 0: MV Refinement is enabled and for NEW_NEWMV mode used two iterations of
1205 // refinement in av1_joint_motion_search().
1206 // 1: MV Refinement is disabled for COMPOUND_DIFFWTD and enabled for
1207 // COMPOUND_AVERAGE & COMPOUND_DISTWTD.
1208 // 2: MV Refinement is enabled for COMPOUND_AVERAGE & COMPOUND_DISTWTD for
1209 // NEW_NEWMV mode with one iteration of refinement in
1210 // av1_joint_motion_search() and MV Refinement is disabled for other compound
1211 // type modes.
1212 // 3: MV Refinement is disabled.
1213 int enable_fast_compound_mode_search;
1214
1215 // Reuse masked compound type search results
1216 int reuse_mask_search_results;
1217
1218 // Enable/disable fast search for wedge masks
1219 int enable_fast_wedge_mask_search;
1220
1221 // Early breakout from transform search of inter modes
1222 int inter_mode_txfm_breakout;
1223
1224 // Limit number of inter modes for txfm search if a newmv mode gets
1225 // evaluated among the top modes.
1226 // 0: no pruning
1227 // 1 to 3 indicate increasing order of aggressiveness
1228 int limit_inter_mode_cands;
1229
1230 // Cap the no. of txfm searches for a given prediction mode.
1231 // 0: no cap, 1: cap beyond first 4 searches, 2: cap beyond first 3 searches.
1232 int limit_txfm_eval_per_mode;
1233
1234 // Prune warped motion search based on block size.
1235 int extra_prune_warped;
1236
1237 // Do not search compound modes for ARF.
1238 // The intuition is that ARF is predicted by frames far away from it,
1239 // whose temporal correlations with the ARF are likely low.
1240 // It is therefore likely that compound modes do not work as well for ARF
1241 // as other inter frames.
1242 // Speed/quality impact:
1243 // Speed 1: 12% faster, 0.1% psnr loss.
1244 // Speed 2: 2% faster, 0.05% psnr loss.
1245 // No change for speed 3 and up, because |disable_onesided_comp| is true.
1246 int skip_arf_compound;
1247
1248 // Percentage of scaling used to increase the rd cost of warp mode so that
1249 // encoder decisions are biased against local warp, favoring low complexity
1250 // modes.
1251 float bias_warp_mode_rd_scale_pct;
1252
1253 // Percentage of scaling used to increase the rd cost of obmc motion mode so
1254 // that encoder decisions are biased against local obmc, favoring low
1255 // complexity modes.
1256 float bias_obmc_mode_rd_scale_pct;
1257
1258 // Percentage of scaling used to increase the rd cost of GLOBALMV and
1259 // GLOBAL_GLOBALMV modes of type ROTZOOM so that encoder decisions are biased
1260 // against these modes, favoring low complexity modes.
1261 float bias_gm_mode_rd_scale_pct;
1262
1263 // Avoid further evaluation of compound modes using top estimate RD Costs of
1264 // compound average.
1265 // Values are 0 (not used),1 - 3 with progressively increasing
1266 // aggressiveness, i.e., decreasing number of top candidates.
1267 int skip_cmp_using_top_cmp_avg_est_rd_lvl;
1268
1269 // Skip interinter wedge search based on MSE between the two predictors.
1270 int skip_interinter_wedge_search_based_on_mse;
1271
1272 // Enable/disable model RD based fast compound wedge mask search.
1273 int enable_comp_wedge_search_using_model_rd;
1274} INTER_MODE_SPEED_FEATURES;
1275
1276typedef struct INTERP_FILTER_SPEED_FEATURES {
1277 // Do limited interpolation filter search for dual filters, since best choice
1278 // usually includes EIGHTTAP_REGULAR.
1279 int use_fast_interpolation_filter_search;
1280
1281 // Disable dual filter
1282 int disable_dual_filter;
1283
1284 // Save results of av1_interpolation_filter_search for a block
1285 // Check mv and ref_frames before search, if they are very close with previous
1286 // saved results, filter search can be skipped.
1287 int use_interp_filter;
1288
1289 // skip sharp_filter evaluation based on regular and smooth filter rd for
1290 // dual_filter=0 case
1291 int skip_sharp_interp_filter_search;
1292
1293 // skip interpolation filter search for a block in chessboard pattern
1294 int cb_pred_filter_search;
1295
1296 // adaptive interp_filter search to allow skip of certain filter types.
1297 int adaptive_interp_filter_search;
1298
1299 // Forces interpolation filter to EIGHTTAP_REGULAR and skips interpolation
1300 // filter search.
1301 int skip_interp_filter_search;
1302
1303 // Bias towards sharp filter
1304 int use_more_sharp_interp;
1305
1306 // Skip model RD evaluation of chroma planes during interpolation filter
1307 // search.
1308 int skip_model_rd_uv;
1309} INTERP_FILTER_SPEED_FEATURES;
1310
1311typedef struct INTRA_MODE_SPEED_FEATURES {
1312 // These bit masks allow you to enable or disable intra modes for each
1313 // transform size separately.
1314 int intra_y_mode_mask[TX_SIZES];
1315 int intra_uv_mode_mask[TX_SIZES];
1316
1317 // flag to allow skipping intra mode for inter frame prediction
1318 int skip_intra_in_interframe;
1319
1320 // Prune intra mode candidates based on source block histogram of gradient.
1321 // Applies to luma plane only.
1322 // Feasible values are 0..4. The feature is disabled for 0. An increasing
1323 // value indicates more aggressive pruning threshold.
1324 int intra_pruning_with_hog;
1325
1326 // Prune intra mode candidates based on source block histogram of gradient.
1327 // Applies to chroma plane only.
1328 // Feasible values are 0..4. The feature is disabled for 0. An increasing
1329 // value indicates more aggressive pruning threshold.
1330 int chroma_intra_pruning_with_hog;
1331
1332 // Enable/disable smooth intra modes.
1333 int disable_smooth_intra;
1334
1335 // Prune UV_SMOOTH_PRED mode for chroma based on chroma source variance.
1336 // false : No pruning
1337 // true : Prune UV_SMOOTH_PRED mode based on chroma source variance
1338 //
1339 // For allintra encode, this speed feature reduces instruction count
1340 // by 1.90%, 2.21% and 1.97% for speed 6, 7 and 8 with coding performance
1341 // change less than 0.04%. For AVIF image encode, this speed feature reduces
1342 // encode time by 1.56%, 2.14% and 0.90% for speed 6, 7 and 8 on a typical
1343 // image dataset with coding performance change less than 0.05%.
1344 bool prune_smooth_intra_mode_for_chroma;
1345
1346 // Prune filter intra modes in intra frames.
1347 // 0 : No pruning
1348 // 1 : Evaluate applicable filter intra modes based on best intra mode so far
1349 // 2 : Do not evaluate filter intra modes
1350 int prune_filter_intra_level;
1351
1352 // prune palette search
1353 // 0: No pruning
1354 // 1: Perform coarse search to prune the palette colors. For winner colors,
1355 // neighbors are also evaluated using a finer search.
1356 // 2: Perform 2 way palette search from max colors to min colors (and min
1357 // colors to remaining colors) and terminate the search if current number of
1358 // palette colors is not the winner.
1359 int prune_palette_search_level;
1360
1361 // Terminate early in luma palette_size search. Speed feature values indicate
1362 // increasing level of pruning.
1363 // 0: No early termination
1364 // 1: Terminate early for higher luma palette_size, if header rd cost of lower
1365 // palette_size is more than 2 * best_rd. This level of pruning is more
1366 // conservative when compared to sf level 2 as the cases which will get pruned
1367 // with sf level 1 is a subset of the cases which will get pruned with sf
1368 // level 2.
1369 // 2: Terminate early for higher luma palette_size, if header rd cost of lower
1370 // palette_size is more than best_rd.
1371 // For allintra encode, this sf reduces instruction count by 2.49%, 1.07%,
1372 // 2.76%, 2.30%, 1.84%, 2.69%, 2.04%, 2.05% and 1.44% for speed 0, 1, 2, 3, 4,
1373 // 5, 6, 7 and 8 on screen content set with coding performance change less
1374 // than 0.01% for speed <= 2 and less than 0.03% for speed >= 3. For AVIF
1375 // image encode, this sf reduces instruction count by 1.94%, 1.13%, 1.29%,
1376 // 0.93%, 0.89%, 1.03%, 1.07%, 1.20% and 0.18% for speed 0, 1, 2, 3, 4, 5, 6,
1377 // 7 and 8 on a typical image dataset with coding performance change less than
1378 // 0.01%.
1379 int prune_luma_palette_size_search_level;
1380
1381 // Prune chroma intra modes based on luma intra mode winner.
1382 // 0: No pruning
1383 // 1: Prune chroma intra modes other than UV_DC_PRED, UV_SMOOTH_PRED,
1384 // UV_CFL_PRED and the mode that corresponds to luma intra mode winner.
1385 int prune_chroma_modes_using_luma_winner;
1386
1387 // Clip the frequency of updating the mv cost for intrabc.
1388 INTERNAL_COST_UPDATE_TYPE dv_cost_upd_level;
1389
1390 // We use DCT_DCT transform followed by computing SATD (Sum of Absolute
1391 // Transformed Differences) as an estimation of RD score to quickly find the
1392 // best possible Chroma from Luma (CFL) parameter. Then we do a full RD search
1393 // near the best possible parameter. The search range is set here.
1394 // The range of cfl_searh_range should be [1, 33], and the following are the
1395 // recommended values.
1396 // 1: Fastest mode.
1397 // 3: Default mode that provides good speedup without losing compression
1398 // performance at speed 0.
1399 // 33: Exhaustive rd search (33 == CFL_MAGS_SIZE). This mode should only
1400 // be used for debugging purpose.
1401 int cfl_search_range;
1402
1403 // TOP_INTRA_MODEL_COUNT is 4 that is the number of top model rd to store in
1404 // intra mode decision. Here, add a speed feature to reduce this number for
1405 // higher speeds.
1406 int top_intra_model_count_allowed;
1407
1408 // Adapt top_intra_model_count_allowed locally to prune luma intra modes using
1409 // neighbor block and quantizer information.
1410 int adapt_top_model_rd_count_using_neighbors;
1411
1412 // Prune the evaluation of odd delta angles of directional luma intra modes by
1413 // using the rdcosts of neighbouring delta angles.
1414 // For allintra encode, this speed feature reduces instruction count
1415 // by 4.461%, 3.699% and 3.536% for speed 6, 7 and 8 on a typical video
1416 // dataset with coding performance change less than 0.26%. For AVIF image
1417 // encode, this speed feature reduces encode time by 2.849%, 2.471%,
1418 // and 2.051% for speed 6, 7 and 8 on a typical image dataset with coding
1419 // performance change less than 0.27%.
1420 int prune_luma_odd_delta_angles_in_intra;
1421
1422 // Terminate early in chroma palette_size search.
1423 // 0: No early termination
1424 // 1: Terminate early for higher palette_size, if header rd cost of lower
1425 // palette_size is more than best_rd.
1426 // For allintra encode, this sf reduces instruction count by 0.45%,
1427 // 0.62%, 1.73%, 2.50%, 2.89%, 3.09% and 3.86% for speed 0 to 6 on screen
1428 // content set with coding performance change less than 0.01%.
1429 // For AVIF image encode, this sf reduces instruction count by 0.45%, 0.81%,
1430 // 0.85%, 1.05%, 1.45%, 1.66% and 1.95% for speed 0 to 6 on a typical image
1431 // dataset with no quality drop.
1432 int early_term_chroma_palette_size_search;
1433
1434 // Skips the evaluation of filter intra modes in inter frames if rd evaluation
1435 // of luma intra dc mode results in invalid rd stats.
1436 int skip_filter_intra_in_inter_frames;
1437} INTRA_MODE_SPEED_FEATURES;
1438
1439typedef struct TX_SPEED_FEATURES {
1440 // Init search depth for square and rectangular transform partitions.
1441 // Values:
1442 // 0 - search full tree, 1: search 1 level, 2: search the highest level only
1443 int inter_tx_size_search_init_depth_sqr;
1444 int inter_tx_size_search_init_depth_rect;
1445 int intra_tx_size_search_init_depth_sqr;
1446 int intra_tx_size_search_init_depth_rect;
1447
1448 // If any dimension of a coding block size above 64, always search the
1449 // largest transform only, since the largest transform block size is 64x64.
1450 int tx_size_search_lgr_block;
1451
1452 TX_TYPE_SEARCH tx_type_search;
1453
1454 // Skip split transform block partition when the collocated bigger block
1455 // is selected as all zero coefficients.
1456 int txb_split_cap;
1457
1458 // Shortcut the transform block partition and type search when the target
1459 // rdcost is relatively lower.
1460 // Values are 0 (not used) , or 1 - 2 with progressively increasing
1461 // aggressiveness
1462 int adaptive_txb_search_level;
1463
1464 // Prune level for tx_size_type search for inter based on rd model
1465 // 0: no pruning
1466 // 1-2: progressively increasing aggressiveness of pruning
1467 int model_based_prune_tx_search_level;
1468
1469 // Refine TX type after fast TX search.
1470 int refine_fast_tx_search_results;
1471
1472 // Prune transform split/no_split eval based on residual properties. A value
1473 // of 0 indicates no pruning, and the aggressiveness of pruning progressively
1474 // increases from levels 1 to 3.
1475 int prune_tx_size_level;
1476
1477 // Prune the evaluation of transform depths as decided by the NN model.
1478 // false: No pruning.
1479 // true : Avoid the evaluation of specific transform depths using NN model.
1480 //
1481 // For allintra encode, this speed feature reduces instruction count
1482 // by 4.76%, 8.92% and 11.28% for speed 6, 7 and 8 with coding performance
1483 // change less than 0.32%. For AVIF image encode, this speed feature reduces
1484 // encode time by 4.65%, 9.16% and 10.45% for speed 6, 7 and 8 on a typical
1485 // image dataset with coding performance change less than 0.19%.
1486 bool prune_intra_tx_depths_using_nn;
1487
1488 // Enable/disable early breakout during transform search of intra modes, by
1489 // using the minimum rd cost possible. By using this approach, the rd
1490 // evaluation of applicable transform blocks (in the current block) can be
1491 // avoided as
1492 // 1) best_rd evolves during the search in choose_tx_size_type_from_rd()
1493 // 2) appropriate ref_best_rd is passed in intra_block_yrd()
1494 //
1495 // For allintra encode, this speed feature reduces instruction count
1496 // by 1.11%, 1.08%, 1.02% and 0.93% for speed 3, 6, 7 and 8 with coding
1497 // performance change less than 0.02%. For AVIF image encode, this speed
1498 // feature reduces encode time by 0.93%, 1.46%, 1.07%, 0.84%, 0.99% and 0.73%
1499 // for speed 3, 4, 5, 6, 7 and 8 on a typical image dataset with coding
1500 // performance change less than 0.004%.
1501 bool use_rd_based_breakout_for_intra_tx_search;
1502
1503 // Prune RD evaluation of transform split using RD Costs of transform no-split
1504 // of inter modes that are evaluated so far.
1505 // Values are 0 (not used), 1 - 2 with progressively increasing
1506 // aggressiveness, i.e., decreasing number of top candidates
1507 int prune_inter_tx_split_rd_eval_lvl;
1508
1509 // If 1, use a trellis rd multiplier that favors chroma plane more.
1510 int use_chroma_trellis_rd_mult;
1511} TX_SPEED_FEATURES;
1512
1513typedef struct RD_CALC_SPEED_FEATURES {
1514 // Fast approximation of av1_model_rd_from_var_lapndz
1515 int simple_model_rd_from_var;
1516
1517 // Perform faster distortion computation during the R-D evaluation by trying
1518 // to approximate the prediction error with transform coefficients (faster but
1519 // less accurate) rather than computing distortion in the pixel domain (slower
1520 // but more accurate). The following methods are used for distortion
1521 // computation:
1522 // Method 0: Always compute distortion in the pixel domain
1523 // Method 1: Based on block error, try using transform domain distortion for
1524 // tx_type search and compute distortion in pixel domain for final RD_STATS
1525 // Method 2: Based on block error, try to compute distortion in transform
1526 // domain
1527 // Methods 1 and 2 may fallback to computing distortion in the pixel domain in
1528 // case the block error is less than the threshold, which is controlled by the
1529 // speed feature tx_domain_dist_thres_level.
1530 //
1531 // The speed feature tx_domain_dist_level decides which of the above methods
1532 // needs to be used across different mode evaluation stages as described
1533 // below:
1534 // Eval type: Default Mode Winner
1535 // Level 0 : Method 0 Method 2 Method 0
1536 // Level 1 : Method 1 Method 2 Method 0
1537 // Level 2 : Method 2 Method 2 Method 0
1538 // Level 3 : Method 2 Method 2 Method 2
1539 int tx_domain_dist_level;
1540
1541 // Transform domain distortion threshold level
1542 int tx_domain_dist_thres_level;
1543
1544 // Trellis (dynamic programming) optimization of quantized values
1545 TRELLIS_OPT_TYPE optimize_coefficients;
1546
1547 // Use hash table to store macroblock RD search results
1548 // to avoid repeated search on the same residue signal.
1549 int use_mb_rd_hash;
1550
1551 // Flag used to control the extent of coeff R-D optimization
1552 int perform_coeff_opt;
1553} RD_CALC_SPEED_FEATURES;
1554
1555typedef struct WINNER_MODE_SPEED_FEATURES {
1556 // Flag used to control the winner mode processing for better R-D optimization
1557 // of quantized coeffs
1558 int enable_winner_mode_for_coeff_opt;
1559
1560 // Flag used to control the winner mode processing for transform size
1561 // search method
1562 int enable_winner_mode_for_tx_size_srch;
1563
1564 // Control transform size search level
1565 // Eval type: Default Mode Winner
1566 // Level 0 : FULL RD LARGEST ALL FULL RD
1567 // Level 1 : FAST RD LARGEST ALL FULL RD
1568 // Level 2 : LARGEST ALL LARGEST ALL FULL RD
1569 // Level 3 : LARGEST ALL LARGEST ALL LARGEST ALL
1570 int tx_size_search_level;
1571
1572 // Flag used to control the winner mode processing for use transform
1573 // domain distortion
1574 int enable_winner_mode_for_use_tx_domain_dist;
1575
1576 // Flag used to enable processing of multiple winner modes
1577 MULTI_WINNER_MODE_TYPE multi_winner_mode_type;
1578
1579 // Motion mode for winner candidates:
1580 // 0: speed feature OFF
1581 // 1 / 2 : Use configured number of winner candidates
1582 int motion_mode_for_winner_cand;
1583
1584 // Controls the prediction of transform skip block or DC only block.
1585 //
1586 // Different speed feature values (0 to 3) decide the aggressiveness of
1587 // prediction (refer to predict_dc_levels[][] in speed_features.c) to be used
1588 // during different mode evaluation stages.
1589 int dc_blk_pred_level;
1590
1591 // If on, disables interpolation filter search in handle_inter_mode loop, and
1592 // performs it during winner mode processing by \ref
1593 // tx_search_best_inter_candidates.
1594 int winner_mode_ifs;
1595
1596 // Controls the disabling of winner mode processing. Speed feature levels
1597 // are ordered in increasing aggressiveness of pruning. The method considered
1598 // for disabling, depends on the sf level value and it is described as below.
1599 // 0: Do not disable
1600 // 1: Disable for blocks with low source variance.
1601 // 2: Disable for blocks which turn out to be transform skip (skipped based on
1602 // eob) during MODE_EVAL stage except NEWMV mode.
1603 // 3: Disable for blocks which turn out to be transform skip during MODE_EVAL
1604 // stage except NEWMV mode. For high quantizers, prune conservatively based on
1605 // transform skip (skipped based on eob) except for NEWMV mode.
1606 // 4: Disable for blocks which turn out to be transform skip during MODE_EVAL
1607 // stage.
1608 int prune_winner_mode_eval_level;
1609} WINNER_MODE_SPEED_FEATURES;
1610
1611typedef struct LOOP_FILTER_SPEED_FEATURES {
1612 // This feature controls how the loop filter level is determined.
1613 LPF_PICK_METHOD lpf_pick;
1614
1615 // Skip some final iterations in the determination of the best loop filter
1616 // level.
1617 int use_coarse_filter_level_search;
1618
1619 // Reset luma filter levels to zero based on minimum filter levels of
1620 // reference frames and current frame's pyramid level.
1621 int adaptive_luma_loop_filter_skip;
1622
1623 // Reset luma filter levels to zero when the percentage of SSE difference
1624 // between the unfiltered and filtered versions of the current frame is below
1625 // a threshold.
1626 int skip_loop_filter_using_filt_error;
1627
1628 // Control how the CDEF strength is determined.
1629 CDEF_PICK_METHOD cdef_pick_method;
1630
1631 // Decoder side speed feature for adaptive CDEF with strength reduction.
1632 // Zero out values with low CDEF strengths (luma and/or chroma). This is
1633 // done as CDEF is a relatively-expensive filter to compute during decode.
1634 // This speed feature is only enabled in all intra mode.
1635 bool zero_low_cdef_strengths;
1636
1637 // Decoder side speed feature for adaptive CDEF control based on MSE
1638 // 0 : Enable CDEF for all planes
1639 // 1 : Disable CDEF for chroma planes and disable for luma adaptively based on
1640 // current frame's pyramid level and improvement in MSE after CDEF
1641 // filtering.
1642 int adaptive_cdef_mode;
1643
1644 // Decoder side speed feature to add penalty for use of dual-sgr filters.
1645 // Takes values 0 - 10, 0 indicating no penalty and each additional level
1646 // adding a penalty of 1%
1647 int dual_sgr_penalty_level;
1648
1649 // Restricts loop restoration to RESTORE_SWITCHABLE by skipping RD cost
1650 // comparisons for RESTORE_WIENER and RESTORE_SGRPROJ. Also applies a bias
1651 // during switchable restoration search: each level adds a 0.5% penalty to
1652 // Wiener and SGR selection.
1653 // 0 : No restriction or bias (all restoration types allowed)
1654 // 1+: Skip WIENER/SGRPROJ and apply (level x 0.5%) penalty in
1655 // search_switchable()
1656 int switchable_lr_with_bias_level;
1657
1658 // Enable fast search in self guided restoration
1659 // 0 : Search over all 16 SGR projection parameters listed
1660 // in av1_sgr_params[SGRPROJ_PARAMS].
1661 // 1 : Approximate search using binary search like mechanism,
1662 // a total of 8 SGR projection parameters are searched.
1663 // 2 : Search only 'ep' values in
1664 // sgproj_ep_grp1_seed[SGRPROJ_EP_GRP1_SEARCH_COUNT],
1665 // a total of 4 SGR projection parameters are searched.
1666 int enable_sgr_ep_pruning;
1667
1668 // Disable loop restoration for Chroma plane
1669 int disable_loop_restoration_chroma;
1670
1671 // Disable loop restoration for luma plane
1672 int disable_loop_restoration_luma;
1673
1674 // Range of loop restoration unit sizes to search
1675 // The minimum size is clamped against the superblock size in
1676 // av1_pick_filter_restoration, so that the code which sets this value does
1677 // not need to know the superblock size ahead of time.
1678 int min_lr_unit_size;
1679 int max_lr_unit_size;
1680
1681 // Prune RESTORE_WIENER evaluation based on source variance
1682 // 0 : no pruning
1683 // 1 : conservative pruning
1684 // 2 : aggressive pruning
1685 int prune_wiener_based_on_src_var;
1686
1687 // Prune self-guided loop restoration based on wiener search results
1688 // 0 : no pruning
1689 // 1 : pruning based on rdcost ratio of RESTORE_WIENER and RESTORE_NONE
1690 // 2 : pruning based on winner restoration type among RESTORE_WIENER and
1691 // RESTORE_NONE
1692 int prune_sgr_based_on_wiener;
1693
1694 // Reduce the wiener filter win size for luma
1695 int reduce_wiener_window_size;
1696
1697 // Flag to disable Wiener Loop restoration filter.
1698 bool disable_wiener_filter;
1699
1700 // Flag to disable Self-guided Loop restoration filter.
1701 bool disable_sgr_filter;
1702
1703 // Disable the refinement search around the wiener filter coefficients.
1704 bool disable_wiener_coeff_refine_search;
1705
1706 // Whether to downsample the rows in computation of wiener stats.
1707 int use_downsampled_wiener_stats;
1708} LOOP_FILTER_SPEED_FEATURES;
1709
1710typedef struct REAL_TIME_SPEED_FEATURES {
1711 // check intra prediction for non-RD mode.
1712 int check_intra_pred_nonrd;
1713
1714 // Skip checking intra prediction.
1715 // 0 - don't skip
1716 // 1 - skip if TX is skipped and best mode is not NEWMV
1717 // 2 - skip if TX is skipped
1718 // Skipping aggressiveness increases from level 1 to 2.
1719 int skip_intra_pred;
1720
1721 // Estimate motion before calculating variance in variance-based partition
1722 // 0 - Only use zero MV
1723 // 1 - perform coarse ME
1724 // 2 - perform coarse ME, and also use neighbours' MVs
1725 // 3 - use neighbours' MVs without performing coarse ME
1726 int estimate_motion_for_var_based_partition;
1727
1728 // For nonrd_use_partition: mode of extra check of leaf partition
1729 // 0 - don't check merge
1730 // 1 - always check merge
1731 // 2 - check merge and prune checking final split
1732 // 3 - check merge and prune checking final split based on bsize and qindex
1733 int nonrd_check_partition_merge_mode;
1734
1735 // For nonrd_use_partition: check of leaf partition extra split
1736 int nonrd_check_partition_split;
1737
1738 // Implements various heuristics to skip searching modes
1739 // The heuristics selected are based on flags
1740 // defined in the MODE_SEARCH_SKIP_HEURISTICS enum
1741 unsigned int mode_search_skip_flags;
1742
1743 // For nonrd: Reduces ref frame search.
1744 // 0 - low level of search prune in non last frames
1745 // 1 - pruned search in non last frames
1746 // 2 - more pruned search in non last frames
1747 int nonrd_prune_ref_frame_search;
1748
1749 // This flag controls the use of non-RD mode decision.
1750 int use_nonrd_pick_mode;
1751
1752 // Flag that controls discounting for color map cost during palette search.
1753 // This saves about 5% of CPU and in non-RD speeds delivers better results
1754 // across rtc_screen set (on speed 10 overall BDRate growth is 13%)
1755 int discount_color_cost;
1756
1757 // Use ALTREF frame in non-RD mode decision.
1758 int use_nonrd_altref_frame;
1759
1760 // Use compound reference for non-RD mode.
1761 int use_comp_ref_nonrd;
1762
1763 // Reference frames for compound prediction for nonrd pickmode:
1764 // LAST_GOLDEN (0), LAST_LAST2 (1), or LAST_ALTREF (2).
1765 int ref_frame_comp_nonrd[3];
1766
1767 // use reduced ref set for real-time mode
1768 int use_real_time_ref_set;
1769
1770 // Skip a number of expensive mode evaluations for blocks with very low
1771 // temporal variance.
1772 int short_circuit_low_temp_var;
1773
1774 // Reuse inter prediction in fast non-rd mode.
1775 int reuse_inter_pred_nonrd;
1776
1777 // Number of best inter modes to search transform. INT_MAX - search all.
1778 int num_inter_modes_for_tx_search;
1779
1780 // Use interpolation filter search in non-RD mode decision.
1781 int use_nonrd_filter_search;
1782
1783 // Use simplified RD model for interpolation search and Intra
1784 int use_simple_rd_model;
1785
1786 // For nonrd mode: use hybrid intra mode search for intra only frames based on
1787 // block properties.
1788 // 0 : use nonrd pick intra for all blocks
1789 // 1 : use rd for bsize < 16x16, nonrd otherwise
1790 // 2 : use rd for bsize < 16x16 and src var >= 101, nonrd otherwise
1791 int hybrid_intra_pickmode;
1792
1793 // Filter blocks by certain criteria such as SAD, source variance, such that
1794 // fewer blocks will go through the palette search.
1795 // For nonrd encoding path, enable this feature reduces encoding time when
1796 // palette mode is used. Disabling it leads to better compression efficiency.
1797 // 0: off
1798 // 1: less aggressive pruning mode
1799 // 2, 3: more aggressive pruning mode
1800 int prune_palette_search_nonrd;
1801
1802 // Compute variance/sse on source difference, prior to encoding superblock.
1803 int source_metrics_sb_nonrd;
1804
1805 // Flag to indicate process for handling overshoot on slide/scene change,
1806 // for real-time CBR mode.
1807 OVERSHOOT_DETECTION_CBR overshoot_detection_cbr;
1808
1809 // Check for scene/content change detection on every frame before encoding.
1810 int check_scene_detection;
1811
1812 // For keyframes in rtc: adjust the rc_bits_per_mb, to reduce overshoot.
1813 int rc_adjust_keyframe;
1814
1815 // On scene change or keyframe: compute spatial variance.
1816 int rc_compute_spatial_var_sc_kf;
1817
1818 // For nonrd mode: Prefer larger partition blks in variance based partitioning
1819 // 0: disabled, 1-3: increasing aggressiveness
1820 int prefer_large_partition_blocks;
1821
1822 // uses results of temporal noise estimate
1823 int use_temporal_noise_estimate;
1824
1825 // Parameter indicating initial search window to be used in full-pixel search
1826 // for nonrd_pickmode. Range [0, MAX_MVSEARCH_STEPS - 1]. Lower value
1827 // indicates larger window. If set to 0, step_param is set based on internal
1828 // logic in set_mv_search_params().
1829 int fullpel_search_step_param;
1830
1831 // Bit mask to enable or disable intra modes for each prediction block size
1832 // separately, for nonrd_pickmode. Currently, the sf is not respected when
1833 // 'force_intra_check' is true in 'av1_estimate_intra_mode()' function. Also,
1834 // H and V pred modes allowed through this sf can be further pruned when
1835 //'prune_hv_pred_modes_using_src_sad' sf is true.
1836 int intra_y_mode_bsize_mask_nrd[BLOCK_SIZES];
1837
1838 // Prune H and V intra predition modes evalution in inter frame.
1839 // The sf does not have any impact.
1840 // i. when frame_source_sad is 1.1 times greater than avg_source_sad
1841 // ii. when cyclic_refresh_segment_id_boosted is enabled
1842 // iii. when SB level source sad is greater than kMedSad
1843 // iv. when color sensitivity is non zero for both the chroma channels
1844 bool prune_hv_pred_modes_using_src_sad;
1845
1846 // Skips mode checks more aggressively in nonRD mode
1847 int nonrd_aggressive_skip;
1848
1849 // Skip cdef on 64x64 blocks/
1850 // 0: disabled
1851 // 1: skip when NEWMV or INTRA is not picked or color sensitivity is off.
1852 // When color sensitivity is on for a superblock, all 64x64 blocks within
1853 // will not skip.
1854 // 2: more aggressive mode where skip is done for all frames where
1855 // rc->high_source_sad = 0 (non slide-changes), and color sensitivity off.
1856 int skip_cdef_sb;
1857
1858 // Force selective cdf update.
1859 int selective_cdf_update;
1860 // Use IntraBC for realtime mode.
1861 int rt_use_intrabc;
1862 // Prune IntraBC for nonrd pickmode.
1863 int rt_prune_intrabc_nonrd;
1864 // Fallback search mode for IntraBC on hash misses in nonrd pickmode.
1865 // 0: Full pixel search (Diamond/Hex search)
1866 // 1: Block Vector Predictor (BVP) only
1867 // 2: BVP + 12-point integer offset probe
1868 // 3: Skip fallback search entirely (Hash-only)
1869 int rt_intrabc_miss_mode;
1870
1871 // Force only single reference (LAST) for prediction.
1872 int force_only_last_ref;
1873
1874 // Forces larger partition blocks in variance based partitioning for intra
1875 // frames
1876 int force_large_partition_blocks_intra;
1877
1878 // Use fixed partition for superblocks based on source_sad.
1879 // 0: disabled
1880 // 1: enabled
1881 int use_fast_fixed_part;
1882
1883 // Increase source_sad thresholds in nonrd pickmode.
1884 int increase_source_sad_thresh;
1885
1886 // Skip evaluation of no split in tx size selection for merge partition
1887 int skip_tx_no_split_var_based_partition;
1888
1889 // Intermediate termination of newMV mode evaluation based on so far best mode
1890 // sse
1891 int skip_newmv_mode_based_on_sse;
1892
1893 // Define gf length multiplier.
1894 // Level 0: use large multiplier, level 1: use medium multiplier.
1895 int gf_length_lvl;
1896
1897 // Prune inter modes with golden frame as reference for NEARMV and NEWMV modes
1898 int prune_inter_modes_with_golden_ref;
1899
1900 // Prune inter modes w.r.t golden or alt-ref frame based on sad
1901 int prune_inter_modes_wrt_gf_arf_based_on_sad;
1902
1903 // Prune inter mode search in rd path based on current block's temporal
1904 // variance wrt LAST reference.
1905 int prune_inter_modes_using_temp_var;
1906
1907 // Reduce MV precision to halfpel for higher int MV value & frame-level motion
1908 // 0: disabled
1909 // 1-2: Reduce precision to halfpel, fullpel based on conservative
1910 // thresholds, aggressiveness increases with increase in level
1911 // 3: Reduce precision to halfpel using more aggressive thresholds
1912 int reduce_mv_pel_precision_highmotion;
1913
1914 // Reduce MV precision for low complexity blocks
1915 // 0: disabled
1916 // 1: Reduce the mv resolution for zero mv if the variance is low
1917 // 2: Switch to halfpel, fullpel based on low block spatial-temporal
1918 // complexity.
1919 int reduce_mv_pel_precision_lowcomplex;
1920
1921 // Prune intra mode evaluation in inter frames based on mv range.
1922 BLOCK_SIZE prune_intra_mode_based_on_mv_range;
1923 // The number of times to left shift the splitting thresholds in variance
1924 // based partitioning. The minimum values should be 7 to avoid left shifting
1925 // by a negative number.
1926 int var_part_split_threshold_shift;
1927
1928 // Qindex based variance partition threshold index, which determines
1929 // the aggressiveness of partition pruning
1930 // 0: disabled for speeds 9,10
1931 // 1,2: (rd-path) lowers qindex thresholds conditionally (for low SAD sb)
1932 // 3,4: (non-rd path) uses pre-tuned qindex thresholds
1933 int var_part_based_on_qidx;
1934
1935 // Enable GF refresh based on Q value.
1936 int gf_refresh_based_on_qp;
1937
1938 // Temporal filtering
1939 // The value can be 1 or 2, which indicates the threshold to use.
1940 // Must be off for lossless mode.
1941 int use_rtc_tf;
1942
1943 // Use of the identity transform in nonrd_pickmode,
1944 int use_idtx_nonrd;
1945
1946 // Prune the use of the identity transform in nonrd_pickmode:
1947 // only for smaller blocks and higher spatial variance, and when skip_txfm
1948 // is not already set.
1949 int prune_idtx_nonrd;
1950
1951 // Force to only use dct for palette search in nonrd pickmode.
1952 int dct_only_palette_nonrd;
1953
1954 // Skip loopfilter, for static content after slide change
1955 // or key frame, once quality has ramped up.
1956 // 0: disabled
1957 // 1: skip only after quality is ramped up.
1958 // 2: aggrssive mode, where skip is done for all frames that
1959 // where rc->high_source_sad = 0 (no slide-changes).
1960 int skip_lf_screen;
1961
1962 // Threshold on the active/inactive region percent to disable
1963 // the loopfilter and cdef. Setting to 100 disables this feature.
1964 int thresh_active_maps_skip_lf_cdef;
1965
1966 // For nonrd: early exit out of variance partition that sets the
1967 // block size to superblock size, and sets mode to zeromv-last skip.
1968 // 0: disabled
1969 // 1: zeromv-skip is enabled at SB level only
1970 // 2: zeromv-skip is enabled at SB level and coding block level
1971 int part_early_exit_zeromv;
1972
1973 // Early terminate inter mode search based on sse in non-rd path.
1974 INTER_SEARCH_EARLY_TERM_IDX sse_early_term_inter_search;
1975
1976 // SAD based adaptive altref selection
1977 int sad_based_adp_altref_lag;
1978
1979 // Enable/disable partition direct merging.
1980 int partition_direct_merging;
1981
1982 // Level of aggressiveness for obtaining tx size based on qstep
1983 int tx_size_level_based_on_qstep;
1984
1985 // Avoid the partitioning of a 16x16 block in variance based partitioning
1986 // (VBP) by making use of minimum and maximum sub-block variances.
1987 // For allintra encode, this speed feature reduces instruction count by 5.39%
1988 // for speed 9 on a typical video dataset with coding performance gain
1989 // of 1.44%.
1990 // For AVIF image encode, this speed feature reduces encode time
1991 // by 8.44% for speed 9 on a typical image dataset with coding performance
1992 // gain of 0.78%.
1993 bool vbp_prune_16x16_split_using_min_max_sub_blk_var;
1994
1995 // A qindex threshold that determines whether to use qindex based CDEF filter
1996 // strength estimation for screen content types. The strength estimation model
1997 // used for screen contents prefers to allow cdef filtering for more frames.
1998 // This sf is used to limit the frames which go through cdef filtering and
1999 // following explains the setting of the same.
2000 // MAXQ (255): This disables the usage of this sf. Here, frame does not use a
2001 // screen content model thus reduces the number of frames that go through cdef
2002 // filtering.
2003 // MINQ (0): Frames always use screen content model thus increasing the number
2004 // of frames that go through cdef filtering.
2005 // This speed feature has a substantial gain on coding metrics, with moderate
2006 // increase encoding time. Select threshold based on speed vs quality
2007 // trade-off.
2008 int screen_content_cdef_filter_qindex_thresh;
2009
2010 // Prune compound mode if its variance is higher than the variance of single
2011 // modes.
2012 bool prune_compoundmode_with_singlecompound_var;
2013
2014 // Allow mode cost update at frame level every couple frames. This
2015 // overrides the command line setting --mode-cost-upd-freq=3 (never update
2016 // except on key frame and first delta).
2017 bool frame_level_mode_cost_update;
2018
2019 // Prune H_PRED during intra mode evaluation in the nonrd path based on best
2020 // mode so far.
2021 //
2022 // For allintra encode, this speed feature reduces instruction count by 1.10%
2023 // for speed 9 with coding performance change less than 0.04%.
2024 // For AVIF image encode, this speed feature reduces encode time by 1.03% for
2025 // speed 9 on a typical image dataset with coding performance change less than
2026 // 0.08%.
2027 bool prune_h_pred_using_best_mode_so_far;
2028
2029 // Enable pruning of intra mode evaluations in nonrd path based on source
2030 // variance and best mode so far. The pruning logic is enabled only if the
2031 // mode is not a winner mode of both the neighboring blocks (left/top).
2032 //
2033 // For allintra encode, this speed feature reduces instruction count by 3.96%
2034 // for speed 9 with coding performance change less than 0.38%.
2035 // For AVIF image encode, this speed feature reduces encode time by 3.46% for
2036 // speed 9 on a typical image dataset with coding performance change less than
2037 // -0.06%.
2038 bool enable_intra_mode_pruning_using_neighbors;
2039
2040 // Prune intra mode evaluations in nonrd path based on best sad so far.
2041 //
2042 // For allintra encode, this speed feature reduces instruction count by 3.05%
2043 // for speed 9 with coding performance change less than 0.24%.
2044 // For AVIF image encode, this speed feature reduces encode time by 1.87% for
2045 // speed 9 on a typical image dataset with coding performance change less than
2046 // 0.16%.
2047 bool prune_intra_mode_using_best_sad_so_far;
2048
2049 // If compound is enabled, and the current block size is \geq BLOCK_16X16,
2050 // limit the compound modes to GLOBAL_GLOBALMV. This does not apply to the
2051 // base layer of svc.
2052 bool check_only_zero_zeromv_on_large_blocks;
2053
2054 // Allow for disabling cdf update for non reference frames in svc mode.
2055 bool disable_cdf_update_non_reference_frame;
2056
2057 // Prune compound modes if the single modes variances do not perform well.
2058 bool prune_compoundmode_with_singlemode_var;
2059
2060 // Skip searching all compound mode if the variance of single_mode residue is
2061 // sufficiently low.
2062 bool skip_compound_based_on_var;
2063
2064 // Sets force_zeromv_skip based on the source sad available. Aggressiveness
2065 // increases with increase in the level set for speed feature.
2066 // 0: No setting
2067 // 1: If source sad is kZeroSad
2068 // 2: If source sad <= kVeryLowSad
2069 int set_zeromv_skip_based_on_source_sad;
2070
2071 // Downgrades the block-level subpel motion search to
2072 // av1_find_best_sub_pixel_tree_pruned_more for higher QP and when fullpel
2073 // search performed well, zeromv has low sad or low source_var
2074 bool use_adaptive_subpel_search;
2075
2076 // A flag used in RTC case to control frame_refs_short_signaling. Note that
2077 // the final decision is made in check_frame_refs_short_signaling(). The flag
2078 // can only be turned on when res < 360p and speed >= 9, in which case only
2079 // LAST and GOLDEN ref frames are used now.
2080 bool enable_ref_short_signaling;
2081
2082 // A flag that controls if we check or bypass GLOBALMV in rtc single ref frame
2083 // case.
2084 bool check_globalmv_on_single_ref;
2085
2086 // Allows for increasing the color_threshold for palette prediction.
2087 // This generally leads to better coding efficiency but with some speed loss.
2088 // Only used for screen content and for nonrd_pickmode.
2089 bool increase_color_thresh_palette;
2090
2091 // Flag to indicate selecting of higher threshold for scenee change detection.
2092 int higher_thresh_scene_detection;
2093
2094 // FLag to indicate skip testing of NEWMV for flat blocks.
2095 int skip_newmv_flat_blocks_screen;
2096
2097 // Flag to force skip encoding for non_reference_frame on slide/scene changes.
2098 int skip_encoding_non_reference_slide_change;
2099
2100 // Flag to indicate more aggressive QP downward adjustment for screen static
2101 // content, to make convergence to min_qp faster.
2102 int rc_faster_convergence_static;
2103
2104 // Skip NEWMV mode evaluation based on sad for screen content.
2105 int skip_newmv_mode_sad_screen;
2106} REAL_TIME_SPEED_FEATURES;
2107
2109
2113 typedef struct SPEED_FEATURES {
2117 HIGH_LEVEL_SPEED_FEATURES hl_sf;
2118
2122 FIRST_PASS_SPEED_FEATURES fp_sf;
2123
2127 TPL_SPEED_FEATURES tpl_sf;
2128
2132 GLOBAL_MOTION_SPEED_FEATURES gm_sf;
2133
2137 PARTITION_SPEED_FEATURES part_sf;
2138
2142 MV_SPEED_FEATURES mv_sf;
2143
2147 INTER_MODE_SPEED_FEATURES inter_sf;
2148
2152 INTERP_FILTER_SPEED_FEATURES interp_sf;
2153
2157 INTRA_MODE_SPEED_FEATURES intra_sf;
2158
2162 TX_SPEED_FEATURES tx_sf;
2163
2167 RD_CALC_SPEED_FEATURES rd_sf;
2168
2172 WINNER_MODE_SPEED_FEATURES winner_mode_sf;
2173
2177 LOOP_FILTER_SPEED_FEATURES lpf_sf;
2178
2182 REAL_TIME_SPEED_FEATURES rt_sf;
2183} SPEED_FEATURES;
2184
2185
2186struct AV1_COMP;
2187
2200 void av1_set_speed_features_framesize_independent(struct AV1_COMP *cpi,
2201 int speed);
2202
2214 void av1_set_speed_features_framesize_dependent(struct AV1_COMP *cpi,
2215 int speed);
2227 void av1_set_speed_features_qindex_dependent(struct AV1_COMP *cpi, int speed);
2228
2229#ifdef __cplusplus
2230} // extern "C"
2231#endif
2232
2233#endif // AOM_AV1_ENCODER_SPEED_FEATURES_H_
enums.h
av1_set_speed_features_framesize_independent
void av1_set_speed_features_framesize_independent(struct AV1_COMP *cpi, int speed)
Frame size independent speed vs quality trade off flags.
av1_set_speed_features_qindex_dependent
void av1_set_speed_features_qindex_dependent(struct AV1_COMP *cpi, int speed)
Q index dependent speed vs quality trade off flags.
av1_set_speed_features_framesize_dependent
void av1_set_speed_features_framesize_dependent(struct AV1_COMP *cpi, int speed)
Frame size dependent speed vs quality trade off flags.
INTERNAL_COST_UPDATE_TYPE
INTERNAL_COST_UPDATE_TYPE
This enum decides internally how often to update the entropy costs.
Definition speed_features.h:351
INTERNAL_COST_UPD_OFF
@ INTERNAL_COST_UPD_OFF
Definition speed_features.h:352
INTERNAL_COST_UPD_SBROW_SET
@ INTERNAL_COST_UPD_SBROW_SET
Definition speed_features.h:354
INTERNAL_COST_UPD_SBROW
@ INTERNAL_COST_UPD_SBROW
Definition speed_features.h:355
INTERNAL_COST_UPD_SB
@ INTERNAL_COST_UPD_SB
Definition speed_features.h:356
INTERNAL_COST_UPD_TILE
@ INTERNAL_COST_UPD_TILE
Definition speed_features.h:353
INTER_SEARCH_EARLY_TERM_IDX
INTER_SEARCH_EARLY_TERM_IDX
This enumeration defines inter search early termination index in non-rd path based on sse value.
Definition speed_features.h:397
EARLY_TERM_INDICES
@ EARLY_TERM_INDICES
Definition speed_features.h:408
EARLY_TERM_IDX_1
@ EARLY_TERM_IDX_1
Definition speed_features.h:400
EARLY_TERM_IDX_4
@ EARLY_TERM_IDX_4
Definition speed_features.h:406
EARLY_TERM_IDX_2
@ EARLY_TERM_IDX_2
Definition speed_features.h:402
EARLY_TERM_DISABLED
@ EARLY_TERM_DISABLED
Definition speed_features.h:398
EARLY_TERM_IDX_3
@ EARLY_TERM_IDX_3
Definition speed_features.h:404
SIMPLE_MOTION_SEARCH_PRUNE_LEVEL
SIMPLE_MOTION_SEARCH_PRUNE_LEVEL
This enumeration defines a variety of simple motion search based partition prune levels.
Definition speed_features.h:363
QIDX_BASED_AGG_LVL1
@ QIDX_BASED_AGG_LVL1
Definition speed_features.h:371
SIMPLE_AGG_LVL3
@ SIMPLE_AGG_LVL3
Definition speed_features.h:368
SIMPLE_AGG_LVL5
@ SIMPLE_AGG_LVL5
Definition speed_features.h:370
TOTAL_SIMPLE_AGG_LVLS
@ TOTAL_SIMPLE_AGG_LVLS
Definition speed_features.h:374
SIMPLE_AGG_LVL1
@ SIMPLE_AGG_LVL1
Definition speed_features.h:366
SIMPLE_AGG_LVL0
@ SIMPLE_AGG_LVL0
Definition speed_features.h:365
TOTAL_AGG_LVLS
@ TOTAL_AGG_LVLS
Definition speed_features.h:380
SIMPLE_AGG_LVL4
@ SIMPLE_AGG_LVL4
Definition speed_features.h:369
SIMPLE_AGG_LVL2
@ SIMPLE_AGG_LVL2
Definition speed_features.h:367
TOTAL_QINDEX_BASED_AGG_LVLS
@ TOTAL_QINDEX_BASED_AGG_LVLS
Definition speed_features.h:376
PRUNE_MESH_SEARCH_LEVEL
PRUNE_MESH_SEARCH_LEVEL
This enumeration defines a variety of mesh search prune levels.
Definition speed_features.h:387
PRUNE_MESH_SEARCH_LVL_1
@ PRUNE_MESH_SEARCH_LVL_1
Definition speed_features.h:389
PRUNE_MESH_SEARCH_LVL_2
@ PRUNE_MESH_SEARCH_LVL_2
Definition speed_features.h:390
PRUNE_MESH_SEARCH_DISABLED
@ PRUNE_MESH_SEARCH_DISABLED
Definition speed_features.h:388
CDEF_PICK_METHOD
CDEF_PICK_METHOD
This enumeration defines a variety of CDEF pick methods.
Definition speed_features.h:164
CDEF_FAST_SEARCH_LVL2
@ CDEF_FAST_SEARCH_LVL2
Definition speed_features.h:167
CDEF_FAST_SEARCH_LVL5
@ CDEF_FAST_SEARCH_LVL5
Definition speed_features.h:171
CDEF_FAST_SEARCH_LVL1
@ CDEF_FAST_SEARCH_LVL1
Definition speed_features.h:166
CDEF_FULL_SEARCH
@ CDEF_FULL_SEARCH
Definition speed_features.h:165
CDEF_PICK_FROM_Q
@ CDEF_PICK_FROM_Q
Definition speed_features.h:172
CDEF_FAST_SEARCH_LVL4
@ CDEF_FAST_SEARCH_LVL4
Definition speed_features.h:170
CDEF_FAST_SEARCH_LVL3
@ CDEF_FAST_SEARCH_LVL3
Definition speed_features.h:168
AV1_COMP
Top level encoder structure.
Definition encoder.h:2907
AV1_COMP::speed
int speed
Definition encoder.h:3134
FIRST_PASS_SPEED_FEATURES
Definition speed_features.h:519
FIRST_PASS_SPEED_FEATURES::disable_recon
int disable_recon
Skips reconstruction by using source buffers for prediction.
Definition speed_features.h:536
FIRST_PASS_SPEED_FEATURES::reduce_mv_step_param
int reduce_mv_step_param
Reduces the mv search window. By default, the initial search window is around MIN(MIN(dims),...
Definition speed_features.h:526
FIRST_PASS_SPEED_FEATURES::skip_zeromv_motion_search
int skip_zeromv_motion_search
Skips the motion search centered on 0,0 mv.
Definition speed_features.h:541
FIRST_PASS_SPEED_FEATURES::skip_motion_search_threshold
int skip_motion_search_threshold
Skips the motion search when the zero mv has small sse.
Definition speed_features.h:531
HIGH_LEVEL_SPEED_FEATURES
Sequence/frame level speed vs quality features.
Definition speed_features.h:414
HIGH_LEVEL_SPEED_FEATURES::adjust_num_frames_for_arf_filtering
int adjust_num_frames_for_arf_filtering
Definition speed_features.h:469
HIGH_LEVEL_SPEED_FEATURES::weighted_chroma_distortion
int weighted_chroma_distortion
Definition speed_features.h:513
HIGH_LEVEL_SPEED_FEATURES::allow_sub_blk_me_in_tf
int allow_sub_blk_me_in_tf
Definition speed_features.h:491
HIGH_LEVEL_SPEED_FEATURES::second_alt_ref_filtering
int second_alt_ref_filtering
Definition speed_features.h:459
HIGH_LEVEL_SPEED_FEATURES::frame_parameter_update
int frame_parameter_update
Definition speed_features.h:416
HIGH_LEVEL_SPEED_FEATURES::weight_calc_level_in_tf
int weight_calc_level_in_tf
Definition speed_features.h:483
HIGH_LEVEL_SPEED_FEATURES::high_precision_mv_usage
MV_PREC_LOGIC high_precision_mv_usage
Definition speed_features.h:435
HIGH_LEVEL_SPEED_FEATURES::ref_frame_mvs_lvl
int ref_frame_mvs_lvl
Definition speed_features.h:499
HIGH_LEVEL_SPEED_FEATURES::disable_extra_sc_testing
int disable_extra_sc_testing
Definition speed_features.h:454
HIGH_LEVEL_SPEED_FEATURES::screen_detection_mode2_fast_detection
int screen_detection_mode2_fast_detection
Definition speed_features.h:506
HIGH_LEVEL_SPEED_FEATURES::recode_tolerance
int recode_tolerance
Definition speed_features.h:427
HIGH_LEVEL_SPEED_FEATURES::superres_auto_search_type
SUPERRES_AUTO_SEARCH_TYPE superres_auto_search_type
Definition speed_features.h:449
HIGH_LEVEL_SPEED_FEATURES::static_segmentation
int static_segmentation
Definition speed_features.h:444
HIGH_LEVEL_SPEED_FEATURES::accurate_bit_estimate
int accurate_bit_estimate
Definition speed_features.h:476
HIGH_LEVEL_SPEED_FEATURES::recode_loop
RECODE_LOOP_TYPE recode_loop
Definition speed_features.h:421
SPEED_FEATURES
Top level speed vs quality trade off data struture.
Definition speed_features.h:2113
SPEED_FEATURES::mv_sf
MV_SPEED_FEATURES mv_sf
Definition speed_features.h:2142
SPEED_FEATURES::tpl_sf
TPL_SPEED_FEATURES tpl_sf
Definition speed_features.h:2127
SPEED_FEATURES::lpf_sf
LOOP_FILTER_SPEED_FEATURES lpf_sf
Definition speed_features.h:2177
SPEED_FEATURES::tx_sf
TX_SPEED_FEATURES tx_sf
Definition speed_features.h:2162
SPEED_FEATURES::inter_sf
INTER_MODE_SPEED_FEATURES inter_sf
Definition speed_features.h:2147
SPEED_FEATURES::rd_sf
RD_CALC_SPEED_FEATURES rd_sf
Definition speed_features.h:2167
SPEED_FEATURES::part_sf
PARTITION_SPEED_FEATURES part_sf
Definition speed_features.h:2137
SPEED_FEATURES::gm_sf
GLOBAL_MOTION_SPEED_FEATURES gm_sf
Definition speed_features.h:2132
SPEED_FEATURES::interp_sf
INTERP_FILTER_SPEED_FEATURES interp_sf
Definition speed_features.h:2152
SPEED_FEATURES::fp_sf
FIRST_PASS_SPEED_FEATURES fp_sf
Definition speed_features.h:2122
SPEED_FEATURES::intra_sf
INTRA_MODE_SPEED_FEATURES intra_sf
Definition speed_features.h:2157
SPEED_FEATURES::winner_mode_sf
WINNER_MODE_SPEED_FEATURES winner_mode_sf
Definition speed_features.h:2172
SPEED_FEATURES::rt_sf
REAL_TIME_SPEED_FEATURES rt_sf
Definition speed_features.h:2182
SPEED_FEATURES::hl_sf
HIGH_LEVEL_SPEED_FEATURES hl_sf
Definition speed_features.h:2117