diff options
author | wm4 <wm4@nowhere> | 2013-10-26 15:05:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-10-26 15:05:59 +0200 |
commit | 7abc1bef40869d4efba88df8c5ad8b1ea4c49c57 (patch) | |
tree | ed1ef6c259c01dc119c4b99f84daefef5161bd93 /audio/filter/af_tools.c | |
parent | 74e7043cc756e171ea1a7fd4be01019c14e1e265 (diff) | |
download | mpv-7abc1bef40869d4efba88df8c5ad8b1ea4c49c57.tar.bz2 mpv-7abc1bef40869d4efba88df8c5ad8b1ea4c49c57.tar.xz |
af: replace macros with too generic names
Defining names like min, max etc. in an often used header is not really
a good idea.
Somewhat similar to MPlayer svn commit 36491, but don't use libavutil,
because that typically causes us sorrow.
Diffstat (limited to 'audio/filter/af_tools.c')
-rw-r--r-- | audio/filter/af_tools.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/filter/af_tools.c b/audio/filter/af_tools.c index 77fdad55f2..77638ed9d6 100644 --- a/audio/filter/af_tools.c +++ b/audio/filter/af_tools.c @@ -18,6 +18,8 @@ #include <math.h> #include <string.h> + +#include "mpvcore/mp_common.h" #include "af.h" /* Convert to gain value from dB. Returns AF_OK if of and AF_ERROR if @@ -33,7 +35,7 @@ int af_from_dB(int n, float* in, float* out, float k, float mi, float ma) if(in[i]<=-200) out[i]=0.0; else - out[i]=pow(10.0,clamp(in[i],mi,ma)/k); + out[i]=pow(10.0,MPCLAMP(in[i],mi,ma)/k); } return AF_OK; } @@ -65,7 +67,7 @@ int af_from_ms(int n, float* in, int* out, int rate, float mi, float ma) return AF_ERROR; for(i=0;i<n;i++) - out[i]=(int)((float)rate * clamp(in[i],mi,ma)/1000.0); + out[i]=(int)((float)rate * MPCLAMP(in[i],mi,ma)/1000.0); return AF_OK; } |