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 27 matching lines...) Expand all Loading... |
38 void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride); | 38 void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride); |
39 void vp9_init3smotion_compensation(MACROBLOCK *x, int stride); | 39 void vp9_init3smotion_compensation(MACROBLOCK *x, int stride); |
40 | 40 |
41 struct VP9_COMP; | 41 struct VP9_COMP; |
42 int vp9_init_search_range(struct VP9_COMP *cpi, int size); | 42 int vp9_init_search_range(struct VP9_COMP *cpi, int size); |
43 | 43 |
44 // Runs sequence of diamond searches in smaller steps for RD | 44 // Runs sequence of diamond searches in smaller steps for RD |
45 int vp9_full_pixel_diamond(struct VP9_COMP *cpi, MACROBLOCK *x, | 45 int vp9_full_pixel_diamond(struct VP9_COMP *cpi, MACROBLOCK *x, |
46 MV *mvp_full, int step_param, | 46 MV *mvp_full, int step_param, |
47 int sadpb, int further_steps, int do_refine, | 47 int sadpb, int further_steps, int do_refine, |
48 vp9_variance_fn_ptr_t *fn_ptr, | 48 const vp9_variance_fn_ptr_t *fn_ptr, |
49 const MV *ref_mv, int_mv *dst_mv); | 49 const MV *ref_mv, MV *dst_mv); |
50 | 50 |
51 int vp9_hex_search(MACROBLOCK *x, | 51 int vp9_hex_search(const MACROBLOCK *x, |
52 MV *ref_mv, | 52 MV *ref_mv, |
53 int search_param, | 53 int search_param, |
54 int error_per_bit, | 54 int error_per_bit, |
55 int do_init_search, | 55 int do_init_search, |
56 const vp9_variance_fn_ptr_t *vf, | 56 const vp9_variance_fn_ptr_t *vf, |
57 int use_mvcost, | 57 int use_mvcost, |
58 const MV *center_mv, | 58 const MV *center_mv, |
59 MV *best_mv); | 59 MV *best_mv); |
60 int vp9_bigdia_search(MACROBLOCK *x, | 60 int vp9_bigdia_search(const MACROBLOCK *x, |
61 MV *ref_mv, | 61 MV *ref_mv, |
62 int search_param, | 62 int search_param, |
63 int error_per_bit, | 63 int error_per_bit, |
64 int do_init_search, | 64 int do_init_search, |
65 const vp9_variance_fn_ptr_t *vf, | 65 const vp9_variance_fn_ptr_t *vf, |
66 int use_mvcost, | 66 int use_mvcost, |
67 const MV *center_mv, | 67 const MV *center_mv, |
68 MV *best_mv); | 68 MV *best_mv); |
69 int vp9_square_search(MACROBLOCK *x, | 69 int vp9_square_search(const MACROBLOCK *x, |
70 MV *ref_mv, | 70 MV *ref_mv, |
71 int search_param, | 71 int search_param, |
72 int error_per_bit, | 72 int error_per_bit, |
73 int do_init_search, | 73 int do_init_search, |
74 const vp9_variance_fn_ptr_t *vf, | 74 const vp9_variance_fn_ptr_t *vf, |
75 int use_mvcost, | 75 int use_mvcost, |
76 const MV *center_mv, | 76 const MV *center_mv, |
77 MV *best_mv); | 77 MV *best_mv); |
78 | 78 |
79 typedef int (fractional_mv_step_fp) ( | 79 typedef int (fractional_mv_step_fp) ( |
80 MACROBLOCK *x, | 80 const MACROBLOCK *x, |
81 MV *bestmv, const MV *ref_mv, | 81 MV *bestmv, const MV *ref_mv, |
82 int allow_hp, | 82 int allow_hp, |
83 int error_per_bit, | 83 int error_per_bit, |
84 const vp9_variance_fn_ptr_t *vfp, | 84 const vp9_variance_fn_ptr_t *vfp, |
85 int forced_stop, // 0 - full, 1 - qtr only, 2 - half only | 85 int forced_stop, // 0 - full, 1 - qtr only, 2 - half only |
86 int iters_per_step, | 86 int iters_per_step, |
87 int *mvjcost, | 87 int *mvjcost, |
88 int *mvcost[2], | 88 int *mvcost[2], |
89 int *distortion, | 89 int *distortion, |
90 unsigned int *sse); | 90 unsigned int *sse); |
91 | 91 |
92 extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree; | 92 extern fractional_mv_step_fp vp9_find_best_sub_pixel_tree; |
93 | 93 |
94 typedef int (fractional_mv_step_comp_fp) ( | 94 typedef int (fractional_mv_step_comp_fp) ( |
95 MACROBLOCK *x, | 95 const MACROBLOCK *x, |
96 MV *bestmv, const MV *ref_mv, | 96 MV *bestmv, const MV *ref_mv, |
97 int allow_hp, | 97 int allow_hp, |
98 int error_per_bit, | 98 int error_per_bit, |
99 const vp9_variance_fn_ptr_t *vfp, | 99 const vp9_variance_fn_ptr_t *vfp, |
100 int forced_stop, // 0 - full, 1 - qtr only, 2 - half only | 100 int forced_stop, // 0 - full, 1 - qtr only, 2 - half only |
101 int iters_per_step, | 101 int iters_per_step, |
102 int *mvjcost, int *mvcost[2], | 102 int *mvjcost, int *mvcost[2], |
103 int *distortion, unsigned int *sse1, | 103 int *distortion, unsigned int *sse1, |
104 const uint8_t *second_pred, | 104 const uint8_t *second_pred, |
105 int w, int h); | 105 int w, int h); |
106 | 106 |
107 extern fractional_mv_step_comp_fp vp9_find_best_sub_pixel_comp_tree; | 107 extern fractional_mv_step_comp_fp vp9_find_best_sub_pixel_comp_tree; |
108 | 108 |
109 typedef int (*vp9_full_search_fn_t)(MACROBLOCK *x, | 109 typedef int (*vp9_full_search_fn_t)(const MACROBLOCK *x, |
110 MV *ref_mv, int sad_per_bit, | 110 const MV *ref_mv, int sad_per_bit, |
111 int distance, vp9_variance_fn_ptr_t *fn_ptr, | 111 int distance, |
| 112 const vp9_variance_fn_ptr_t *fn_ptr, |
112 int *mvjcost, int *mvcost[2], | 113 int *mvjcost, int *mvcost[2], |
113 const MV *center_mv, int n); | 114 const MV *center_mv, int n); |
114 | 115 |
115 typedef int (*vp9_refining_search_fn_t)(const MACROBLOCK *x, | 116 typedef int (*vp9_refining_search_fn_t)(const MACROBLOCK *x, |
116 MV *ref_mv, int sad_per_bit, | 117 MV *ref_mv, int sad_per_bit, |
117 int distance, | 118 int distance, |
118 vp9_variance_fn_ptr_t *fn_ptr, | 119 const vp9_variance_fn_ptr_t *fn_ptr, |
119 int *mvjcost, int *mvcost[2], | 120 int *mvjcost, int *mvcost[2], |
120 const MV *center_mv); | 121 const MV *center_mv); |
121 | 122 |
122 typedef int (*vp9_diamond_search_fn_t)(MACROBLOCK *x, | 123 typedef int (*vp9_diamond_search_fn_t)(const MACROBLOCK *x, |
123 MV *ref_mv, MV *best_mv, | 124 MV *ref_mv, MV *best_mv, |
124 int search_param, int sad_per_bit, | 125 int search_param, int sad_per_bit, |
125 int *num00, | 126 int *num00, |
126 vp9_variance_fn_ptr_t *fn_ptr, | 127 const vp9_variance_fn_ptr_t *fn_ptr, |
127 int *mvjcost, int *mvcost[2], | 128 int *mvjcost, int *mvcost[2], |
128 const MV *center_mv); | 129 const MV *center_mv); |
129 | 130 |
130 int vp9_refining_search_8p_c(const MACROBLOCK *x, | 131 int vp9_refining_search_8p_c(const MACROBLOCK *x, |
131 MV *ref_mv, int error_per_bit, | 132 MV *ref_mv, int error_per_bit, |
132 int search_range, vp9_variance_fn_ptr_t *fn_ptr, | 133 int search_range, |
| 134 const vp9_variance_fn_ptr_t *fn_ptr, |
133 int *mvjcost, int *mvcost[2], | 135 int *mvjcost, int *mvcost[2], |
134 const MV *center_mv, const uint8_t *second_pred, | 136 const MV *center_mv, const uint8_t *second_pred, |
135 int w, int h); | 137 int w, int h); |
136 #ifdef __cplusplus | 138 #ifdef __cplusplus |
137 } // extern "C" | 139 } // extern "C" |
138 #endif | 140 #endif |
139 | 141 |
140 #endif // VP9_ENCODER_VP9_MCOMP_H_ | 142 #endif // VP9_ENCODER_VP9_MCOMP_H_ |
OLD | NEW |