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); |
210 void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd, | 211 void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd, |
211 const TileInfo *const tile, | 212 const TileInfo *const tile, |
212 MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, | 213 MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, |
213 int_mv *mv_ref_list, int mi_row, int mi_col); | 214 int_mv *mv_ref_list, int mi_row, int mi_col, |
| 215 find_mv_refs_sync sync, void *const data); |
214 | 216 |
215 // check a list of motion vectors by sad score using a number rows of pixels | 217 // check a list of motion vectors by sad score using a number rows of pixels |
216 // above and a number cols of pixels in the left to select the one with best | 218 // above and a number cols of pixels in the left to select the one with best |
217 // score to use as ref motion vector | 219 // score to use as ref motion vector |
218 void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp, | 220 void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp, |
219 int_mv *mvlist, int_mv *nearest, int_mv *near); | 221 int_mv *mvlist, int_mv *nearest_mv, int_mv *near_mv); |
220 | 222 |
221 void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd, | 223 void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd, |
222 const TileInfo *const tile, | 224 const TileInfo *const tile, |
223 int block, int ref, int mi_row, int mi_col, | 225 int block, int ref, int mi_row, int mi_col, |
224 int_mv *nearest, int_mv *near); | 226 int_mv *nearest_mv, int_mv *near_mv); |
225 | 227 |
226 #ifdef __cplusplus | 228 #ifdef __cplusplus |
227 } // extern "C" | 229 } // extern "C" |
228 #endif | 230 #endif |
229 | 231 |
230 #endif // VP9_COMMON_VP9_MVREF_COMMON_H_ | 232 #endif // VP9_COMMON_VP9_MVREF_COMMON_H_ |
OLD | NEW |