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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 sf->mv.reduce_first_step_size = 1; | 287 sf->mv.reduce_first_step_size = 1; |
288 } | 288 } |
289 if (speed >= 7) { | 289 if (speed >= 7) { |
290 sf->mv.search_method = FAST_DIAMOND; | 290 sf->mv.search_method = FAST_DIAMOND; |
291 sf->mv.fullpel_search_step_param = 10; | 291 sf->mv.fullpel_search_step_param = 10; |
292 sf->lpf_pick = LPF_PICK_MINIMAL_LPF; | 292 sf->lpf_pick = LPF_PICK_MINIMAL_LPF; |
293 sf->encode_breakout_thresh = (MIN(cm->width, cm->height) >= 720) ? | 293 sf->encode_breakout_thresh = (MIN(cm->width, cm->height) >= 720) ? |
294 800 : 300; | 294 800 : 300; |
295 sf->elevate_newmv_thresh = 2500; | 295 sf->elevate_newmv_thresh = 2500; |
296 } | 296 } |
297 if (speed >= 8) { | 297 if (speed >= 12) { |
| 298 sf->elevate_newmv_thresh = 4000; |
| 299 sf->mv.subpel_force_stop = 2; |
| 300 } |
| 301 if (speed >= 13) { |
298 int i; | 302 int i; |
| 303 sf->max_intra_bsize = BLOCK_32X32; |
299 for (i = 0; i < BLOCK_SIZES; ++i) | 304 for (i = 0; i < BLOCK_SIZES; ++i) |
300 sf->inter_mode_mask[i] = INTER_NEAREST; | 305 sf->inter_mode_mask[i] = INTER_NEAREST; |
301 } | 306 } |
302 } | 307 } |
303 | 308 |
304 void vp9_set_speed_features(VP9_COMP *cpi) { | 309 void vp9_set_speed_features(VP9_COMP *cpi) { |
305 SPEED_FEATURES *const sf = &cpi->sf; | 310 SPEED_FEATURES *const sf = &cpi->sf; |
306 VP9_COMMON *const cm = &cpi->common; | 311 VP9_COMMON *const cm = &cpi->common; |
307 const VP9EncoderConfig *const oxcf = &cpi->oxcf; | 312 const VP9EncoderConfig *const oxcf = &cpi->oxcf; |
308 int i; | 313 int i; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 sf->max_intra_bsize = BLOCK_64X64; | 365 sf->max_intra_bsize = BLOCK_64X64; |
361 sf->reuse_inter_pred_sby = 0; | 366 sf->reuse_inter_pred_sby = 0; |
362 // This setting only takes effect when partition_search_type is set | 367 // This setting only takes effect when partition_search_type is set |
363 // to FIXED_PARTITION. | 368 // to FIXED_PARTITION. |
364 sf->always_this_block_size = BLOCK_16X16; | 369 sf->always_this_block_size = BLOCK_16X16; |
365 sf->search_type_check_frequency = 50; | 370 sf->search_type_check_frequency = 50; |
366 sf->encode_breakout_thresh = 0; | 371 sf->encode_breakout_thresh = 0; |
367 sf->elevate_newmv_thresh = 0; | 372 sf->elevate_newmv_thresh = 0; |
368 // Recode loop tolerence %. | 373 // Recode loop tolerence %. |
369 sf->recode_tolerance = 25; | 374 sf->recode_tolerance = 25; |
| 375 sf->default_interp_filter = SWITCHABLE; |
370 | 376 |
371 switch (oxcf->mode) { | 377 switch (oxcf->mode) { |
372 case ONE_PASS_BEST: | 378 case ONE_PASS_BEST: |
373 case TWO_PASS_SECOND_BEST: // This is the best quality mode. | 379 case TWO_PASS_SECOND_BEST: // This is the best quality mode. |
374 cpi->diamond_search_sad = vp9_full_range_search; | 380 cpi->diamond_search_sad = vp9_full_range_search; |
375 break; | 381 break; |
376 case TWO_PASS_FIRST: | 382 case TWO_PASS_FIRST: |
377 case ONE_PASS_GOOD: | 383 case ONE_PASS_GOOD: |
378 case TWO_PASS_SECOND_GOOD: | 384 case TWO_PASS_SECOND_GOOD: |
379 set_good_speed_feature(cpi, cm, sf, oxcf->speed); | 385 set_good_speed_feature(cpi, cm, sf, oxcf->speed); |
(...skipping 24 matching lines...) Expand all Loading... |
404 sf->adaptive_pred_interp_filter = 0; | 410 sf->adaptive_pred_interp_filter = 0; |
405 | 411 |
406 if (!cpi->oxcf.frame_periodic_boost) { | 412 if (!cpi->oxcf.frame_periodic_boost) { |
407 sf->max_delta_qindex = 0; | 413 sf->max_delta_qindex = 0; |
408 } | 414 } |
409 | 415 |
410 if (cpi->encode_breakout && oxcf->mode == REALTIME && | 416 if (cpi->encode_breakout && oxcf->mode == REALTIME && |
411 sf->encode_breakout_thresh > cpi->encode_breakout) | 417 sf->encode_breakout_thresh > cpi->encode_breakout) |
412 cpi->encode_breakout = sf->encode_breakout_thresh; | 418 cpi->encode_breakout = sf->encode_breakout_thresh; |
413 } | 419 } |
OLD | NEW |