22c1c3ff2bbe259e8b80b0dfd91ee8a3776a1e80
[platform/upstream/libvpx.git] / vp9 / encoder / vp9_speed_features.h
1 /*
2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10
11 #ifndef VPX_VP9_ENCODER_VP9_SPEED_FEATURES_H_
12 #define VPX_VP9_ENCODER_VP9_SPEED_FEATURES_H_
13
14 #include "vp9/common/vp9_enums.h"
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 enum {
21   INTRA_ALL = (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED) | (1 << D45_PRED) |
22               (1 << D135_PRED) | (1 << D117_PRED) | (1 << D153_PRED) |
23               (1 << D207_PRED) | (1 << D63_PRED) | (1 << TM_PRED),
24   INTRA_DC = (1 << DC_PRED),
25   INTRA_DC_TM = (1 << DC_PRED) | (1 << TM_PRED),
26   INTRA_DC_H_V = (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED),
27   INTRA_DC_TM_H_V =
28       (1 << DC_PRED) | (1 << TM_PRED) | (1 << V_PRED) | (1 << H_PRED)
29 };
30
31 enum {
32   INTER_ALL = (1 << NEARESTMV) | (1 << NEARMV) | (1 << ZEROMV) | (1 << NEWMV),
33   INTER_NEAREST = (1 << NEARESTMV),
34   INTER_NEAREST_NEW = (1 << NEARESTMV) | (1 << NEWMV),
35   INTER_NEAREST_ZERO = (1 << NEARESTMV) | (1 << ZEROMV),
36   INTER_NEAREST_NEW_ZERO = (1 << NEARESTMV) | (1 << ZEROMV) | (1 << NEWMV),
37   INTER_NEAREST_NEAR_NEW = (1 << NEARESTMV) | (1 << NEARMV) | (1 << NEWMV),
38   INTER_NEAREST_NEAR_ZERO = (1 << NEARESTMV) | (1 << NEARMV) | (1 << ZEROMV),
39 };
40
41 enum {
42   DISABLE_ALL_INTER_SPLIT = (1 << THR_COMP_GA) | (1 << THR_COMP_LA) |
43                             (1 << THR_ALTR) | (1 << THR_GOLD) | (1 << THR_LAST),
44
45   DISABLE_ALL_SPLIT = (1 << THR_INTRA) | DISABLE_ALL_INTER_SPLIT,
46
47   DISABLE_COMPOUND_SPLIT = (1 << THR_COMP_GA) | (1 << THR_COMP_LA),
48
49   LAST_AND_INTRA_SPLIT_ONLY = (1 << THR_COMP_GA) | (1 << THR_COMP_LA) |
50                               (1 << THR_ALTR) | (1 << THR_GOLD)
51 };
52
53 typedef enum {
54   DIAMOND = 0,
55   NSTEP = 1,
56   HEX = 2,
57   BIGDIA = 3,
58   SQUARE = 4,
59   FAST_HEX = 5,
60   FAST_DIAMOND = 6,
61   MESH = 7
62 } SEARCH_METHODS;
63
64 typedef enum {
65   // No recode.
66   DISALLOW_RECODE = 0,
67   // Allow recode for KF and exceeding maximum frame bandwidth.
68   ALLOW_RECODE_KFMAXBW = 1,
69   // Allow recode only for KF/ARF/GF frames.
70   ALLOW_RECODE_KFARFGF = 2,
71   // Allow recode for ARF/GF/KF and first normal frame in each group.
72   ALLOW_RECODE_FIRST = 3,
73   // Allow recode for all frames based on bitrate constraints.
74   ALLOW_RECODE = 4,
75 } RECODE_LOOP_TYPE;
76
77 typedef enum {
78   SUBPEL_TREE = 0,
79   SUBPEL_TREE_PRUNED = 1,           // Prunes 1/2-pel searches
80   SUBPEL_TREE_PRUNED_MORE = 2,      // Prunes 1/2-pel searches more aggressively
81   SUBPEL_TREE_PRUNED_EVENMORE = 3,  // Prunes 1/2- and 1/4-pel searches
82   // Other methods to come
83 } SUBPEL_SEARCH_METHODS;
84
85 typedef enum {
86   NO_MOTION_THRESHOLD = 0,
87   LOW_MOTION_THRESHOLD = 7
88 } MOTION_THRESHOLD;
89
90 typedef enum {
91   USE_FULL_RD = 0,
92   USE_LARGESTALL,
93   USE_TX_8X8
94 } TX_SIZE_SEARCH_METHOD;
95
96 typedef enum {
97   NOT_IN_USE = 0,
98   RELAXED_NEIGHBORING_MIN_MAX = 1,
99   STRICT_NEIGHBORING_MIN_MAX = 2
100 } AUTO_MIN_MAX_MODE;
101
102 typedef enum {
103   // Try the full image with different values.
104   LPF_PICK_FROM_FULL_IMAGE,
105   // Try a small portion of the image with different values.
106   LPF_PICK_FROM_SUBIMAGE,
107   // Estimate the level based on quantizer and frame type
108   LPF_PICK_FROM_Q,
109   // Pick 0 to disable LPF if LPF was enabled last frame
110   LPF_PICK_MINIMAL_LPF
111 } LPF_PICK_METHOD;
112
113 typedef enum {
114   // Terminate search early based on distortion so far compared to
115   // qp step, distortion in the neighborhood of the frame, etc.
116   FLAG_EARLY_TERMINATE = 1 << 0,
117
118   // Skips comp inter modes if the best so far is an intra mode.
119   FLAG_SKIP_COMP_BESTINTRA = 1 << 1,
120
121   // Skips oblique intra modes if the best so far is an inter mode.
122   FLAG_SKIP_INTRA_BESTINTER = 1 << 3,
123
124   // Skips oblique intra modes  at angles 27, 63, 117, 153 if the best
125   // intra so far is not one of the neighboring directions.
126   FLAG_SKIP_INTRA_DIRMISMATCH = 1 << 4,
127
128   // Skips intra modes other than DC_PRED if the source variance is small
129   FLAG_SKIP_INTRA_LOWVAR = 1 << 5,
130 } MODE_SEARCH_SKIP_LOGIC;
131
132 typedef enum {
133   FLAG_SKIP_EIGHTTAP = 1 << EIGHTTAP,
134   FLAG_SKIP_EIGHTTAP_SMOOTH = 1 << EIGHTTAP_SMOOTH,
135   FLAG_SKIP_EIGHTTAP_SHARP = 1 << EIGHTTAP_SHARP,
136 } INTERP_FILTER_MASK;
137
138 typedef enum {
139   // Search partitions using RD/NONRD criterion.
140   SEARCH_PARTITION,
141
142   // Always use a fixed size partition.
143   FIXED_PARTITION,
144
145   REFERENCE_PARTITION,
146
147   // Use an arbitrary partitioning scheme based on source variance within
148   // a 64X64 SB.
149   VAR_BASED_PARTITION,
150
151   // Use non-fixed partitions based on source variance.
152   SOURCE_VAR_BASED_PARTITION,
153
154   // Make partition decisions with machine learning models.
155   ML_BASED_PARTITION
156 } PARTITION_SEARCH_TYPE;
157
158 typedef enum {
159   // Does a dry run to see if any of the contexts need to be updated or not,
160   // before the final run.
161   TWO_LOOP = 0,
162
163   // No dry run, also only half the coef contexts and bands are updated.
164   // The rest are not updated at all.
165   ONE_LOOP_REDUCED = 1
166 } FAST_COEFF_UPDATE;
167
168 typedef enum { EIGHTH_PEL, QUARTER_PEL, HALF_PEL, FULL_PEL } SUBPEL_FORCE_STOP;
169
170 typedef struct ADAPT_SUBPEL_FORCE_STOP {
171   // Threshold for full pixel motion vector;
172   int mv_thresh;
173
174   // subpel_force_stop if full pixel MV is below the threshold.
175   SUBPEL_FORCE_STOP force_stop_below;
176
177   // subpel_force_stop if full pixel MV is equal to or above the threshold.
178   SUBPEL_FORCE_STOP force_stop_above;
179 } ADAPT_SUBPEL_FORCE_STOP;
180
181 typedef struct MV_SPEED_FEATURES {
182   // Motion search method (Diamond, NSTEP, Hex, Big Diamond, Square, etc).
183   SEARCH_METHODS search_method;
184
185   // This parameter controls which step in the n-step process we start at.
186   // It's changed adaptively based on circumstances.
187   int reduce_first_step_size;
188
189   // If this is set to 1, we limit the motion search range to 2 times the
190   // largest motion vector found in the last frame.
191   int auto_mv_step_size;
192
193   // Subpel_search_method can only be subpel_tree which does a subpixel
194   // logarithmic search that keeps stepping at 1/2 pixel units until
195   // you stop getting a gain, and then goes on to 1/4 and repeats
196   // the same process. Along the way it skips many diagonals.
197   SUBPEL_SEARCH_METHODS subpel_search_method;
198
199   // Subpel MV search level. Can take values 0 - 2. Higher values mean more
200   // extensive subpel search.
201   int subpel_search_level;
202
203   // When to stop subpel motion search.
204   SUBPEL_FORCE_STOP subpel_force_stop;
205
206   // If it's enabled, different subpel_force_stop will be used for different MV.
207   int enable_adaptive_subpel_force_stop;
208
209   ADAPT_SUBPEL_FORCE_STOP adapt_subpel_force_stop;
210
211   // This variable sets the step_param used in full pel motion search.
212   int fullpel_search_step_param;
213 } MV_SPEED_FEATURES;
214
215 typedef struct PARTITION_SEARCH_BREAKOUT_THR {
216   int64_t dist;
217   int rate;
218 } PARTITION_SEARCH_BREAKOUT_THR;
219
220 #define MAX_MESH_STEP 4
221
222 typedef struct MESH_PATTERN {
223   int range;
224   int interval;
225 } MESH_PATTERN;
226
227 typedef enum {
228   // No reaction to rate control on a detected slide/scene change.
229   NO_DETECTION = 0,
230
231   // Set to larger Q (max_q set by user) based only on the
232   // detected slide/scene change and current/past Q.
233   FAST_DETECTION_MAXQ = 1,
234
235   // Based on (first pass) encoded frame, if large frame size is detected
236   // then set to higher Q for the second re-encode. This involves 2 pass
237   // encoding on slide change, so slower than 1, but more accurate for
238   // detecting overshoot.
239   RE_ENCODE_MAXQ = 2
240 } OVERSHOOT_DETECTION_CBR_RT;
241
242 typedef enum {
243   USE_2_TAPS = 0,
244   USE_4_TAPS,
245   USE_8_TAPS,
246   USE_8_TAPS_SHARP,
247 } SUBPEL_SEARCH_TYPE;
248
249 typedef struct SPEED_FEATURES {
250   MV_SPEED_FEATURES mv;
251
252   // Frame level coding parameter update
253   int frame_parameter_update;
254
255   RECODE_LOOP_TYPE recode_loop;
256
257   // Trellis (dynamic programming) optimization of quantized values (+1, 0).
258   int optimize_coefficients;
259
260   // Always set to 0. If on it enables 0 cost background transmission
261   // (except for the initial transmission of the segmentation). The feature is
262   // disabled because the addition of very large block sizes make the
263   // backgrounds very to cheap to encode, and the segmentation we have
264   // adds overhead.
265   int static_segmentation;
266
267   // If 1 we iterate finding a best reference for 2 ref frames together - via
268   // a log search that iterates 4 times (check around mv for last for best
269   // error of combined predictor then check around mv for alt). If 0 we
270   // we just use the best motion vector found for each frame by itself.
271   BLOCK_SIZE comp_inter_joint_search_thresh;
272
273   // This variable is used to cap the maximum number of times we skip testing a
274   // mode to be evaluated. A high value means we will be faster.
275   // Turned off when (row_mt_bit_exact == 1 && adaptive_rd_thresh_row_mt == 0).
276   int adaptive_rd_thresh;
277
278   // Flag to use adaptive_rd_thresh when row-mt it enabled, only for non-rd
279   // pickmode.
280   int adaptive_rd_thresh_row_mt;
281
282   // Enables skipping the reconstruction step (idct, recon) in the
283   // intermediate steps assuming the last frame didn't have too many intra
284   // blocks and the q is less than a threshold.
285   int skip_encode_sb;
286   int skip_encode_frame;
287   // Speed feature to allow or disallow skipping of recode at block
288   // level within a frame.
289   int allow_skip_recode;
290
291   // Enable Wiener filter based block complexity analysis.
292   int enable_wiener_variance;
293
294   // Coefficient probability model approximation step size
295   int coeff_prob_appx_step;
296
297   // Enable uniform quantizer followed by trellis coefficient optimization
298   int allow_quant_coeff_opt;
299   double quant_opt_thresh;
300
301   // Enable asymptotic closed-loop encoding decision for key frame and
302   // alternate reference frames.
303   int allow_acl;
304
305   // Temporal dependency model based encoding mode optimization
306   int enable_tpl_model;
307
308   // Use transform domain distortion. Use pixel domain distortion in speed 0
309   // and certain situations in higher speed to improve the RD model precision.
310   int allow_txfm_domain_distortion;
311   double tx_domain_thresh;
312
313   // The threshold is to determine how slow the motino is, it is used when
314   // use_lastframe_partitioning is set to LAST_FRAME_PARTITION_LOW_MOTION
315   MOTION_THRESHOLD lf_motion_threshold;
316
317   // Determine which method we use to determine transform size. We can choose
318   // between options like full rd, largest for prediction size, largest
319   // for intra and model coefs for the rest.
320   TX_SIZE_SEARCH_METHOD tx_size_search_method;
321
322   // How many levels of tx size to search, starting from the largest.
323   int tx_size_search_depth;
324
325   // Low precision 32x32 fdct keeps everything in 16 bits and thus is less
326   // precise but significantly faster than the non lp version.
327   int use_lp32x32fdct;
328
329   // After looking at the first set of modes (set by index here), skip
330   // checking modes for reference frames that don't match the reference frame
331   // of the best so far.
332   int mode_skip_start;
333
334   // TODO(JBB): Remove this.
335   int reference_masking;
336
337   PARTITION_SEARCH_TYPE partition_search_type;
338
339   // Used if partition_search_type = FIXED_SIZE_PARTITION
340   BLOCK_SIZE always_this_block_size;
341
342   // Skip rectangular partition test when partition type none gives better
343   // rd than partition type split.
344   int less_rectangular_check;
345
346   // Disable testing non square partitions(eg 16x32) for block sizes larger than
347   // use_square_only_thresh_high or smaller than use_square_only_thresh_low.
348   int use_square_partition_only;
349   BLOCK_SIZE use_square_only_thresh_high;
350   BLOCK_SIZE use_square_only_thresh_low;
351
352   // Prune reference frames for rectangular partitions.
353   int prune_ref_frame_for_rect_partitions;
354
355   // Sets min and max partition sizes for this 64x64 region based on the
356   // same 64x64 in last encoded frame, and the left and above neighbor.
357   AUTO_MIN_MAX_MODE auto_min_max_partition_size;
358   // Ensures the rd based auto partition search will always
359   // go down at least to the specified level.
360   BLOCK_SIZE rd_auto_partition_min_limit;
361
362   // Min and max partition size we enable (block_size) as per auto
363   // min max, but also used by adjust partitioning, and pick_partitioning.
364   BLOCK_SIZE default_min_partition_size;
365   BLOCK_SIZE default_max_partition_size;
366
367   // Whether or not we allow partitions one smaller or one greater than the last
368   // frame's partitioning. Only used if use_lastframe_partitioning is set.
369   int adjust_partitioning_from_last_frame;
370
371   // How frequently we re do the partitioning from scratch. Only used if
372   // use_lastframe_partitioning is set.
373   int last_partitioning_redo_frequency;
374
375   // Disables sub 8x8 blocksizes in different scenarios: Choices are to disable
376   // it always, to allow it for only Last frame and Intra, disable it for all
377   // inter modes or to enable it always.
378   int disable_split_mask;
379
380   // TODO(jingning): combine the related motion search speed features
381   // This allows us to use motion search at other sizes as a starting
382   // point for this motion search and limits the search range around it.
383   int adaptive_motion_search;
384
385   // Do extra full pixel motion search to obtain better motion vector.
386   int enhanced_full_pixel_motion_search;
387
388   // Threshold for allowing exhaistive motion search.
389   int exhaustive_searches_thresh;
390
391   // Pattern to be used for any exhaustive mesh searches.
392   MESH_PATTERN mesh_patterns[MAX_MESH_STEP];
393
394   int schedule_mode_search;
395
396   // Allows sub 8x8 modes to use the prediction filter that was determined
397   // best for 8x8 mode. If set to 0 we always re check all the filters for
398   // sizes less than 8x8, 1 means we check all filter modes if no 8x8 filter
399   // was selected, and 2 means we use 8 tap if no 8x8 filter mode was selected.
400   int adaptive_pred_interp_filter;
401
402   // Adaptive prediction mode search
403   int adaptive_mode_search;
404
405   // Chessboard pattern prediction filter type search
406   int cb_pred_filter_search;
407
408   int cb_partition_search;
409
410   int motion_field_mode_search;
411
412   int alt_ref_search_fp;
413
414   // Fast quantization process path
415   int use_quant_fp;
416
417   // Use finer quantizer in every other few frames that run variable block
418   // partition type search.
419   int force_frame_boost;
420
421   // Maximally allowed base quantization index fluctuation.
422   int max_delta_qindex;
423
424   // Implements various heuristics to skip searching modes
425   // The heuristics selected are based on  flags
426   // defined in the MODE_SEARCH_SKIP_HEURISTICS enum
427   unsigned int mode_search_skip_flags;
428
429   // A source variance threshold below which filter search is disabled
430   // Choose a very large value (UINT_MAX) to use 8-tap always
431   unsigned int disable_filter_search_var_thresh;
432
433   // These bit masks allow you to enable or disable intra modes for each
434   // transform size separately.
435   int intra_y_mode_mask[TX_SIZES];
436   int intra_uv_mode_mask[TX_SIZES];
437
438   // These bit masks allow you to enable or disable intra modes for each
439   // prediction block size separately.
440   int intra_y_mode_bsize_mask[BLOCK_SIZES];
441
442   // This variable enables an early break out of mode testing if the model for
443   // rd built from the prediction signal indicates a value that's much
444   // higher than the best rd we've seen so far.
445   int use_rd_breakout;
446
447   // This enables us to use an estimate for intra rd based on dc mode rather
448   // than choosing an actual uv mode in the stage of encoding before the actual
449   // final encode.
450   int use_uv_intra_rd_estimate;
451
452   // This feature controls how the loop filter level is determined.
453   LPF_PICK_METHOD lpf_pick;
454
455   // This feature limits the number of coefficients updates we actually do
456   // by only looking at counts from 1/2 the bands.
457   FAST_COEFF_UPDATE use_fast_coef_updates;
458
459   // This flag controls the use of non-RD mode decision.
460   int use_nonrd_pick_mode;
461
462   // A binary mask indicating if NEARESTMV, NEARMV, ZEROMV, NEWMV
463   // modes are used in order from LSB to MSB for each BLOCK_SIZE.
464   int inter_mode_mask[BLOCK_SIZES];
465
466   // This feature controls whether we do the expensive context update and
467   // calculation in the rd coefficient costing loop.
468   int use_fast_coef_costing;
469
470   // This feature controls the tolerence vs target used in deciding whether to
471   // recode a frame. It has no meaning if recode is disabled.
472   int recode_tolerance_low;
473   int recode_tolerance_high;
474
475   // This variable controls the maximum block size where intra blocks can be
476   // used in inter frames.
477   // TODO(aconverse): Fold this into one of the other many mode skips
478   BLOCK_SIZE max_intra_bsize;
479
480   // The frequency that we check if SOURCE_VAR_BASED_PARTITION or
481   // FIXED_PARTITION search type should be used.
482   int search_type_check_frequency;
483
484   // When partition is pre-set, the inter prediction result from pick_inter_mode
485   // can be reused in final block encoding process. It is enabled only for real-
486   // time mode speed 6.
487   int reuse_inter_pred_sby;
488
489   // This variable sets the encode_breakout threshold. Currently, it is only
490   // enabled in real time mode.
491   int encode_breakout_thresh;
492
493   // default interp filter choice
494   INTERP_FILTER default_interp_filter;
495
496   // Early termination in transform size search, which only applies while
497   // tx_size_search_method is USE_FULL_RD.
498   int tx_size_search_breakout;
499
500   // adaptive interp_filter search to allow skip of certain filter types.
501   int adaptive_interp_filter_search;
502
503   // mask for skip evaluation of certain interp_filter type.
504   INTERP_FILTER_MASK interp_filter_search_mask;
505
506   // Partition search early breakout thresholds.
507   PARTITION_SEARCH_BREAKOUT_THR partition_search_breakout_thr;
508
509   struct {
510     // Use ML-based partition search early breakout.
511     int search_breakout;
512     // Higher values mean more aggressiveness for partition search breakout that
513     // results in better encoding  speed but worse compression performance.
514     float search_breakout_thresh[3];
515
516     // Machine-learning based partition search early termination
517     int search_early_termination;
518
519     // Machine-learning based partition search pruning using prediction residue
520     // variance.
521     int var_pruning;
522
523     // Threshold values used for ML based rectangular partition search pruning.
524     // If < 0, the feature is turned off.
525     // Higher values mean more aggressiveness to skip rectangular partition
526     // search that results in better encoding speed but worse coding
527     // performance.
528     int prune_rect_thresh[4];
529   } rd_ml_partition;
530
531   // Allow skipping partition search for still image frame
532   int allow_partition_search_skip;
533
534   // Fast approximation of vp9_model_rd_from_var_lapndz
535   int simple_model_rd_from_var;
536
537   // Skip a number of expensive mode evaluations for blocks with zero source
538   // variance.
539   int short_circuit_flat_blocks;
540
541   // Skip a number of expensive mode evaluations for blocks with very low
542   // temporal variance. If the low temporal variance flag is set for a block,
543   // do the following:
544   // 1: Skip all golden modes and ALL INTRA for bsize >= 32x32.
545   // 2: Skip golden non-zeromv and newmv-last for bsize >= 16x16, skip ALL
546   // INTRA for bsize >= 32x32 and vert/horz INTRA for bsize 16x16, 16x32 and
547   // 32x16.
548   // 3: Same as (2), but also skip golden zeromv.
549   int short_circuit_low_temp_var;
550
551   // Limits the rd-threshold update for early exit for the newmv-last mode,
552   // for non-rd mode.
553   int limit_newmv_early_exit;
554
555   // Adds a bias against golden reference, for non-rd mode.
556   int bias_golden;
557
558   // Bias to use base mv and skip 1/4 subpel search when use base mv in
559   // enhancement layer.
560   int base_mv_aggressive;
561
562   // Global flag to enable partition copy from the previous frame.
563   int copy_partition_flag;
564
565   // Compute the source sad for every superblock of the frame,
566   // prior to encoding the frame, to be used to bypass some encoder decisions.
567   int use_source_sad;
568
569   int use_simple_block_yrd;
570
571   // If source sad of superblock is high (> adapt_partition_thresh), will switch
572   // from VARIANCE_PARTITION to REFERENCE_PARTITION (which selects partition
573   // based on the nonrd-pickmode).
574   int adapt_partition_source_sad;
575   int adapt_partition_thresh;
576
577   // Enable use of alt-refs in 1 pass VBR.
578   int use_altref_onepass;
579
580   // Enable use of compound prediction, for nonrd_pickmode with nonzero lag.
581   int use_compound_nonrd_pickmode;
582
583   // Always use nonrd_pick_intra for all block sizes on keyframes.
584   int nonrd_keyframe;
585
586   // For SVC: enables use of partition from lower spatial resolution.
587   int svc_use_lowres_part;
588
589   // Flag to indicate process for handling overshoot on slide/scene change,
590   // for real-time CBR mode.
591   OVERSHOOT_DETECTION_CBR_RT overshoot_detection_cbr_rt;
592
593   // Disable partitioning of 16x16 blocks.
594   int disable_16x16part_nonkey;
595
596   // Allow for disabling golden reference.
597   int disable_golden_ref;
598
599   // Allow sub-pixel search to use interpolation filters with different taps in
600   // order to achieve accurate motion search result.
601   SUBPEL_SEARCH_TYPE use_accurate_subpel_search;
602
603   // Search method used by temporal filtering in full_pixel_motion_search.
604   SEARCH_METHODS temporal_filter_search_method;
605
606   // Use machine learning based partition search.
607   int nonrd_use_ml_partition;
608 } SPEED_FEATURES;
609
610 struct VP9_COMP;
611
612 void vp9_set_speed_features_framesize_independent(struct VP9_COMP *cpi,
613                                                   int speed);
614 void vp9_set_speed_features_framesize_dependent(struct VP9_COMP *cpi,
615                                                 int speed);
616
617 #ifdef __cplusplus
618 }  // extern "C"
619 #endif
620
621 #endif  // VPX_VP9_ENCODER_VP9_SPEED_FEATURES_H_