aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/common.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-04-19 03:25:20 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-04-19 03:25:20 +0000
commit91029be79005b17311fcf75f3f9f977f4d20cfd7 (patch)
tree672c42c26c923719256f5e308d1d077e23ff13bb /libavcodec/common.h
parent1f0cd30fd9b656122436ecd625656a04f6235fb3 (diff)
downloadffmpeg-91029be79005b17311fcf75f3f9f977f4d20cfd7.tar.gz
much better ME for b frames (a bit slow though)
fixed MC rounding for b frames fixed hq mode with b-frames Originally committed as revision 406 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.h')
-rw-r--r--libavcodec/common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h
index 96b545d0dc..21cdd541b4 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -881,6 +881,16 @@ static inline int mid_pred(int a, int b, int c)
return a + b + c - vmin - vmax;
}
+static inline int clip(int a, int amin, int amax)
+{
+ if (a < amin)
+ return amin;
+ else if (a > amax)
+ return amax;
+ else
+ return a;
+}
+
/* memory */
void *av_mallocz(int size);