diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-07-13 19:59:44 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-07-13 19:59:44 +0000 |
commit | 4138ad961c4d577d32beb930155558d05bd2cfd3 (patch) | |
tree | 3fb5e811387f72b696a87cd79e4bb9b1cce86f49 /libavcodec | |
parent | 8effdce0e70cb130feb5c8f0e89bc01c98d1764c (diff) | |
download | ffmpeg-4138ad961c4d577d32beb930155558d05bd2cfd3.tar.gz |
Add av_clipf() function to common.h and use it in ra288.c
Originally committed as revision 14213 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ra288.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c index 72ed8102ee..57ee6c20dd 100644 --- a/libavcodec/ra288.c +++ b/libavcodec/ra288.c @@ -88,14 +88,8 @@ static void decode(Real288_internal *glob, float gain, int cb_coef) /* output */ for (x=0; x < 5; x++) { - float f = glob->sb[4-x] + buffer[x]; - - if (f > 4095) - f = 4095; - else if (f < -4095) - f = -4095; - - glob->output[glob->phase*5+x] = glob->sb[4-x] = f; + glob->output[glob->phase*5+x] = glob->sb[4-x] = + av_clipf(glob->sb[4-x] + buffer[x], -4095, 4095); } } |