diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-06-23 20:35:02 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-06-23 20:35:02 +0000 |
commit | 536ee17499aefbb7ca33946c3c15c735d50ac5dd (patch) | |
tree | c0f6c15a536594ea2db3730a7fb67852d047ee2b | |
parent | 498cb531637f597e1b8e3d37186fccc704c006d3 (diff) | |
download | ffmpeg-536ee17499aefbb7ca33946c3c15c735d50ac5dd.tar.gz |
Move factor multiplication out of irms()
Originally committed as revision 13926 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/ra144.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c index e43fcd1b28..4ab1e4bf5b 100644 --- a/libavcodec/ra144.c +++ b/libavcodec/ra144.c @@ -111,7 +111,7 @@ static void copy_and_dup(const int16_t *source, int16_t *target, int offset) } /** inverse root mean square */ -static int irms(const int16_t *data, int factor) +static int irms(const int16_t *data) { unsigned int i, sum = 0; @@ -121,7 +121,7 @@ static int irms(const int16_t *data, int factor) if (sum == 0) return 0; /* OOPS - division by zero */ - return (0x20000000 / (t_sqrt(sum) >> 8)) * factor; + return 0x20000000 / (t_sqrt(sum) >> 8); } static void add_wav(int n, int skip_first, int *m, const int16_t *s1, @@ -217,7 +217,7 @@ static void do_output_subblock(RA144Context *ractx, if (cba_idx) { cba_idx += BLOCKSIZE/2 - 1; copy_and_dup(ractx->adapt_cb, buffer_a, cba_idx); - m[0] = irms(buffer_a, gval) >> 12; + m[0] = (irms(buffer_a) * gval) >> 12; } else { m[0] = 0; } |