Skip to content
Snippets Groups Projects
Commit df7ab430 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Making it obvious to the compiler how to generate a dual-MAC in

mix_pitch_and_residual()
parent 95088d45
No related branches found
No related tags found
No related merge requests found
......@@ -66,13 +66,14 @@ static void mix_pitch_and_residual(int * restrict iy, celt_norm_t * restrict X,
y[i] = SHL16(iy[i],yshift);
Ryp = 0;
for (i=0;i<N;i++)
Ryp = MAC16_16(Ryp,y[i],P[i]);
Ryy = 0;
/* If this doesn't generate a dual MAC (on supported archs), fire the compiler guy */
for (i=0;i<N;i++)
Ryy = MAC16_16(Ryy, y[i],y[i]);
{
Ryp = MAC16_16(Ryp, y[i], P[i]);
Ryy = MAC16_16(Ryy, y[i], y[i]);
}
/* g = (sqrt(Ryp^2 + Ryy - Rpp*Ryy)-Ryp)/Ryy */
g = MULT16_32_Q15(
celt_sqrt(MULT16_16(ROUND16(Ryp,14),ROUND16(Ryp,14)) + Ryy -
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment