Saved two copies when computing MDCTs of mono signals
This commit is contained in:
parent
bdb58836ce
commit
1a3ed79cbe
1 changed files with 17 additions and 8 deletions
|
@ -181,10 +181,15 @@ static void compute_mdcts(const CELTMode *mode, const celt_word16_t * restrict w
|
||||||
}
|
}
|
||||||
CELT_MEMSET(x, 0, N4);
|
CELT_MEMSET(x, 0, N4);
|
||||||
CELT_MEMSET(x+2*N-N4, 0, N4);
|
CELT_MEMSET(x+2*N-N4, 0, N4);
|
||||||
mdct_forward(lookup, x, tmp);
|
if (C==1)
|
||||||
/* Interleaving the sub-frames */
|
{
|
||||||
for (j=0;j<N;j++)
|
mdct_forward(lookup, x, out);
|
||||||
out[C*j+c] = tmp[j];
|
} else {
|
||||||
|
mdct_forward(lookup, x, tmp);
|
||||||
|
/* Interleaving the sub-frames */
|
||||||
|
for (j=0;j<N;j++)
|
||||||
|
out[C*j+c] = tmp[j];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RESTORE_STACK;
|
RESTORE_STACK;
|
||||||
}
|
}
|
||||||
|
@ -206,10 +211,14 @@ static void compute_inv_mdcts(const CELTMode *mode, const celt_word16_t * restri
|
||||||
for (c=0;c<C;c++)
|
for (c=0;c<C;c++)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
/* De-interleaving the sub-frames */
|
if (C==1) {
|
||||||
for (j=0;j<N;j++)
|
mdct_backward(lookup, X, x);
|
||||||
tmp[j] = X[C*j+c];
|
} else {
|
||||||
mdct_backward(lookup, tmp, x);
|
/* De-interleaving the sub-frames */
|
||||||
|
for (j=0;j<N;j++)
|
||||||
|
tmp[j] = X[C*j+c];
|
||||||
|
mdct_backward(lookup, tmp, x);
|
||||||
|
}
|
||||||
/* The first and last part would need to be set to zero if we actually
|
/* The first and last part would need to be set to zero if we actually
|
||||||
wanted to use them. */
|
wanted to use them. */
|
||||||
for (j=0;j<overlap;j++)
|
for (j=0;j<overlap;j++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue