From 387af97a26105fce79e6a8726752cf183d40939e Mon Sep 17 00:00:00 2001 From: Mohamed Tarek Date: Thu, 15 Jul 2010 05:38:09 +0000 Subject: Initial cleanup for libwmapro. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27425 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libwmapro/wmapro_math.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/codecs/libwmapro/wmapro_math.h') diff --git a/apps/codecs/libwmapro/wmapro_math.h b/apps/codecs/libwmapro/wmapro_math.h index b339d8616d..4614bcbe56 100644 --- a/apps/codecs/libwmapro/wmapro_math.h +++ b/apps/codecs/libwmapro/wmapro_math.h @@ -48,4 +48,10 @@ static inline void vector_fixmul_scalar(FIXED *dst, const FIXED *src, FIXED mul, dst[i] = fixmulshift(src[i],mul,shift); } +static inline int av_clip(int a, int amin, int amax) +{ + if (a < amin) return amin; + else if (a > amax) return amax; + else return a; +} #endif /* _WMAPRO_MATH_H_ */ -- cgit v1.2.3