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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 static const int idx_n_column_to_subblock[4][2] = { | 118 static const int idx_n_column_to_subblock[4][2] = { |
119 {1, 2}, | 119 {1, 2}, |
120 {1, 3}, | 120 {1, 3}, |
121 {3, 2}, | 121 {3, 2}, |
122 {3, 3} | 122 {3, 3} |
123 }; | 123 }; |
124 | 124 |
125 // clamp_mv_ref | 125 // clamp_mv_ref |
126 #define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units | 126 #define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units |
127 | 127 |
128 static void clamp_mv_ref(MV *mv, const MACROBLOCKD *xd) { | 128 static INLINE void clamp_mv_ref(MV *mv, const MACROBLOCKD *xd) { |
129 clamp_mv(mv, xd->mb_to_left_edge - MV_BORDER, | 129 clamp_mv(mv, xd->mb_to_left_edge - MV_BORDER, |
130 xd->mb_to_right_edge + MV_BORDER, | 130 xd->mb_to_right_edge + MV_BORDER, |
131 xd->mb_to_top_edge - MV_BORDER, | 131 xd->mb_to_top_edge - MV_BORDER, |
132 xd->mb_to_bottom_edge + MV_BORDER); | 132 xd->mb_to_bottom_edge + MV_BORDER); |
133 } | 133 } |
134 | 134 |
135 // This function returns either the appropriate sub block or block's mv | 135 // This function returns either the appropriate sub block or block's mv |
136 // on whether the block_size < 8x8 and we have check_sub_blocks set. | 136 // on whether the block_size < 8x8 and we have check_sub_blocks set. |
137 static INLINE int_mv get_sub_block_mv(const MODE_INFO *candidate, int which_mv, | 137 static INLINE int_mv get_sub_block_mv(const MODE_INFO *candidate, int which_mv, |
138 int search_col, int block_idx) { | 138 int search_col, int block_idx) { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd, | 218 void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd, |
219 const TileInfo *const tile, | 219 const TileInfo *const tile, |
220 int block, int ref, int mi_row, int mi_col, | 220 int block, int ref, int mi_row, int mi_col, |
221 int_mv *nearest, int_mv *near); | 221 int_mv *nearest, int_mv *near); |
222 | 222 |
223 #ifdef __cplusplus | 223 #ifdef __cplusplus |
224 } // extern "C" | 224 } // extern "C" |
225 #endif | 225 #endif |
226 | 226 |
227 #endif // VP9_COMMON_VP9_MVREF_COMMON_H_ | 227 #endif // VP9_COMMON_VP9_MVREF_COMMON_H_ |
OLD | NEW |