OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 if (cpi->ref_frame_flags & flag_list[ref_frame]) { | 617 if (cpi->ref_frame_flags & flag_list[ref_frame]) { |
618 const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame); | 618 const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame); |
619 int_mv *const candidates = mbmi->ref_mvs[ref_frame]; | 619 int_mv *const candidates = mbmi->ref_mvs[ref_frame]; |
620 const struct scale_factors *const sf = &cm->frame_refs[ref_frame - 1].sf; | 620 const struct scale_factors *const sf = &cm->frame_refs[ref_frame - 1].sf; |
621 | 621 |
622 vp9_setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col, | 622 vp9_setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col, |
623 sf, sf); | 623 sf, sf); |
624 | 624 |
625 if (cm->use_prev_frame_mvs) | 625 if (cm->use_prev_frame_mvs) |
626 vp9_find_mv_refs(cm, xd, tile_info, xd->mi[0].src_mi, ref_frame, | 626 vp9_find_mv_refs(cm, xd, tile_info, xd->mi[0].src_mi, ref_frame, |
627 candidates, mi_row, mi_col, NULL, NULL); | 627 candidates, mi_row, mi_col); |
628 else | 628 else |
629 const_motion[ref_frame] = mv_refs_rt(cm, xd, tile_info, | 629 const_motion[ref_frame] = mv_refs_rt(cm, xd, tile_info, |
630 xd->mi[0].src_mi, | 630 xd->mi[0].src_mi, |
631 ref_frame, candidates, | 631 ref_frame, candidates, |
632 mi_row, mi_col); | 632 mi_row, mi_col); |
633 | 633 |
634 vp9_find_best_ref_mvs(xd, cm->allow_high_precision_mv, candidates, | 634 vp9_find_best_ref_mvs(xd, cm->allow_high_precision_mv, candidates, |
635 &frame_mv[NEARESTMV][ref_frame], | 635 &frame_mv[NEARESTMV][ref_frame], |
636 &frame_mv[NEARMV][ref_frame]); | 636 &frame_mv[NEARMV][ref_frame]); |
637 | 637 |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 x->pred_mv_sad[ref_frame] = INT_MAX; | 981 x->pred_mv_sad[ref_frame] = INT_MAX; |
982 | 982 |
983 if (cpi->ref_frame_flags & flag_list[ref_frame]) { | 983 if (cpi->ref_frame_flags & flag_list[ref_frame]) { |
984 const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame); | 984 const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame); |
985 int_mv *const candidates = mbmi->ref_mvs[ref_frame]; | 985 int_mv *const candidates = mbmi->ref_mvs[ref_frame]; |
986 const struct scale_factors *const sf = | 986 const struct scale_factors *const sf = |
987 &cm->frame_refs[ref_frame - 1].sf; | 987 &cm->frame_refs[ref_frame - 1].sf; |
988 vp9_setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col, | 988 vp9_setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col, |
989 sf, sf); | 989 sf, sf); |
990 vp9_find_mv_refs(cm, xd, tile_info, xd->mi[0].src_mi, ref_frame, | 990 vp9_find_mv_refs(cm, xd, tile_info, xd->mi[0].src_mi, ref_frame, |
991 candidates, mi_row, mi_col, NULL, NULL); | 991 candidates, mi_row, mi_col); |
992 | 992 |
993 vp9_find_best_ref_mvs(xd, cm->allow_high_precision_mv, candidates, | 993 vp9_find_best_ref_mvs(xd, cm->allow_high_precision_mv, candidates, |
994 &dummy_mv[0], &dummy_mv[1]); | 994 &dummy_mv[0], &dummy_mv[1]); |
995 } else { | 995 } else { |
996 ref_frame_skip_mask |= (1 << ref_frame); | 996 ref_frame_skip_mask |= (1 << ref_frame); |
997 } | 997 } |
998 } | 998 } |
999 | 999 |
1000 mbmi->sb_type = bsize; | 1000 mbmi->sb_type = bsize; |
1001 mbmi->tx_size = TX_4X4; | 1001 mbmi->tx_size = TX_4X4; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 xd->mi[0].bmi[block + 2] = bsi[best_ref_frame][block]; | 1186 xd->mi[0].bmi[block + 2] = bsi[best_ref_frame][block]; |
1187 } | 1187 } |
1188 } | 1188 } |
1189 mbmi->mode = xd->mi[0].bmi[3].as_mode; | 1189 mbmi->mode = xd->mi[0].bmi[3].as_mode; |
1190 ctx->mic = *(xd->mi[0].src_mi); | 1190 ctx->mic = *(xd->mi[0].src_mi); |
1191 ctx->skip_txfm[0] = 0; | 1191 ctx->skip_txfm[0] = 0; |
1192 ctx->skip = 0; | 1192 ctx->skip = 0; |
1193 // Dummy assignment for speed -5. No effect in speed -6. | 1193 // Dummy assignment for speed -5. No effect in speed -6. |
1194 rd_cost->rdcost = best_rd; | 1194 rd_cost->rdcost = best_rd; |
1195 } | 1195 } |
OLD | NEW |