mirror of
https://github.com/mpv-player/mpv
synced 2025-03-05 13:47:39 +00:00
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:
parent
fdbceb63b9
commit
0bc7ce3b04
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user