summaryrefslogtreecommitdiffstats
path: root/libvpx/vp9/common/vp9_mv.h
diff options
context:
space:
mode:
Diffstat (limited to 'libvpx/vp9/common/vp9_mv.h')
-rw-r--r--libvpx/vp9/common/vp9_mv.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/libvpx/vp9/common/vp9_mv.h b/libvpx/vp9/common/vp9_mv.h
index 31a79b9..3eb7f9d 100644
--- a/libvpx/vp9/common/vp9_mv.h
+++ b/libvpx/vp9/common/vp9_mv.h
@@ -15,7 +15,11 @@
#include "vp9/common/vp9_common.h"
-typedef struct {
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct mv {
int16_t row;
int16_t col;
} MV;
@@ -25,15 +29,19 @@ typedef union int_mv {
MV as_mv;
} int_mv; /* facilitates faster equality tests and copies */
-typedef struct {
+typedef struct mv32 {
int32_t row;
int32_t col;
} MV32;
-static void clamp_mv(MV *mv, int min_col, int max_col,
- int min_row, int max_row) {
+static INLINE void clamp_mv(MV *mv, int min_col, int max_col,
+ int min_row, int max_row) {
mv->col = clamp(mv->col, min_col, max_col);
mv->row = clamp(mv->row, min_row, max_row);
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP9_COMMON_VP9_MV_H_