Simplify if() in copy_and_dup()

Originally committed as revision 15268 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Vitor Sessak 16 years ago
parent 8022a8ebc2
commit b28bdce688
  1. 7
      libavcodec/ra144.c

@ -109,13 +109,10 @@ static void copy_and_dup(int16_t *target, const int16_t *source, int offset)
{ {
source += BUFFERSIZE - offset; source += BUFFERSIZE - offset;
if (offset > BLOCKSIZE) { memcpy(target, source, FFMIN(BLOCKSIZE, offset)*sizeof(*target));
memcpy(target, source, BLOCKSIZE*sizeof(*target)); if (offset < BLOCKSIZE)
} else {
memcpy(target, source, offset*sizeof(*target));
memcpy(target + offset, source, (BLOCKSIZE - offset)*sizeof(*target)); memcpy(target + offset, source, (BLOCKSIZE - offset)*sizeof(*target));
} }
}
/** inverse root mean square */ /** inverse root mean square */
static int irms(const int16_t *data) static int irms(const int16_t *data)

Loading…
Cancel
Save