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

vitor subversion
Mon Sep 8 20:16:01 CEST 2008


Author: vitor
Date: Mon Sep  8 20:16:00 2008
New Revision: 15268

Log:
Simplify if() in copy_and_dup()



Modified:
   trunk/libavcodec/ra144.c

Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c	(original)
+++ trunk/libavcodec/ra144.c	Mon Sep  8 20:16:00 2008
@@ -109,12 +109,9 @@ static void copy_and_dup(int16_t *target
 {
     source += BUFFERSIZE - offset;
 
-    if (offset > BLOCKSIZE) {
-        memcpy(target, source, BLOCKSIZE*sizeof(*target));
-    } else {
-        memcpy(target, source, offset*sizeof(*target));
+    memcpy(target, source, FFMIN(BLOCKSIZE, offset)*sizeof(*target));
+    if (offset < BLOCKSIZE)
         memcpy(target + offset, source, (BLOCKSIZE - offset)*sizeof(*target));
-    }
 }
 
 /** inverse root mean square */




More information about the ffmpeg-cvslog mailing list