Mercurial > libavcodec.hg
changeset 7265:433a8fbbdd00 libavcodec
Add av_clipf() function to common.h and use it in ra288.c
author | vitor |
---|---|
date | Sun, 13 Jul 2008 19:59:44 +0000 |
parents | a9ca5a1b8a1e |
children | 451bc2b25bcb |
files | ra288.c |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ra288.c Sun Jul 13 19:41:13 2008 +0000 +++ b/ra288.c Sun Jul 13 19:59:44 2008 +0000 @@ -88,14 +88,8 @@ /* 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); } }