| 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 int raster_block, int16_t *base) { | 528 int raster_block, int16_t *base) { |
| 529 const int stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; | 529 const int stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; |
| 530 return base + vp9_raster_block_offset(plane_bsize, raster_block, stride); | 530 return base + vp9_raster_block_offset(plane_bsize, raster_block, stride); |
| 531 } | 531 } |
| 532 | 532 |
| 533 const YV12_BUFFER_CONFIG *vp9_get_scaled_ref_frame(const VP9_COMP *cpi, | 533 const YV12_BUFFER_CONFIG *vp9_get_scaled_ref_frame(const VP9_COMP *cpi, |
| 534 int ref_frame) { | 534 int ref_frame) { |
| 535 const VP9_COMMON *const cm = &cpi->common; | 535 const VP9_COMMON *const cm = &cpi->common; |
| 536 const int ref_idx = cm->ref_frame_map[get_ref_frame_idx(cpi, ref_frame)]; | 536 const int ref_idx = cm->ref_frame_map[get_ref_frame_idx(cpi, ref_frame)]; |
| 537 const int scaled_idx = cpi->scaled_ref_idx[ref_frame - 1]; | 537 const int scaled_idx = cpi->scaled_ref_idx[ref_frame - 1]; |
| 538 return (scaled_idx != ref_idx) ? &cm->frame_bufs[scaled_idx].buf : NULL; | 538 return (scaled_idx != ref_idx) ? |
| 539 &cm->buffer_pool->frame_bufs[scaled_idx].buf : NULL; |
| 539 } | 540 } |
| 540 | 541 |
| 541 int vp9_get_switchable_rate(const VP9_COMP *cpi, const MACROBLOCKD *const xd) { | 542 int vp9_get_switchable_rate(const VP9_COMP *cpi, const MACROBLOCKD *const xd) { |
| 542 const MB_MODE_INFO *const mbmi = &xd->mi[0].src_mi->mbmi; | 543 const MB_MODE_INFO *const mbmi = &xd->mi[0].src_mi->mbmi; |
| 543 const int ctx = vp9_get_pred_context_switchable_interp(xd); | 544 const int ctx = vp9_get_pred_context_switchable_interp(xd); |
| 544 return SWITCHABLE_INTERP_RATE_FACTOR * | 545 return SWITCHABLE_INTERP_RATE_FACTOR * |
| 545 cpi->switchable_interp_costs[ctx][mbmi->interp_filter]; | 546 cpi->switchable_interp_costs[ctx][mbmi->interp_filter]; |
| 546 } | 547 } |
| 547 | 548 |
| 548 void vp9_set_rd_speed_thresholds(VP9_COMP *cpi) { | 549 void vp9_set_rd_speed_thresholds(VP9_COMP *cpi) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 563 rd->thresh_mult[THR_NEARESTG] = 0; | 564 rd->thresh_mult[THR_NEARESTG] = 0; |
| 564 rd->thresh_mult[THR_NEARESTA] = 0; | 565 rd->thresh_mult[THR_NEARESTA] = 0; |
| 565 } | 566 } |
| 566 | 567 |
| 567 rd->thresh_mult[THR_DC] += 1000; | 568 rd->thresh_mult[THR_DC] += 1000; |
| 568 | 569 |
| 569 rd->thresh_mult[THR_NEWMV] += 1000; | 570 rd->thresh_mult[THR_NEWMV] += 1000; |
| 570 rd->thresh_mult[THR_NEWA] += 1000; | 571 rd->thresh_mult[THR_NEWA] += 1000; |
| 571 rd->thresh_mult[THR_NEWG] += 1000; | 572 rd->thresh_mult[THR_NEWG] += 1000; |
| 572 | 573 |
| 573 // Adjust threshold only in real time mode, which only uses last | |
| 574 // reference frame. | |
| 575 rd->thresh_mult[THR_NEWMV] += sf->elevate_newmv_thresh; | |
| 576 | |
| 577 rd->thresh_mult[THR_NEARMV] += 1000; | 574 rd->thresh_mult[THR_NEARMV] += 1000; |
| 578 rd->thresh_mult[THR_NEARA] += 1000; | 575 rd->thresh_mult[THR_NEARA] += 1000; |
| 579 rd->thresh_mult[THR_COMP_NEARESTLA] += 1000; | 576 rd->thresh_mult[THR_COMP_NEARESTLA] += 1000; |
| 580 rd->thresh_mult[THR_COMP_NEARESTGA] += 1000; | 577 rd->thresh_mult[THR_COMP_NEARESTGA] += 1000; |
| 581 | 578 |
| 582 rd->thresh_mult[THR_TM] += 1000; | 579 rd->thresh_mult[THR_TM] += 1000; |
| 583 | 580 |
| 584 rd->thresh_mult[THR_COMP_NEARLA] += 1500; | 581 rd->thresh_mult[THR_COMP_NEARLA] += 1500; |
| 585 rd->thresh_mult[THR_COMP_NEWLA] += 2000; | 582 rd->thresh_mult[THR_COMP_NEWLA] += 2000; |
| 586 rd->thresh_mult[THR_NEARG] += 1000; | 583 rd->thresh_mult[THR_NEARG] += 1000; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 return ROUND_POWER_OF_TWO(5 * q, 2); | 645 return ROUND_POWER_OF_TWO(5 * q, 2); |
| 649 default: | 646 default: |
| 650 assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12"); | 647 assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12"); |
| 651 return -1; | 648 return -1; |
| 652 } | 649 } |
| 653 #else | 650 #else |
| 654 return 20 * q; | 651 return 20 * q; |
| 655 #endif // CONFIG_VP9_HIGHBITDEPTH | 652 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 656 } | 653 } |
| 657 | 654 |
| OLD | NEW |