[FFmpeg-soc] [soc]: r232 - amr/amrnbdec.c

superdump subversion at mplayerhq.hu
Tue Jun 5 17:09:01 CEST 2007


Author: superdump
Date: Tue Jun  5 17:09:01 2007
New Revision: 232

Log:
Use memcpy instead of stupid assignment loop

Modified:
   amr/amrnbdec.c

Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c	(original)
+++ amr/amrnbdec.c	Tue Jun  5 17:09:01 2007
@@ -1189,12 +1189,7 @@ static int median(int *values, int n) {
     int temp[9]; // largest n used for median calculation is 9
     int i;
 
-    for(i=0; i<n; i++) {
-        temp[i] = values[i];
-    }
-
-//  is memcpy better here instead of the above loop?
-//  memcpy(values, temp, n*sizeof(int));
+    memcpy(values, temp, n*sizeof(int));
 
     qsort(temp, n, sizeof(int), qsort_compare);
 



More information about the FFmpeg-soc mailing list