[Ffmpeg-cvslog] r6068 - trunk/libavcodec/mpegaudiodec.c
michael
subversion
Thu Aug 24 10:40:10 CEST 2006
Author: michael
Date: Thu Aug 24 10:40:09 2006
New Revision: 6068
Modified:
trunk/libavcodec/mpegaudiodec.c
Log:
optimize reorder_block() though this function seems to be executed too rarely for this to make much difference
Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c (original)
+++ trunk/libavcodec/mpegaudiodec.c Thu Aug 24 10:40:09 2006
@@ -1776,7 +1776,7 @@
complicated */
static void reorder_block(MPADecodeContext *s, GranuleDef *g)
{
- int i, j, k, len;
+ int i, j, len;
int32_t *ptr, *dst, *ptr1;
int32_t tmp[576];
@@ -1796,14 +1796,15 @@
for(i=g->short_start;i<13;i++) {
len = band_size_short[s->sample_rate_index][i];
ptr1 = ptr;
- for(k=0;k<3;k++) {
- dst = tmp + k;
- for(j=len;j>0;j--) {
- *dst = *ptr++;
- dst += 3;
- }
+ dst = tmp;
+ for(j=len;j>0;j--) {
+ *dst++ = ptr[0*len];
+ *dst++ = ptr[1*len];
+ *dst++ = ptr[2*len];
+ ptr++;
}
- memcpy(ptr1, tmp, len * 3 * sizeof(int32_t));
+ ptr+=2*len;
+ memcpy(ptr1, tmp, len * 3 * sizeof(*ptr1));
}
}
More information about the ffmpeg-cvslog
mailing list