[FFmpeg-soc] [soc]: r1276 - qcelp/qcelpdec.c

reynaldo subversion at mplayerhq.hu
Sat Sep 1 06:05:44 CEST 2007


Author: reynaldo
Date: Sat Sep  1 06:05:44 2007
New Revision: 1276

Log:
Gets rid of an useless tmp array and adds a missing const qualifier -- Another from Michael's review

Modified:
   qcelp/qcelpdec.c

Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c	(original)
+++ qcelp/qcelpdec.c	Sat Sep  1 06:05:44 2007
@@ -54,13 +54,10 @@ typedef struct
     int           frame_num;
 } QCELPContext;
 
-static void qcelp_update_pitchf_mem(float *pitchf_mem, float *last)
+static void qcelp_update_pitchf_mem(float *pitchf_mem, const float *last)
 {
-    float tmp[150];
-
-    memcpy(tmp, pitchf_mem+40, 110*sizeof(float));
-    memcpy(tmp+110, last, 40*sizeof(float));
-    memcpy(pitchf_mem, tmp, 150*sizeof(float));
+    memmove(pitchf_mem, pitchf_mem+40, 110*sizeof(float));
+    memmove(pitchf_mem+110, last, 40*sizeof(float));
 }
 
 static int qcelp_decode_init(AVCodecContext *avctx)



More information about the FFmpeg-soc mailing list