Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: source/libvpx/vp8/common/findnearmv.h

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp8/common/common.h ('k') | source/libvpx/vp8/common/generic/systemdependent.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/common/findnearmv.h
diff --git a/source/libvpx/vp8/common/findnearmv.h b/source/libvpx/vp8/common/findnearmv.h
index 3c8c0506f67501aeacb929f271e833a2716431ae..155847ca24066f505585c03dbe8a359f2f18c538 100644
--- a/source/libvpx/vp8/common/findnearmv.h
+++ b/source/libvpx/vp8/common/findnearmv.h
@@ -12,6 +12,7 @@
#ifndef VP8_COMMON_FINDNEARMV_H_
#define VP8_COMMON_FINDNEARMV_H_
+#include "./vpx_config.h"
#include "mv.h"
#include "blockd.h"
#include "modecont.h"
@@ -22,8 +23,8 @@ extern "C" {
#endif
-static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp,
- const int *ref_frame_sign_bias)
+static INLINE void mv_bias(int refmb_ref_frame_sign_bias, int refframe,
+ int_mv *mvp, const int *ref_frame_sign_bias)
{
if (refmb_ref_frame_sign_bias != ref_frame_sign_bias[refframe])
{
@@ -34,7 +35,7 @@ static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp,
#define LEFT_TOP_MARGIN (16 << 3)
#define RIGHT_BOTTOM_MARGIN (16 << 3)
-static void vp8_clamp_mv2(int_mv *mv, const MACROBLOCKD *xd)
+static INLINE void vp8_clamp_mv2(int_mv *mv, const MACROBLOCKD *xd)
{
if (mv->as_mv.col < (xd->mb_to_left_edge - LEFT_TOP_MARGIN))
mv->as_mv.col = xd->mb_to_left_edge - LEFT_TOP_MARGIN;
@@ -47,8 +48,9 @@ static void vp8_clamp_mv2(int_mv *mv, const MACROBLOCKD *xd)
mv->as_mv.row = xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN;
}
-static void vp8_clamp_mv(int_mv *mv, int mb_to_left_edge, int mb_to_right_edge,
- int mb_to_top_edge, int mb_to_bottom_edge)
+static INLINE void vp8_clamp_mv(int_mv *mv, int mb_to_left_edge,
+ int mb_to_right_edge, int mb_to_top_edge,
+ int mb_to_bottom_edge)
{
mv->as_mv.col = (mv->as_mv.col < mb_to_left_edge) ?
mb_to_left_edge : mv->as_mv.col;
@@ -59,9 +61,10 @@ static void vp8_clamp_mv(int_mv *mv, int mb_to_left_edge, int mb_to_right_edge,
mv->as_mv.row = (mv->as_mv.row > mb_to_bottom_edge) ?
mb_to_bottom_edge : mv->as_mv.row;
}
-static unsigned int vp8_check_mv_bounds(int_mv *mv, int mb_to_left_edge,
- int mb_to_right_edge, int mb_to_top_edge,
- int mb_to_bottom_edge)
+static INLINE unsigned int vp8_check_mv_bounds(int_mv *mv, int mb_to_left_edge,
+ int mb_to_right_edge,
+ int mb_to_top_edge,
+ int mb_to_bottom_edge)
{
unsigned int need_to_clamp;
need_to_clamp = (mv->as_mv.col < mb_to_left_edge);
@@ -101,7 +104,7 @@ vp8_prob *vp8_mv_ref_probs(
extern const unsigned char vp8_mbsplit_offset[4][16];
-static int left_block_mv(const MODE_INFO *cur_mb, int b)
+static INLINE int left_block_mv(const MODE_INFO *cur_mb, int b)
{
if (!(b & 3))
{
@@ -116,7 +119,7 @@ static int left_block_mv(const MODE_INFO *cur_mb, int b)
return (cur_mb->bmi + b - 1)->mv.as_int;
}
-static int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride)
+static INLINE int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride)
{
if (!(b >> 2))
{
@@ -130,7 +133,7 @@ static int above_block_mv(const MODE_INFO *cur_mb, int b, int mi_stride)
return (cur_mb->bmi + (b - 4))->mv.as_int;
}
-static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b)
+static INLINE B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b)
{
if (!(b & 3))
{
@@ -156,7 +159,8 @@ static B_PREDICTION_MODE left_block_mode(const MODE_INFO *cur_mb, int b)
return (cur_mb->bmi + b - 1)->as_mode;
}
-static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, int mi_stride)
+static INLINE B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b,
+ int mi_stride)
{
if (!(b >> 2))
{
« no previous file with comments | « source/libvpx/vp8/common/common.h ('k') | source/libvpx/vp8/common/generic/systemdependent.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698