Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: source/libvpx/vp9/encoder/vp9_speed_features.h

Issue 375983002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 26 matching lines...) Expand all
37 // Allow recode for all frames based on bitrate constraints. 37 // Allow recode for all frames based on bitrate constraints.
38 ALLOW_RECODE = 3, 38 ALLOW_RECODE = 3,
39 } RECODE_LOOP_TYPE; 39 } RECODE_LOOP_TYPE;
40 40
41 typedef enum { 41 typedef enum {
42 SUBPEL_TREE = 0, 42 SUBPEL_TREE = 0,
43 // Other methods to come 43 // Other methods to come
44 } SUBPEL_SEARCH_METHODS; 44 } SUBPEL_SEARCH_METHODS;
45 45
46 typedef enum { 46 typedef enum {
47 NO_MOITION_THRESHOLD = 0, 47 NO_MOTION_THRESHOLD = 0,
48 LOW_MOITION_THRESHOLD = 7 48 LOW_MOTION_THRESHOLD = 7
49 } MOTION_THRESHOLD; 49 } MOTION_THRESHOLD;
50 50
51 typedef enum { 51 typedef enum {
52 LAST_FRAME_PARTITION_OFF = 0, 52 LAST_FRAME_PARTITION_OFF = 0,
53 LAST_FRAME_PARTITION_LOW_MOTION = 1, 53 LAST_FRAME_PARTITION_LOW_MOTION = 1,
54 LAST_FRAME_PARTITION_ALL = 2 54 LAST_FRAME_PARTITION_ALL = 2
55 } LAST_FRAME_PARTITION_METHOD; 55 } LAST_FRAME_PARTITION_METHOD;
56 56
57 typedef enum { 57 typedef enum {
58 USE_FULL_RD = 0, 58 USE_FULL_RD = 0,
59 USE_LARGESTALL, 59 USE_LARGESTALL,
60 USE_TX_8X8 60 USE_TX_8X8
61 } TX_SIZE_SEARCH_METHOD; 61 } TX_SIZE_SEARCH_METHOD;
62 62
63 typedef enum { 63 typedef enum {
64 NOT_IN_USE = 0, 64 NOT_IN_USE = 0,
65 RELAXED_NEIGHBORING_MIN_MAX = 1, 65 RELAXED_NEIGHBORING_MIN_MAX = 1,
66 STRICT_NEIGHBORING_MIN_MAX = 2 66 STRICT_NEIGHBORING_MIN_MAX = 2
67 } AUTO_MIN_MAX_MODE; 67 } AUTO_MIN_MAX_MODE;
68 68
69 typedef enum { 69 typedef enum {
70 // Try the full image with different values. 70 // Try the full image with different values.
71 LPF_PICK_FROM_FULL_IMAGE, 71 LPF_PICK_FROM_FULL_IMAGE,
72 // Try a small portion of the image with different values. 72 // Try a small portion of the image with different values.
73 LPF_PICK_FROM_SUBIMAGE, 73 LPF_PICK_FROM_SUBIMAGE,
74 // Estimate the level based on quantizer and frame type 74 // Estimate the level based on quantizer and frame type
75 LPF_PICK_FROM_Q, 75 LPF_PICK_FROM_Q,
76 // Pick 0 to disable LPF if LPF was enabled last frame
77 LPF_PICK_MINIMAL_LPF
76 } LPF_PICK_METHOD; 78 } LPF_PICK_METHOD;
77 79
78 typedef enum { 80 typedef enum {
79 // Terminate search early based on distortion so far compared to 81 // Terminate search early based on distortion so far compared to
80 // qp step, distortion in the neighborhood of the frame, etc. 82 // qp step, distortion in the neighborhood of the frame, etc.
81 FLAG_EARLY_TERMINATE = 1 << 0, 83 FLAG_EARLY_TERMINATE = 1 << 0,
82 84
83 // Skips comp inter modes if the best so far is an intra mode. 85 // Skips comp inter modes if the best so far is an intra mode.
84 FLAG_SKIP_COMP_BESTINTRA = 1 << 1, 86 FLAG_SKIP_COMP_BESTINTRA = 1 << 1,
85 87
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 132
131 // No dry run, also only half the coef contexts and bands are updated. 133 // No dry run, also only half the coef contexts and bands are updated.
132 // The rest are not updated at all. 134 // The rest are not updated at all.
133 ONE_LOOP_REDUCED = 2 135 ONE_LOOP_REDUCED = 2
134 } FAST_COEFF_UPDATE; 136 } FAST_COEFF_UPDATE;
135 137
136 typedef struct MV_SPEED_FEATURES { 138 typedef struct MV_SPEED_FEATURES {
137 // Motion search method (Diamond, NSTEP, Hex, Big Diamond, Square, etc). 139 // Motion search method (Diamond, NSTEP, Hex, Big Diamond, Square, etc).
138 SEARCH_METHODS search_method; 140 SEARCH_METHODS search_method;
139 141
140 // This parameter controls the number of steps we'll do in a diamond
141 // search.
142 int max_step_search_steps;
143
144 // This parameter controls which step in the n-step process we start at. 142 // This parameter controls which step in the n-step process we start at.
145 // It's changed adaptively based on circumstances. 143 // It's changed adaptively based on circumstances.
146 int reduce_first_step_size; 144 int reduce_first_step_size;
147 145
148 // If this is set to 1, we limit the motion search range to 2 times the 146 // If this is set to 1, we limit the motion search range to 2 times the
149 // largest motion vector found in the last frame. 147 // largest motion vector found in the last frame.
150 int auto_mv_step_size; 148 int auto_mv_step_size;
151 149
152 // Subpel_search_method can only be subpel_tree which does a subpixel 150 // Subpel_search_method can only be subpel_tree which does a subpixel
153 // logarithmic search that keeps stepping at 1/2 pixel units until 151 // logarithmic search that keeps stepping at 1/2 pixel units until
154 // you stop getting a gain, and then goes on to 1/4 and repeats 152 // you stop getting a gain, and then goes on to 1/4 and repeats
155 // the same process. Along the way it skips many diagonals. 153 // the same process. Along the way it skips many diagonals.
156 SUBPEL_SEARCH_METHODS subpel_search_method; 154 SUBPEL_SEARCH_METHODS subpel_search_method;
157 155
158 // Maximum number of steps in logarithmic subpel search before giving up. 156 // Maximum number of steps in logarithmic subpel search before giving up.
159 int subpel_iters_per_step; 157 int subpel_iters_per_step;
160 158
161 // Control when to stop subpel search 159 // Control when to stop subpel search
162 int subpel_force_stop; 160 int subpel_force_stop;
161
162 // This variable sets the step_param used in full pel motion search.
163 int fullpel_search_step_param;
163 } MV_SPEED_FEATURES; 164 } MV_SPEED_FEATURES;
164 165
165 typedef struct SPEED_FEATURES { 166 typedef struct SPEED_FEATURES {
166 MV_SPEED_FEATURES mv; 167 MV_SPEED_FEATURES mv;
167 168
168 // Frame level coding parameter update 169 // Frame level coding parameter update
169 int frame_parameter_update; 170 int frame_parameter_update;
170 171
171 RECODE_LOOP_TYPE recode_loop; 172 RECODE_LOOP_TYPE recode_loop;
172 173
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // This allows us to use motion search at other sizes as a starting 276 // This allows us to use motion search at other sizes as a starting
276 // point for this motion search and limits the search range around it. 277 // point for this motion search and limits the search range around it.
277 int adaptive_motion_search; 278 int adaptive_motion_search;
278 279
279 // Allows sub 8x8 modes to use the prediction filter that was determined 280 // Allows sub 8x8 modes to use the prediction filter that was determined
280 // best for 8x8 mode. If set to 0 we always re check all the filters for 281 // best for 8x8 mode. If set to 0 we always re check all the filters for
281 // sizes less than 8x8, 1 means we check all filter modes if no 8x8 filter 282 // sizes less than 8x8, 1 means we check all filter modes if no 8x8 filter
282 // was selected, and 2 means we use 8 tap if no 8x8 filter mode was selected. 283 // was selected, and 2 means we use 8 tap if no 8x8 filter mode was selected.
283 int adaptive_pred_interp_filter; 284 int adaptive_pred_interp_filter;
284 285
286 // Fast quantization process path
287 int use_quant_fp;
288
285 // Search through variable block partition types in non-RD mode decision 289 // Search through variable block partition types in non-RD mode decision
286 // encoding process for RTC. 290 // encoding process for RTC.
287 int partition_check; 291 int partition_check;
288 292
289 // Use finer quantizer in every other few frames that run variable block 293 // Use finer quantizer in every other few frames that run variable block
290 // partition type search. 294 // partition type search.
291 int force_frame_boost; 295 int force_frame_boost;
292 296
293 // Maximally allowed base quantization index fluctuation. 297 // Maximally allowed base quantization index fluctuation.
294 int max_delta_qindex; 298 int max_delta_qindex;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 348
345 // This variable controls the maximum block size where intra blocks can be 349 // This variable controls the maximum block size where intra blocks can be
346 // used in inter frames. 350 // used in inter frames.
347 // TODO(aconverse): Fold this into one of the other many mode skips 351 // TODO(aconverse): Fold this into one of the other many mode skips
348 BLOCK_SIZE max_intra_bsize; 352 BLOCK_SIZE max_intra_bsize;
349 353
350 // The frequency that we check if SOURCE_VAR_BASED_PARTITION or 354 // The frequency that we check if SOURCE_VAR_BASED_PARTITION or
351 // FIXED_PARTITION search type should be used. 355 // FIXED_PARTITION search type should be used.
352 int search_type_check_frequency; 356 int search_type_check_frequency;
353 357
354 // The threshold used in SOURCE_VAR_BASED_PARTITION search type. 358 // When partition is pre-set, the inter prediction result from pick_inter_mode
355 unsigned int source_var_thresh; 359 // can be reused in final block encoding process. It is enabled only for real-
360 // time mode speed 6.
361 int reuse_inter_pred_sby;
362
363 // This variable sets the encode_breakout threshold. Currently, it is only
364 // enabled in real time mode.
365 int encode_breakout_thresh;
366
367 // In real time encoding, increase the threshold for NEWMV.
368 int elevate_newmv_thresh;
356 } SPEED_FEATURES; 369 } SPEED_FEATURES;
357 370
358 struct VP9_COMP; 371 struct VP9_COMP;
359 372
360 void vp9_set_speed_features(struct VP9_COMP *cpi); 373 void vp9_set_speed_features(struct VP9_COMP *cpi);
361 374
362 #ifdef __cplusplus 375 #ifdef __cplusplus
363 } // extern "C" 376 } // extern "C"
364 #endif 377 #endif
365 378
366 #endif // VP9_ENCODER_VP9_SPEED_FEATURES_H_ 379 #endif // VP9_ENCODER_VP9_SPEED_FEATURES_H_
367 380
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_segmentation.c ('k') | source/libvpx/vp9/encoder/vp9_speed_features.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698