[FFmpeg-cvslog] r26027 - trunk/libavcodec/ac3enc.c

jbr subversion
Thu Dec 16 04:13:41 CET 2010


Author: jbr
Date: Thu Dec 16 04:13:41 2010
New Revision: 26027

Log:
Use memcpy() instead of a for loop in mdct512().
8% faster in function.

Modified:
   trunk/libavcodec/ac3enc.c

Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c	Thu Dec 16 03:33:02 2010	(r26026)
+++ trunk/libavcodec/ac3enc.c	Thu Dec 16 04:13:41 2010	(r26027)
@@ -339,8 +339,7 @@ static void mdct512(int32_t *out, int16_
     /* shift to simplify computations */
     for (i = 0; i < MDCT_SAMPLES/4; i++)
         rot[i] = -in[i + 3*MDCT_SAMPLES/4];
-    for (;i < MDCT_SAMPLES; i++)
-        rot[i] =  in[i -   MDCT_SAMPLES/4];
+    memcpy(&rot[MDCT_SAMPLES/4], &in[0], 3*MDCT_SAMPLES/4*sizeof(*in));
 
     /* pre rotation */
     for (i = 0; i < MDCT_SAMPLES/4; i++) {



More information about the ffmpeg-cvslog mailing list