# HG changeset patch # User vitor # Date 1214251182 0 # Node ID a17b3a67a71987c5dc61cf3b847d074fc95cc071 # Parent 07172377ec9fea9b6662c0cfa71c65de9a32adbc Simplify rotate_buffer() diff -r 07172377ec9f -r a17b3a67a719 ra144.c --- a/ra144.c Mon Jun 23 19:47:10 2008 +0000 +++ b/ra144.c Mon Jun 23 19:59:42 2008 +0000 @@ -97,14 +97,13 @@ /* rotate block */ static void rotate_block(const int16_t *source, int16_t *target, int offset) { - int i=0, k=0; source += BUFFERSIZE - offset; - while (i BLOCKSIZE) { + memcpy(target, source, BLOCKSIZE*sizeof(*target)); + } else { + memcpy(target, source, offset*sizeof(*target)); + memcpy(target + offset, source, (BLOCKSIZE - offset)*sizeof(*target)); } }