Browse Source

Simplify if() in copy_and_dup()

Originally committed as revision 15268 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Vitor Sessak 17 years ago
parent
commit
b28bdce688
1 changed files with 2 additions and 5 deletions
  1. +2
    -5
      libavcodec/ra144.c

+ 2
- 5
libavcodec/ra144.c View File

@@ -109,12 +109,9 @@ static void copy_and_dup(int16_t *target, const int16_t *source, int offset)
{
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 */


Loading…
Cancel
Save