Rearrange scaletempo inner loop.

Speedup on x86 with gcc 3.4 36%, on x86_64 with gcc 4.1 5%


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25100 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-11-18 17:28:27 +00:00
parent fdbceb63b9
commit 0bc7ce3b04
1 changed files with 5 additions and 2 deletions

View File

@ -170,9 +170,12 @@ static int best_overlap_offset_s16(af_scaletempo_t* s)
int32_t corr = 0;
int16_t* ps = search_start;
ppc = s->buf_pre_corr;
for (i=s->num_channels; i<s->samples_overlap; i++) {
ppc += s->samples_overlap - s->num_channels;
ps += s->samples_overlap - s->num_channels;
i = -(s->samples_overlap - s->num_channels);
do {
corr += ( *ppc++ * *ps++ ) >> s->shift_corr;
}
} while (++i < 0);
if (corr > best_corr) {
best_corr = corr;
best_off = off;