OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf6497e
)
Simplify irms()
author
Vitor Sessak
<vitor1001@gmail.com>
Wed, 21 May 2008 16:43:33 +0000
(16:43 +0000)
committer
Vitor Sessak
<vitor1001@gmail.com>
Wed, 21 May 2008 16:43:33 +0000
(16:43 +0000)
Originally committed as revision 13215 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/ra144.c
patch
|
blob
|
history
diff --git
a/libavcodec/ra144.c
b/libavcodec/ra144.c
index
d85d719
..
b3435bb
100644
(file)
--- a/
libavcodec/ra144.c
+++ b/
libavcodec/ra144.c
@@
-112,12
+112,10
@@
static void rotate_block(const short *source, short *target, int offset)
/* inverse root mean square */
static int irms(const short *data, int factor)
{
- const short *p1, *p2;
- unsigned int sum;
+ unsigned int i, sum = 0;
- p2 = (p1 = data) + BLOCKSIZE;
- for (sum=0; p2 > p1; p1++)
- sum += (*p1) * (*p1);
+ for (i=0; i < BLOCKSIZE; i++)
+ sum += data[i] * data[i];
if (sum == 0)
return 0; /* OOPS - division by zero */