Commit 5983d1c4 authored by Vitor Sessak's avatar Vitor Sessak

Simplify rotate_buffer()

Originally committed as revision 13914 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent cb51aef1
......@@ -97,14 +97,13 @@ static void eval_coefs(const int *refl, int *coefs)
/* 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) {
target[i++] = source[k++];
if (k == offset)
k = 0;
if (offset > BLOCKSIZE) {
memcpy(target, source, BLOCKSIZE*sizeof(*target));
} else {
memcpy(target, source, offset*sizeof(*target));
memcpy(target + offset, source, (BLOCKSIZE - offset)*sizeof(*target));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment