Commit 2f499a1e authored by vitor's avatar vitor

Simplify rotate_buffer()

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13914 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c407cd2c
...@@ -97,14 +97,13 @@ static void eval_coefs(const int *refl, int *coefs) ...@@ -97,14 +97,13 @@ static void eval_coefs(const int *refl, int *coefs)
/* rotate block */ /* rotate block */
static void rotate_block(const int16_t *source, int16_t *target, int offset) static void rotate_block(const int16_t *source, int16_t *target, int offset)
{ {
int i=0, k=0;
source += BUFFERSIZE - offset; source += BUFFERSIZE - offset;
while (i<BLOCKSIZE) { if (offset > BLOCKSIZE) {
target[i++] = source[k++]; memcpy(target, source, BLOCKSIZE*sizeof(*target));
} else {
if (k == offset) memcpy(target, source, offset*sizeof(*target));
k = 0; 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