| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 break; | 137 break; |
| 138 } | 138 } |
| 139 return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]); | 139 return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]); |
| 140 } | 140 } |
| 141 #endif // CONFIG_VP9_HIGHBITDEPTH | 141 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 142 | 142 |
| 143 static unsigned int get_sby_perpixel_diff_variance(VP9_COMP *cpi, | 143 static unsigned int get_sby_perpixel_diff_variance(VP9_COMP *cpi, |
| 144 const struct buf_2d *ref, | 144 const struct buf_2d *ref, |
| 145 int mi_row, int mi_col, | 145 int mi_row, int mi_col, |
| 146 BLOCK_SIZE bs) { | 146 BLOCK_SIZE bs) { |
| 147 unsigned int sse, var; |
| 148 uint8_t *last_y; |
| 147 const YV12_BUFFER_CONFIG *last = get_ref_frame_buffer(cpi, LAST_FRAME); | 149 const YV12_BUFFER_CONFIG *last = get_ref_frame_buffer(cpi, LAST_FRAME); |
| 148 const uint8_t* last_y = &last->y_buffer[mi_row * MI_SIZE * last->y_stride + | 150 |
| 149 mi_col * MI_SIZE]; | 151 assert(last != NULL); |
| 150 unsigned int sse; | 152 last_y = |
| 151 const unsigned int var = cpi->fn_ptr[bs].vf(ref->buf, ref->stride, | 153 &last->y_buffer[mi_row * MI_SIZE * last->y_stride + mi_col * MI_SIZE]; |
| 152 last_y, last->y_stride, &sse); | 154 var = cpi->fn_ptr[bs].vf(ref->buf, ref->stride, last_y, last->y_stride, &sse); |
| 153 return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]); | 155 return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]); |
| 154 } | 156 } |
| 155 | 157 |
| 156 static BLOCK_SIZE get_rd_var_based_fixed_partition(VP9_COMP *cpi, MACROBLOCK *x, | 158 static BLOCK_SIZE get_rd_var_based_fixed_partition(VP9_COMP *cpi, MACROBLOCK *x, |
| 157 int mi_row, | 159 int mi_row, |
| 158 int mi_col) { | 160 int mi_col) { |
| 159 unsigned int var = get_sby_perpixel_diff_variance(cpi, &x->plane[0].src, | 161 unsigned int var = get_sby_perpixel_diff_variance(cpi, &x->plane[0].src, |
| 160 mi_row, mi_col, | 162 mi_row, mi_col, |
| 161 BLOCK_64X64); | 163 BLOCK_64X64); |
| 162 if (var < 8) | 164 if (var < 8) |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 cpi->vbp_bsize_min = (use_4x4_partition) ? BLOCK_8X8 : BLOCK_16X16; | 513 cpi->vbp_bsize_min = (use_4x4_partition) ? BLOCK_8X8 : BLOCK_16X16; |
| 512 } | 514 } |
| 513 } | 515 } |
| 514 | 516 |
| 515 #if CONFIG_VP9_HIGHBITDEPTH | 517 #if CONFIG_VP9_HIGHBITDEPTH |
| 516 #define GLOBAL_MOTION 0 | 518 #define GLOBAL_MOTION 0 |
| 517 #else | 519 #else |
| 518 #define GLOBAL_MOTION 1 | 520 #define GLOBAL_MOTION 1 |
| 519 #endif | 521 #endif |
| 520 | 522 |
| 521 #if GLOBAL_MOTION | |
| 522 static int vector_match(int16_t *ref, int16_t *src) { | |
| 523 int best_sad = INT_MAX; | |
| 524 int this_sad; | |
| 525 int d; | |
| 526 int center, offset = 0; | |
| 527 for (d = 0; d <= 64; d += 16) { | |
| 528 this_sad = vp9_vector_sad(&ref[d], src, 64); | |
| 529 if (this_sad < best_sad) { | |
| 530 best_sad = this_sad; | |
| 531 offset = d; | |
| 532 } | |
| 533 } | |
| 534 center = offset; | |
| 535 | |
| 536 for (d = -8; d <= 8; d += 16) { | |
| 537 int this_pos = offset + d; | |
| 538 // check limit | |
| 539 if (this_pos < 0 || this_pos > 64) | |
| 540 continue; | |
| 541 this_sad = vp9_vector_sad(&ref[this_pos], src, 64); | |
| 542 if (this_sad < best_sad) { | |
| 543 best_sad = this_sad; | |
| 544 center = this_pos; | |
| 545 } | |
| 546 } | |
| 547 offset = center; | |
| 548 | |
| 549 for (d = -4; d <= 4; d += 8) { | |
| 550 int this_pos = offset + d; | |
| 551 // check limit | |
| 552 if (this_pos < 0 || this_pos > 64) | |
| 553 continue; | |
| 554 this_sad = vp9_vector_sad(&ref[this_pos], src, 64); | |
| 555 if (this_sad < best_sad) { | |
| 556 best_sad = this_sad; | |
| 557 center = this_pos; | |
| 558 } | |
| 559 } | |
| 560 offset = center; | |
| 561 | |
| 562 for (d = -2; d <= 2; d += 4) { | |
| 563 int this_pos = offset + d; | |
| 564 // check limit | |
| 565 if (this_pos < 0 || this_pos > 64) | |
| 566 continue; | |
| 567 this_sad = vp9_vector_sad(&ref[this_pos], src, 64); | |
| 568 if (this_sad < best_sad) { | |
| 569 best_sad = this_sad; | |
| 570 center = this_pos; | |
| 571 } | |
| 572 } | |
| 573 offset = center; | |
| 574 | |
| 575 for (d = -1; d <= 1; d += 2) { | |
| 576 int this_pos = offset + d; | |
| 577 // check limit | |
| 578 if (this_pos < 0 || this_pos > 64) | |
| 579 continue; | |
| 580 this_sad = vp9_vector_sad(&ref[this_pos], src, 64); | |
| 581 if (this_sad < best_sad) { | |
| 582 best_sad = this_sad; | |
| 583 center = this_pos; | |
| 584 } | |
| 585 } | |
| 586 | |
| 587 return (center - 32); | |
| 588 } | |
| 589 | |
| 590 static const MV search_pos[9] = { | |
| 591 {-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 0}, {0, 1}, | |
| 592 {1, -1}, {1, 0}, {1, 1}, | |
| 593 }; | |
| 594 | |
| 595 static void motion_estimation(VP9_COMP *cpi, MACROBLOCK *x) { | |
| 596 MACROBLOCKD *xd = &x->e_mbd; | |
| 597 DECLARE_ALIGNED(16, int16_t, hbuf[128]); | |
| 598 DECLARE_ALIGNED(16, int16_t, vbuf[128]); | |
| 599 DECLARE_ALIGNED(16, int16_t, src_hbuf[64]); | |
| 600 DECLARE_ALIGNED(16, int16_t, src_vbuf[64]); | |
| 601 int idx; | |
| 602 const int stride = 64; | |
| 603 const int search_width = 128; | |
| 604 const int search_height = 128; | |
| 605 const int src_stride = x->plane[0].src.stride; | |
| 606 const int ref_stride = xd->plane[0].pre[0].stride; | |
| 607 uint8_t const *ref_buf, *src_buf; | |
| 608 MV *tmp_mv = &xd->mi[0].src_mi->mbmi.mv[0].as_mv; | |
| 609 int best_sad; | |
| 610 MV this_mv; | |
| 611 | |
| 612 // Set up prediction 1-D reference set | |
| 613 ref_buf = xd->plane[0].pre[0].buf + (-32); | |
| 614 for (idx = 0; idx < search_width; idx += 16) { | |
| 615 vp9_int_pro_row(&hbuf[idx], ref_buf, ref_stride, 64); | |
| 616 ref_buf += 16; | |
| 617 } | |
| 618 | |
| 619 ref_buf = xd->plane[0].pre[0].buf + (-32) * ref_stride; | |
| 620 for (idx = 0; idx < search_height; ++idx) { | |
| 621 vbuf[idx] = vp9_int_pro_col(ref_buf, 64); | |
| 622 ref_buf += ref_stride; | |
| 623 } | |
| 624 | |
| 625 // Set up src 1-D reference set | |
| 626 for (idx = 0; idx < stride; idx += 16) { | |
| 627 src_buf = x->plane[0].src.buf + idx; | |
| 628 vp9_int_pro_row(&src_hbuf[idx], src_buf, src_stride, 64); | |
| 629 } | |
| 630 | |
| 631 src_buf = x->plane[0].src.buf; | |
| 632 for (idx = 0; idx < stride; ++idx) { | |
| 633 src_vbuf[idx] = vp9_int_pro_col(src_buf, 64); | |
| 634 src_buf += src_stride; | |
| 635 } | |
| 636 | |
| 637 // Find the best match per 1-D search | |
| 638 | |
| 639 tmp_mv->col = vector_match(hbuf, src_hbuf); | |
| 640 tmp_mv->row = vector_match(vbuf, src_vbuf); | |
| 641 | |
| 642 best_sad = INT_MAX; | |
| 643 this_mv = *tmp_mv; | |
| 644 for (idx = 0; idx < 9; ++idx) { | |
| 645 int this_sad; | |
| 646 src_buf = x->plane[0].src.buf; | |
| 647 ref_buf = xd->plane[0].pre[0].buf + | |
| 648 (search_pos[idx].row + this_mv.row) * ref_stride + | |
| 649 (search_pos[idx].col + this_mv.col); | |
| 650 | |
| 651 this_sad = cpi->fn_ptr[BLOCK_64X64].sdf(src_buf, src_stride, | |
| 652 ref_buf, ref_stride); | |
| 653 if (this_sad < best_sad) { | |
| 654 best_sad = this_sad; | |
| 655 tmp_mv->row = search_pos[idx].row + this_mv.row; | |
| 656 tmp_mv->col = search_pos[idx].col + this_mv.col; | |
| 657 } | |
| 658 } | |
| 659 | |
| 660 tmp_mv->row *= 8; | |
| 661 tmp_mv->col *= 8; | |
| 662 | |
| 663 x->pred_mv[LAST_FRAME] = *tmp_mv; | |
| 664 } | |
| 665 #endif | |
| 666 | |
| 667 // This function chooses partitioning based on the variance between source and | 523 // This function chooses partitioning based on the variance between source and |
| 668 // reconstructed last, where variance is computed for downs-sampled inputs. | 524 // reconstructed last, where variance is computed for down-sampled inputs. |
| 669 static void choose_partitioning(VP9_COMP *cpi, | 525 static void choose_partitioning(VP9_COMP *cpi, |
| 670 const TileInfo *const tile, | 526 const TileInfo *const tile, |
| 671 MACROBLOCK *x, | 527 MACROBLOCK *x, |
| 672 int mi_row, int mi_col) { | 528 int mi_row, int mi_col) { |
| 673 VP9_COMMON * const cm = &cpi->common; | 529 VP9_COMMON * const cm = &cpi->common; |
| 674 MACROBLOCKD *xd = &x->e_mbd; | 530 MACROBLOCKD *xd = &x->e_mbd; |
| 675 int i, j, k, m; | 531 int i, j, k, m; |
| 676 v64x64 vt; | 532 v64x64 vt; |
| 677 v16x16 vt2[16]; | 533 v16x16 vt2[16]; |
| 678 uint8_t *s; | 534 uint8_t *s; |
| 679 const uint8_t *d; | 535 const uint8_t *d; |
| 680 int sp; | 536 int sp; |
| 681 int dp; | 537 int dp; |
| 682 int pixels_wide = 64, pixels_high = 64; | 538 int pixels_wide = 64, pixels_high = 64; |
| 683 const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, LAST_FRAME); | |
| 684 | 539 |
| 685 // Always use 4x4 partition for key frame. | 540 // Always use 4x4 partition for key frame. |
| 686 const int is_key_frame = (cm->frame_type == KEY_FRAME); | 541 const int is_key_frame = (cm->frame_type == KEY_FRAME); |
| 687 const int use_4x4_partition = is_key_frame; | 542 const int use_4x4_partition = is_key_frame; |
| 688 const int low_res = (cm->width <= 352 && cm->height <= 288); | 543 const int low_res = (cm->width <= 352 && cm->height <= 288); |
| 689 int variance4x4downsample[16]; | 544 int variance4x4downsample[16]; |
| 690 | 545 |
| 691 int segment_id = CR_SEGMENT_ID_BASE; | 546 int segment_id = CR_SEGMENT_ID_BASE; |
| 692 if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled) { | 547 if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled) { |
| 693 const uint8_t *const map = cm->seg.update_map ? cpi->segmentation_map : | 548 const uint8_t *const map = cm->seg.update_map ? cpi->segmentation_map : |
| 694 cm->last_frame_seg_map; | 549 cm->last_frame_seg_map; |
| 695 segment_id = vp9_get_segment_id(cm, map, BLOCK_64X64, mi_row, mi_col); | 550 segment_id = vp9_get_segment_id(cm, map, BLOCK_64X64, mi_row, mi_col); |
| 696 } | 551 } |
| 697 | 552 |
| 698 set_offsets(cpi, tile, x, mi_row, mi_col, BLOCK_64X64); | 553 set_offsets(cpi, tile, x, mi_row, mi_col, BLOCK_64X64); |
| 699 | 554 |
| 700 if (xd->mb_to_right_edge < 0) | 555 if (xd->mb_to_right_edge < 0) |
| 701 pixels_wide += (xd->mb_to_right_edge >> 3); | 556 pixels_wide += (xd->mb_to_right_edge >> 3); |
| 702 if (xd->mb_to_bottom_edge < 0) | 557 if (xd->mb_to_bottom_edge < 0) |
| 703 pixels_high += (xd->mb_to_bottom_edge >> 3); | 558 pixels_high += (xd->mb_to_bottom_edge >> 3); |
| 704 | 559 |
| 705 s = x->plane[0].src.buf; | 560 s = x->plane[0].src.buf; |
| 706 sp = x->plane[0].src.stride; | 561 sp = x->plane[0].src.stride; |
| 707 | 562 |
| 708 if (!is_key_frame) { | 563 if (!is_key_frame) { |
| 709 MB_MODE_INFO *mbmi = &xd->mi[0].src_mi->mbmi; | 564 MB_MODE_INFO *mbmi = &xd->mi[0].src_mi->mbmi; |
| 710 unsigned int var = 0, sse; | 565 unsigned int uv_sad; |
| 566 #if GLOBAL_MOTION |
| 567 unsigned int y_sad; |
| 568 BLOCK_SIZE bsize; |
| 569 #endif |
| 570 const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, LAST_FRAME); |
| 571 assert(yv12 != NULL); |
| 711 vp9_setup_pre_planes(xd, 0, yv12, mi_row, mi_col, | 572 vp9_setup_pre_planes(xd, 0, yv12, mi_row, mi_col, |
| 712 &cm->frame_refs[LAST_FRAME - 1].sf); | 573 &cm->frame_refs[LAST_FRAME - 1].sf); |
| 713 mbmi->ref_frame[0] = LAST_FRAME; | 574 mbmi->ref_frame[0] = LAST_FRAME; |
| 714 mbmi->ref_frame[1] = NONE; | 575 mbmi->ref_frame[1] = NONE; |
| 715 mbmi->sb_type = BLOCK_64X64; | 576 mbmi->sb_type = BLOCK_64X64; |
| 716 mbmi->mv[0].as_int = 0; | 577 mbmi->mv[0].as_int = 0; |
| 717 mbmi->interp_filter = BILINEAR; | 578 mbmi->interp_filter = BILINEAR; |
| 718 | 579 |
| 719 #if GLOBAL_MOTION | 580 #if GLOBAL_MOTION |
| 720 motion_estimation(cpi, x); | 581 if (mi_row + 4 < cm->mi_rows && mi_col + 4 < cm->mi_cols) |
| 582 bsize = BLOCK_64X64; |
| 583 else if (mi_row + 4 < cm->mi_rows && mi_col + 4 >= cm->mi_cols) |
| 584 bsize = BLOCK_32X64; |
| 585 else if (mi_row + 4 >= cm->mi_rows && mi_col + 4 < cm->mi_cols) |
| 586 bsize = BLOCK_64X32; |
| 587 else |
| 588 bsize = BLOCK_32X32; |
| 589 |
| 590 y_sad = vp9_int_pro_motion_estimation(cpi, x, bsize); |
| 721 #endif | 591 #endif |
| 722 | 592 |
| 723 vp9_build_inter_predictors_sb(xd, mi_row, mi_col, BLOCK_64X64); | 593 vp9_build_inter_predictors_sb(xd, mi_row, mi_col, BLOCK_64X64); |
| 724 | 594 |
| 725 for (i = 1; i <= 2; ++i) { | 595 for (i = 1; i <= 2; ++i) { |
| 726 struct macroblock_plane *p = &x->plane[i]; | 596 struct macroblock_plane *p = &x->plane[i]; |
| 727 struct macroblockd_plane *pd = &xd->plane[i]; | 597 struct macroblockd_plane *pd = &xd->plane[i]; |
| 598 #if GLOBAL_MOTION |
| 599 const BLOCK_SIZE bs = get_plane_block_size(bsize, pd); |
| 600 #else |
| 728 const BLOCK_SIZE bs = get_plane_block_size(BLOCK_64X64, pd); | 601 const BLOCK_SIZE bs = get_plane_block_size(BLOCK_64X64, pd); |
| 729 var += cpi->fn_ptr[bs].vf(p->src.buf, p->src.stride, | 602 #endif |
| 730 pd->dst.buf, pd->dst.stride, &sse); | 603 if (bs == BLOCK_INVALID) |
| 731 if (sse > 2048) | 604 uv_sad = INT_MAX; |
| 732 x->color_sensitivity[i - 1] = 1; | 605 else |
| 606 uv_sad = cpi->fn_ptr[bs].sdf(p->src.buf, p->src.stride, |
| 607 pd->dst.buf, pd->dst.stride); |
| 608 |
| 609 #if GLOBAL_MOTION |
| 610 x->color_sensitivity[i - 1] = uv_sad * 4 > y_sad; |
| 611 #else |
| 612 x->color_sensitivity[i - 1] = (uv_sad > 512); |
| 613 #endif |
| 733 } | 614 } |
| 734 | 615 |
| 735 d = xd->plane[0].dst.buf; | 616 d = xd->plane[0].dst.buf; |
| 736 dp = xd->plane[0].dst.stride; | 617 dp = xd->plane[0].dst.stride; |
| 737 } else { | 618 } else { |
| 738 d = VP9_VAR_OFFS; | 619 d = VP9_VAR_OFFS; |
| 739 dp = 0; | 620 dp = 0; |
| 740 #if CONFIG_VP9_HIGHBITDEPTH | 621 #if CONFIG_VP9_HIGHBITDEPTH |
| 741 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { | 622 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { |
| 742 switch (xd->bd) { | 623 switch (xd->bd) { |
| (...skipping 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3888 vp9_initialize_me_consts(cpi, cm->base_qindex); | 3769 vp9_initialize_me_consts(cpi, cm->base_qindex); |
| 3889 init_encode_frame_mb_context(cpi); | 3770 init_encode_frame_mb_context(cpi); |
| 3890 cm->use_prev_frame_mvs = !cm->error_resilient_mode && | 3771 cm->use_prev_frame_mvs = !cm->error_resilient_mode && |
| 3891 cm->width == cm->last_width && | 3772 cm->width == cm->last_width && |
| 3892 cm->height == cm->last_height && | 3773 cm->height == cm->last_height && |
| 3893 !cm->intra_only && | 3774 !cm->intra_only && |
| 3894 cm->last_show_frame; | 3775 cm->last_show_frame; |
| 3895 // Special case: set prev_mi to NULL when the previous mode info | 3776 // Special case: set prev_mi to NULL when the previous mode info |
| 3896 // context cannot be used. | 3777 // context cannot be used. |
| 3897 cm->prev_mi = cm->use_prev_frame_mvs ? | 3778 cm->prev_mi = cm->use_prev_frame_mvs ? |
| 3898 cm->prev_mip + cm->mi_stride + 1 : NULL; | 3779 cm->prev_mip + cm->mi_stride + 1 : NULL; |
| 3899 | 3780 |
| 3900 x->quant_fp = cpi->sf.use_quant_fp; | 3781 x->quant_fp = cpi->sf.use_quant_fp; |
| 3901 vp9_zero(x->skip_txfm); | 3782 vp9_zero(x->skip_txfm); |
| 3902 if (sf->use_nonrd_pick_mode) { | 3783 if (sf->use_nonrd_pick_mode) { |
| 3903 // Initialize internal buffer pointers for rtc coding, where non-RD | 3784 // Initialize internal buffer pointers for rtc coding, where non-RD |
| 3904 // mode decision is used and hence no buffer pointer swap needed. | 3785 // mode decision is used and hence no buffer pointer swap needed. |
| 3905 int i; | 3786 int i; |
| 3906 struct macroblock_plane *const p = x->plane; | 3787 struct macroblock_plane *const p = x->plane; |
| 3907 struct macroblockd_plane *const pd = xd->plane; | 3788 struct macroblockd_plane *const pd = xd->plane; |
| 3908 PICK_MODE_CONTEXT *ctx = &cpi->td.pc_root->none; | 3789 PICK_MODE_CONTEXT *ctx = &cpi->td.pc_root->none; |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4160 vp9_encode_intra_block_plane(x, MAX(bsize, BLOCK_8X8), plane); | 4041 vp9_encode_intra_block_plane(x, MAX(bsize, BLOCK_8X8), plane); |
| 4161 if (output_enabled) | 4042 if (output_enabled) |
| 4162 sum_intra_stats(td->counts, mi); | 4043 sum_intra_stats(td->counts, mi); |
| 4163 vp9_tokenize_sb(cpi, td, t, !output_enabled, MAX(bsize, BLOCK_8X8)); | 4044 vp9_tokenize_sb(cpi, td, t, !output_enabled, MAX(bsize, BLOCK_8X8)); |
| 4164 } else { | 4045 } else { |
| 4165 int ref; | 4046 int ref; |
| 4166 const int is_compound = has_second_ref(mbmi); | 4047 const int is_compound = has_second_ref(mbmi); |
| 4167 for (ref = 0; ref < 1 + is_compound; ++ref) { | 4048 for (ref = 0; ref < 1 + is_compound; ++ref) { |
| 4168 YV12_BUFFER_CONFIG *cfg = get_ref_frame_buffer(cpi, | 4049 YV12_BUFFER_CONFIG *cfg = get_ref_frame_buffer(cpi, |
| 4169 mbmi->ref_frame[ref]); | 4050 mbmi->ref_frame[ref]); |
| 4051 assert(cfg != NULL); |
| 4170 vp9_setup_pre_planes(xd, ref, cfg, mi_row, mi_col, | 4052 vp9_setup_pre_planes(xd, ref, cfg, mi_row, mi_col, |
| 4171 &xd->block_refs[ref]->sf); | 4053 &xd->block_refs[ref]->sf); |
| 4172 } | 4054 } |
| 4173 if (!(cpi->sf.reuse_inter_pred_sby && ctx->pred_pixel_ready) || seg_skip) | 4055 if (!(cpi->sf.reuse_inter_pred_sby && ctx->pred_pixel_ready) || seg_skip) |
| 4174 vp9_build_inter_predictors_sby(xd, mi_row, mi_col, MAX(bsize, BLOCK_8X8)); | 4056 vp9_build_inter_predictors_sby(xd, mi_row, mi_col, MAX(bsize, BLOCK_8X8)); |
| 4175 | 4057 |
| 4176 vp9_build_inter_predictors_sbuv(xd, mi_row, mi_col, MAX(bsize, BLOCK_8X8)); | 4058 vp9_build_inter_predictors_sbuv(xd, mi_row, mi_col, MAX(bsize, BLOCK_8X8)); |
| 4177 | 4059 |
| 4178 vp9_encode_sb(x, MAX(bsize, BLOCK_8X8)); | 4060 vp9_encode_sb(x, MAX(bsize, BLOCK_8X8)); |
| 4179 vp9_tokenize_sb(cpi, td, t, !output_enabled, MAX(bsize, BLOCK_8X8)); | 4061 vp9_tokenize_sb(cpi, td, t, !output_enabled, MAX(bsize, BLOCK_8X8)); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 4198 | 4080 |
| 4199 for (y = 0; y < mi_height; y++) | 4081 for (y = 0; y < mi_height; y++) |
| 4200 for (x = 0; x < mi_width; x++) | 4082 for (x = 0; x < mi_width; x++) |
| 4201 if (mi_col + x < cm->mi_cols && mi_row + y < cm->mi_rows) | 4083 if (mi_col + x < cm->mi_cols && mi_row + y < cm->mi_rows) |
| 4202 mi_8x8[mis * y + x].src_mi->mbmi.tx_size = tx_size; | 4084 mi_8x8[mis * y + x].src_mi->mbmi.tx_size = tx_size; |
| 4203 } | 4085 } |
| 4204 ++td->counts->tx.tx_totals[mbmi->tx_size]; | 4086 ++td->counts->tx.tx_totals[mbmi->tx_size]; |
| 4205 ++td->counts->tx.tx_totals[get_uv_tx_size(mbmi, &xd->plane[1])]; | 4087 ++td->counts->tx.tx_totals[get_uv_tx_size(mbmi, &xd->plane[1])]; |
| 4206 } | 4088 } |
| 4207 } | 4089 } |
| OLD | NEW |