Decision on whether to use pitch is now taken only based on energy in the

first three bands (instead of total MDCT window energy)
This commit is contained in:
Jean-Marc Valin 2008-03-26 08:10:27 +11:00
parent d9584dbafc
commit bd2828f64b
4 changed files with 15 additions and 11 deletions

View file

@ -105,6 +105,8 @@ void mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * r
/* Real part arranged as -d-cR, Imag part arranged as -b+aR*/
re = -HALF32(in[N2+N4+2*i] + in[N2+N4-2*i-1]);
im = -HALF32(in[N4+2*i] - in[N4-2*i-1]);
/* We could remove the HALF32 above and just use MULT16_32_Q16 below
(MIXED_PRECISION only) */
out[2*i] = S_MUL(re,l->trig[i]) - S_MUL(im,l->trig[i+N4]);
out[2*i+1] = S_MUL(im,l->trig[i]) + S_MUL(re,l->trig[i+N4]);
}
@ -114,6 +116,8 @@ void mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * r
/* Real part arranged as a-bR, Imag part arranged as -c-dR */
re = HALF32(in[2*i-N4] - in[N2+N4-2*i-1]);
im = -HALF32(in[N4+2*i] + in[N+N4-2*i-1]);
/* We could remove the HALF32 above and just use MULT16_32_Q16 below
(MIXED_PRECISION only) */
out[2*i] = S_MUL(re,l->trig[i]) - S_MUL(im,l->trig[i+N4]);
out[2*i+1] = S_MUL(im,l->trig[i]) + S_MUL(re,l->trig[i+N4]);
}