[FFmpeg-cvslog] r13215 - trunk/libavcodec/ra144.c

vitor subversion
Wed May 21 18:43:34 CEST 2008


Author: vitor
Date: Wed May 21 18:43:33 2008
New Revision: 13215

Log:
Simplify irms()

Modified:
   trunk/libavcodec/ra144.c

Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c	(original)
+++ trunk/libavcodec/ra144.c	Wed May 21 18:43:33 2008
@@ -112,12 +112,10 @@ static void rotate_block(const short *so
 /* 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 */




More information about the ffmpeg-cvslog mailing list