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

Fixes a fixed-point overflow in stereo angle calculation

parent fddc521a
No related branches found
No related tags found
No related merge requests found
......@@ -381,8 +381,8 @@ int stereo_itheta(celt_norm *X, celt_norm *Y, int stereo, int N)
for (i=0;i<N;i++)
{
celt_norm m, s;
m = X[i]+Y[i];
s = X[i]-Y[i];
m = ADD16(SHR16(X[i],1),SHR16(Y[i],1));
s = SUB16(SHR16(X[i],1),SHR16(Y[i],1));
Emid = MAC16_16(Emid, m, m);
Eside = MAC16_16(Eside, s, s);
}
......
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