| OLD | NEW |
| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 sf->intra_uv_mode_mask[TX_16X16] = INTRA_DC_H_V; | 98 sf->intra_uv_mode_mask[TX_16X16] = INTRA_DC_H_V; |
| 99 | 99 |
| 100 sf->tx_size_search_breakout = 1; | 100 sf->tx_size_search_breakout = 1; |
| 101 sf->partition_search_breakout_rate_thr = 80; | 101 sf->partition_search_breakout_rate_thr = 80; |
| 102 } | 102 } |
| 103 | 103 |
| 104 if (speed >= 2) { | 104 if (speed >= 2) { |
| 105 sf->tx_size_search_method = frame_is_boosted(cpi) ? USE_FULL_RD | 105 sf->tx_size_search_method = frame_is_boosted(cpi) ? USE_FULL_RD |
| 106 : USE_LARGESTALL; | 106 : USE_LARGESTALL; |
| 107 | 107 |
| 108 sf->reference_masking = 1; | 108 // Reference masking is not supported in dynamic scaling mode. |
| 109 sf->reference_masking = cpi->oxcf.resize_mode != RESIZE_DYNAMIC ? 1 : 0; |
| 110 |
| 109 sf->mode_search_skip_flags = (cm->frame_type == KEY_FRAME) ? 0 : | 111 sf->mode_search_skip_flags = (cm->frame_type == KEY_FRAME) ? 0 : |
| 110 FLAG_SKIP_INTRA_DIRMISMATCH | | 112 FLAG_SKIP_INTRA_DIRMISMATCH | |
| 111 FLAG_SKIP_INTRA_BESTINTER | | 113 FLAG_SKIP_INTRA_BESTINTER | |
| 112 FLAG_SKIP_COMP_BESTINTRA | | 114 FLAG_SKIP_COMP_BESTINTRA | |
| 113 FLAG_SKIP_INTRA_LOWVAR; | 115 FLAG_SKIP_INTRA_LOWVAR; |
| 114 sf->disable_filter_search_var_thresh = 100; | 116 sf->disable_filter_search_var_thresh = 100; |
| 115 sf->comp_inter_joint_search_thresh = BLOCK_SIZES; | 117 sf->comp_inter_joint_search_thresh = BLOCK_SIZES; |
| 116 sf->auto_min_max_partition_size = CONSTRAIN_NEIGHBORING_MIN_MAX; | 118 sf->auto_min_max_partition_size = CONSTRAIN_NEIGHBORING_MIN_MAX; |
| 117 | 119 |
| 118 sf->allow_partition_search_skip = 1; | 120 sf->allow_partition_search_skip = 1; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 sf->intra_uv_mode_mask[TX_16X16] = INTRA_DC_H_V; | 229 sf->intra_uv_mode_mask[TX_16X16] = INTRA_DC_H_V; |
| 228 } | 230 } |
| 229 | 231 |
| 230 if (speed >= 2) { | 232 if (speed >= 2) { |
| 231 sf->mode_search_skip_flags = (cm->frame_type == KEY_FRAME) ? 0 : | 233 sf->mode_search_skip_flags = (cm->frame_type == KEY_FRAME) ? 0 : |
| 232 FLAG_SKIP_INTRA_DIRMISMATCH | | 234 FLAG_SKIP_INTRA_DIRMISMATCH | |
| 233 FLAG_SKIP_INTRA_BESTINTER | | 235 FLAG_SKIP_INTRA_BESTINTER | |
| 234 FLAG_SKIP_COMP_BESTINTRA | | 236 FLAG_SKIP_COMP_BESTINTRA | |
| 235 FLAG_SKIP_INTRA_LOWVAR; | 237 FLAG_SKIP_INTRA_LOWVAR; |
| 236 sf->adaptive_pred_interp_filter = 2; | 238 sf->adaptive_pred_interp_filter = 2; |
| 237 sf->reference_masking = 1; | 239 |
| 240 // Reference masking is not supported in dynamic scaling mode. |
| 241 sf->reference_masking = cpi->oxcf.resize_mode != RESIZE_DYNAMIC ? 1 : 0; |
| 242 |
| 238 sf->disable_filter_search_var_thresh = 50; | 243 sf->disable_filter_search_var_thresh = 50; |
| 239 sf->comp_inter_joint_search_thresh = BLOCK_SIZES; | 244 sf->comp_inter_joint_search_thresh = BLOCK_SIZES; |
| 240 sf->auto_min_max_partition_size = RELAXED_NEIGHBORING_MIN_MAX; | 245 sf->auto_min_max_partition_size = RELAXED_NEIGHBORING_MIN_MAX; |
| 241 sf->lf_motion_threshold = LOW_MOTION_THRESHOLD; | 246 sf->lf_motion_threshold = LOW_MOTION_THRESHOLD; |
| 242 sf->adjust_partitioning_from_last_frame = 1; | 247 sf->adjust_partitioning_from_last_frame = 1; |
| 243 sf->last_partitioning_redo_frequency = 3; | 248 sf->last_partitioning_redo_frequency = 3; |
| 244 sf->use_lp32x32fdct = 1; | 249 sf->use_lp32x32fdct = 1; |
| 245 sf->mode_skip_start = 11; | 250 sf->mode_skip_start = 11; |
| 246 sf->intra_y_mode_mask[TX_16X16] = INTRA_DC_H_V; | 251 sf->intra_y_mode_mask[TX_16X16] = INTRA_DC_H_V; |
| 247 } | 252 } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 sf->mv.search_method = NSTEP; | 335 sf->mv.search_method = NSTEP; |
| 331 sf->tx_size_search_method = is_keyframe ? USE_LARGESTALL : USE_TX_8X8; | 336 sf->tx_size_search_method = is_keyframe ? USE_LARGESTALL : USE_TX_8X8; |
| 332 sf->mv.reduce_first_step_size = 1; | 337 sf->mv.reduce_first_step_size = 1; |
| 333 sf->skip_encode_sb = 0; | 338 sf->skip_encode_sb = 0; |
| 334 } | 339 } |
| 335 | 340 |
| 336 if (speed >= 7) { | 341 if (speed >= 7) { |
| 337 sf->adaptive_rd_thresh = 3; | 342 sf->adaptive_rd_thresh = 3; |
| 338 sf->mv.search_method = FAST_DIAMOND; | 343 sf->mv.search_method = FAST_DIAMOND; |
| 339 sf->mv.fullpel_search_step_param = 10; | 344 sf->mv.fullpel_search_step_param = 10; |
| 340 sf->lpf_pick = LPF_PICK_MINIMAL_LPF; | |
| 341 } | 345 } |
| 342 if (speed >= 8) { | 346 if (speed >= 8) { |
| 343 sf->adaptive_rd_thresh = 4; | 347 sf->adaptive_rd_thresh = 4; |
| 344 sf->mv.subpel_force_stop = 2; | 348 sf->mv.subpel_force_stop = 2; |
| 349 sf->lpf_pick = LPF_PICK_MINIMAL_LPF; |
| 345 } | 350 } |
| 346 } | 351 } |
| 347 | 352 |
| 348 void vp9_set_speed_features_framesize_dependent(VP9_COMP *cpi) { | 353 void vp9_set_speed_features_framesize_dependent(VP9_COMP *cpi) { |
| 349 SPEED_FEATURES *const sf = &cpi->sf; | 354 SPEED_FEATURES *const sf = &cpi->sf; |
| 350 VP9_COMMON *const cm = &cpi->common; | 355 VP9_COMMON *const cm = &cpi->common; |
| 351 const VP9EncoderConfig *const oxcf = &cpi->oxcf; | 356 const VP9EncoderConfig *const oxcf = &cpi->oxcf; |
| 352 RD_OPT *const rd = &cpi->rd; | 357 RD_OPT *const rd = &cpi->rd; |
| 353 int i; | 358 int i; |
| 354 | 359 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 sf->use_nonrd_pick_mode = 0; | 444 sf->use_nonrd_pick_mode = 0; |
| 440 for (i = 0; i < BLOCK_SIZES; ++i) | 445 for (i = 0; i < BLOCK_SIZES; ++i) |
| 441 sf->inter_mode_mask[i] = INTER_ALL; | 446 sf->inter_mode_mask[i] = INTER_ALL; |
| 442 sf->max_intra_bsize = BLOCK_64X64; | 447 sf->max_intra_bsize = BLOCK_64X64; |
| 443 sf->reuse_inter_pred_sby = 0; | 448 sf->reuse_inter_pred_sby = 0; |
| 444 // This setting only takes effect when partition_search_type is set | 449 // This setting only takes effect when partition_search_type is set |
| 445 // to FIXED_PARTITION. | 450 // to FIXED_PARTITION. |
| 446 sf->always_this_block_size = BLOCK_16X16; | 451 sf->always_this_block_size = BLOCK_16X16; |
| 447 sf->search_type_check_frequency = 50; | 452 sf->search_type_check_frequency = 50; |
| 448 sf->encode_breakout_thresh = 0; | 453 sf->encode_breakout_thresh = 0; |
| 449 sf->elevate_newmv_thresh = 0; | |
| 450 // Recode loop tolerance %. | 454 // Recode loop tolerance %. |
| 451 sf->recode_tolerance = 25; | 455 sf->recode_tolerance = 25; |
| 452 sf->default_interp_filter = SWITCHABLE; | 456 sf->default_interp_filter = SWITCHABLE; |
| 453 sf->tx_size_search_breakout = 0; | 457 sf->tx_size_search_breakout = 0; |
| 454 sf->partition_search_breakout_dist_thr = 0; | 458 sf->partition_search_breakout_dist_thr = 0; |
| 455 sf->partition_search_breakout_rate_thr = 0; | 459 sf->partition_search_breakout_rate_thr = 0; |
| 456 | 460 |
| 457 if (oxcf->mode == REALTIME) | 461 if (oxcf->mode == REALTIME) |
| 458 set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content); | 462 set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content); |
| 459 else if (oxcf->mode == GOOD) | 463 else if (oxcf->mode == GOOD) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 486 | 490 |
| 487 x->optimize = sf->optimize_coefficients == 1 && oxcf->pass != 1; | 491 x->optimize = sf->optimize_coefficients == 1 && oxcf->pass != 1; |
| 488 | 492 |
| 489 x->min_partition_size = sf->default_min_partition_size; | 493 x->min_partition_size = sf->default_min_partition_size; |
| 490 x->max_partition_size = sf->default_max_partition_size; | 494 x->max_partition_size = sf->default_max_partition_size; |
| 491 | 495 |
| 492 if (!cpi->oxcf.frame_periodic_boost) { | 496 if (!cpi->oxcf.frame_periodic_boost) { |
| 493 sf->max_delta_qindex = 0; | 497 sf->max_delta_qindex = 0; |
| 494 } | 498 } |
| 495 } | 499 } |
| OLD | NEW |