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 16 matching lines...) Expand all Loading... |
27 MACROBLOCK *const x = &cpi->mb; | 27 MACROBLOCK *const x = &cpi->mb; |
28 MACROBLOCKD *const xd = &x->e_mbd; | 28 MACROBLOCKD *const xd = &x->e_mbd; |
29 const MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv; | 29 const MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv; |
30 const vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; | 30 const vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; |
31 | 31 |
32 const int tmp_col_min = x->mv_col_min; | 32 const int tmp_col_min = x->mv_col_min; |
33 const int tmp_col_max = x->mv_col_max; | 33 const int tmp_col_max = x->mv_col_max; |
34 const int tmp_row_min = x->mv_row_min; | 34 const int tmp_row_min = x->mv_row_min; |
35 const int tmp_row_max = x->mv_row_max; | 35 const int tmp_row_max = x->mv_row_max; |
36 MV ref_full; | 36 MV ref_full; |
37 int sad_list[5]; | 37 int cost_list[5]; |
38 | 38 |
39 // Further step/diamond searches as necessary | 39 // Further step/diamond searches as necessary |
40 int step_param = mv_sf->reduce_first_step_size; | 40 int step_param = mv_sf->reduce_first_step_size; |
41 step_param = MIN(step_param, MAX_MVSEARCH_STEPS - 2); | 41 step_param = MIN(step_param, MAX_MVSEARCH_STEPS - 2); |
42 | 42 |
43 vp9_set_mv_search_range(x, ref_mv); | 43 vp9_set_mv_search_range(x, ref_mv); |
44 | 44 |
45 ref_full.col = ref_mv->col >> 3; | 45 ref_full.col = ref_mv->col >> 3; |
46 ref_full.row = ref_mv->row >> 3; | 46 ref_full.row = ref_mv->row >> 3; |
47 | 47 |
48 /*cpi->sf.search_method == HEX*/ | 48 /*cpi->sf.search_method == HEX*/ |
49 vp9_hex_search(x, &ref_full, step_param, x->errorperbit, 0, | 49 vp9_hex_search(x, &ref_full, step_param, x->errorperbit, 0, |
50 cond_sad_list(cpi, sad_list), | 50 cond_cost_list(cpi, cost_list), |
51 &v_fn_ptr, 0, ref_mv, dst_mv); | 51 &v_fn_ptr, 0, ref_mv, dst_mv); |
52 | 52 |
53 // Try sub-pixel MC | 53 // Try sub-pixel MC |
54 // if (bestsme > error_thresh && bestsme < INT_MAX) | 54 // if (bestsme > error_thresh && bestsme < INT_MAX) |
55 { | 55 { |
56 int distortion; | 56 int distortion; |
57 unsigned int sse; | 57 unsigned int sse; |
58 cpi->find_fractional_mv_step( | 58 cpi->find_fractional_mv_step( |
59 x, dst_mv, ref_mv, cpi->common.allow_high_precision_mv, x->errorperbit, | 59 x, dst_mv, ref_mv, cpi->common.allow_high_precision_mv, x->errorperbit, |
60 &v_fn_ptr, 0, mv_sf->subpel_iters_per_step, | 60 &v_fn_ptr, 0, mv_sf->subpel_iters_per_step, |
61 cond_sad_list(cpi, sad_list), | 61 cond_cost_list(cpi, cost_list), |
62 NULL, NULL, | 62 NULL, NULL, |
63 &distortion, &sse, NULL, 0, 0); | 63 &distortion, &sse, NULL, 0, 0); |
64 } | 64 } |
65 | 65 |
66 xd->mi[0].src_mi->mbmi.mode = NEWMV; | 66 xd->mi[0].src_mi->mbmi.mode = NEWMV; |
67 xd->mi[0].src_mi->mbmi.mv[0].as_mv = *dst_mv; | 67 xd->mi[0].src_mi->mbmi.mv[0].as_mv = *dst_mv; |
68 | 68 |
69 vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_16X16); | 69 vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_16X16); |
70 | 70 |
71 /* restore UMV window */ | 71 /* restore UMV window */ |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 assert(q_cur != NULL); | 403 assert(q_cur != NULL); |
404 | 404 |
405 update_mbgraph_frame_stats(cpi, frame_stats, &q_cur->img, | 405 update_mbgraph_frame_stats(cpi, frame_stats, &q_cur->img, |
406 golden_ref, cpi->Source); | 406 golden_ref, cpi->Source); |
407 } | 407 } |
408 | 408 |
409 vp9_clear_system_state(); | 409 vp9_clear_system_state(); |
410 | 410 |
411 separate_arf_mbs(cpi); | 411 separate_arf_mbs(cpi); |
412 } | 412 } |
OLD | NEW |