ref: 95088d450509429a6ce7cc0e639e12e6130dc6cd
parent: 189acec5d36ae9a8031fb47b6aee8f3ef6b62f2f
author: Jean-Marc Valin <[email protected]>
date: Wed Mar 26 13:57:49 EDT 2008
mix_pitch_and_residual() no longer computing Ryp twice
--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -62,16 +62,9 @@
for (i=0;i<N;i++)
Rpp = MAC16_16(Rpp,P[i],P[i]);
- Ryp = 0;
for (i=0;i<N;i++)
- Ryp = MAC16_16(Ryp,SHL16(iy[i],yshift),P[i]);
-
- /* Remove part of the pitch component to compute the real residual from
- the encoded (int) one */
- for (i=0;i<N;i++)
y[i] = SHL16(iy[i],yshift);
-
- /* Recompute after the projection (I think it's right) */
+
Ryp = 0;
for (i=0;i<N;i++)
Ryp = MAC16_16(Ryp,y[i],P[i]);