aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Larsson <banan@ludd.ltu.se>2007-11-18 10:54:38 +0000
committerBenjamin Larsson <banan@ludd.ltu.se>2007-11-18 10:54:38 +0000
commit289987e454cf3705c9cc824fdda3e25949f78898 (patch)
treebc70aeb4084c63b7727f74bf3710addbaa94d596
parent28af284cfb44cb198c1b1c01e61c90b10fd9e395 (diff)
downloadffmpeg-289987e454cf3705c9cc824fdda3e25949f78898.tar.gz
Use memcpy instead of for loop
Originally committed as revision 11051 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/nellymoserdec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index 0a51e8b42c..aae3c03500 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -323,10 +323,8 @@ void nelly_decode_block(NellyMoserDecodeContext *s, unsigned char block[NELLY_BL
aptr, s->imdct_tmp);
/* XXX: overlapping and windowing should be part of a more
generic imdct function */
- for(j = 0; j < NELLY_BUF_LEN / 2; j++) {
- aptr[j] = s->imdct_out[j + NELLY_BUF_LEN + NELLY_BUF_LEN / 2];
- aptr[j + NELLY_BUF_LEN / 2] = s->imdct_out[j];
- }
+ memcpy(&aptr[0],&s->imdct_out[NELLY_BUF_LEN+NELLY_BUF_LEN/2], (NELLY_BUF_LEN/2)*sizeof(float));
+ memcpy(&aptr[NELLY_BUF_LEN / 2],&s->imdct_out[0],(NELLY_BUF_LEN/2)*sizeof(float));
overlap_and_window(s, s->state, aptr);
}
}