Commit b21b2a40 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Switched to mdct mask computation

parent 0a3e79aa
......@@ -265,12 +265,15 @@ int celt_encode(CELTEncoder *st, short *pcm)
//for (i=0;i<(B+1)*C*N;i++) printf ("%f(%d) ", in[i], i); printf ("\n");
/* Compute MDCTs */
compute_mdcts(&st->mdct_lookup, st->window, in, X, N, B, C);
compute_masking(X, mask, B*C*N, st->Fs);
/* Invert and stretch the mask to length of X */
for (i=B*C*N-1;i>=0;i--)
mask[i] = 1/(1+mask[i>>1]);
compute_mdct_masking(X, mask, B*C*N, st->Fs);
/* Invert and stretch the mask to length of X
For some reason, I get better results by using the sqrt instead,
although there's no valid reason to. Must investigate further */
for (i=0;i<B*C*N;i++)
mask[i] = 1/(.1+mask[i]);
/* Pitch analysis */
for (c=0;c<C;c++)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment