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

vitor subversion
Wed Aug 6 07:11:46 CEST 2008


Author: vitor
Date: Wed Aug  6 07:11:46 2008
New Revision: 14639

Log:
Simplify rms(): merge a few operations in the same statement

Modified:
   trunk/libavcodec/ra144.c

Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c	(original)
+++ trunk/libavcodec/ra144.c	Wed Aug  6 07:11:46 2008
@@ -154,7 +154,7 @@ static unsigned int rms(const int *data)
 {
     int i;
     unsigned int res = 0x10000;
-    int b = 0;
+    int b = 10;
 
     for (i=0; i < 10; i++) {
         res = (((0x1000000 - data[i]*data[i]) >> 12) * res) >> 12;
@@ -168,10 +168,7 @@ static unsigned int rms(const int *data)
         }
     }
 
-    res = t_sqrt(res);
-
-    res >>= (b + 10);
-    return res;
+    return t_sqrt(res) >> b;
 }
 
 static void do_output_subblock(RA144Context *ractx, const uint16_t  *lpc_coefs,




More information about the ffmpeg-cvslog mailing list