forked from len0rd/rockbox
opus: speed up mdct overlap add and copying
Unroll overlap add loop by four and use memcpy for copying instead of loops. Change-Id: I17114626a395d5972130251d892f851bc86e3a6a Signed-off-by: Nils Wallménius <nils@rockbox.org>
This commit is contained in:
parent
3ac0fc7c90
commit
c7840e745e
1 changed files with 10 additions and 6 deletions
|
@ -448,12 +448,16 @@ static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X
|
|||
clt_mdct_backward(&mode->mdct, &X[b+c*N2*B], x+N2*b, mode->window, overlap, shortBlocks ? mode->maxLM : mode->maxLM-LM, B);
|
||||
}
|
||||
|
||||
for (j=0;j<overlap;j++)
|
||||
out_mem[c][j] = x[j] + overlap_mem[c][j];
|
||||
for (;j<N;j++)
|
||||
out_mem[c][j] = x[j];
|
||||
for (j=0;j<overlap;j++)
|
||||
overlap_mem[c][j] = x[N+j];
|
||||
/* overlap can be divided by 4 */
|
||||
for (j=0;j<overlap;j+=4)
|
||||
{
|
||||
out_mem[c][j ] = x[j ] + overlap_mem[c][j ];
|
||||
out_mem[c][j+1] = x[j+1] + overlap_mem[c][j+1];
|
||||
out_mem[c][j+2] = x[j+2] + overlap_mem[c][j+2];
|
||||
out_mem[c][j+3] = x[j+3] + overlap_mem[c][j+3];
|
||||
}
|
||||
OPUS_COPY(out_mem[c]+overlap, x+overlap, N-overlap);
|
||||
OPUS_COPY(overlap_mem[c] , x+N , overlap);
|
||||
} while (++c<C);
|
||||
RESTORE_STACK;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue