OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 #ifndef VP9_COMMON_VP9_MVREF_COMMON_H_ | 10 #ifndef VP9_COMMON_VP9_MVREF_COMMON_H_ |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 | 201 |
202 // TODO(jingning): this mv clamping function should be block size dependent. | 202 // TODO(jingning): this mv clamping function should be block size dependent. |
203 static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) { | 203 static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) { |
204 clamp_mv(mv, xd->mb_to_left_edge - LEFT_TOP_MARGIN, | 204 clamp_mv(mv, xd->mb_to_left_edge - LEFT_TOP_MARGIN, |
205 xd->mb_to_right_edge + RIGHT_BOTTOM_MARGIN, | 205 xd->mb_to_right_edge + RIGHT_BOTTOM_MARGIN, |
206 xd->mb_to_top_edge - LEFT_TOP_MARGIN, | 206 xd->mb_to_top_edge - LEFT_TOP_MARGIN, |
207 xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN); | 207 xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN); |
208 } | 208 } |
209 | 209 |
210 typedef void (*find_mv_refs_sync)(void *const data, int mi_row); | |
211 void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd, | 210 void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd, |
212 const TileInfo *const tile, | 211 const TileInfo *const tile, |
213 MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, | 212 MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, |
214 int_mv *mv_ref_list, int mi_row, int mi_col, | 213 int_mv *mv_ref_list, int mi_row, int mi_col); |
215 find_mv_refs_sync sync, void *const data); | |
216 | 214 |
217 // check a list of motion vectors by sad score using a number rows of pixels | 215 // check a list of motion vectors by sad score using a number rows of pixels |
218 // above and a number cols of pixels in the left to select the one with best | 216 // above and a number cols of pixels in the left to select the one with best |
219 // score to use as ref motion vector | 217 // score to use as ref motion vector |
220 void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp, | 218 void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp, |
221 int_mv *mvlist, int_mv *nearest_mv, int_mv *near_mv); | 219 int_mv *mvlist, int_mv *nearest, int_mv *near); |
222 | 220 |
223 void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd, | 221 void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd, |
224 const TileInfo *const tile, | 222 const TileInfo *const tile, |
225 int block, int ref, int mi_row, int mi_col, | 223 int block, int ref, int mi_row, int mi_col, |
226 int_mv *nearest_mv, int_mv *near_mv); | 224 int_mv *nearest, int_mv *near); |
227 | 225 |
228 #ifdef __cplusplus | 226 #ifdef __cplusplus |
229 } // extern "C" | 227 } // extern "C" |
230 #endif | 228 #endif |
231 | 229 |
232 #endif // VP9_COMMON_VP9_MVREF_COMMON_H_ | 230 #endif // VP9_COMMON_VP9_MVREF_COMMON_H_ |
OLD | NEW |