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

Splits cwrsi() inner loop in two to avoid the min/max and some load chains

parent 4e018b22
No related branches found
No related tags found
No related merge requests found
......@@ -473,7 +473,13 @@ static void cwrsi(int _n,int _k,opus_uint32 _i,int *_y){
_i-=p&s;
/*Count how many pulses were placed in this dimension.*/
k0=_k;
for(p=CELT_PVQ_U(_n,_k);p>_i;p=CELT_PVQ_U(_n,_k))_k--;
p=CELT_PVQ_U(_n,_k);
if(_k>_n){
const opus_uint32 *row;
row=CELT_PVQ_U_ROW[_n];
for(;p>_i&&_k>_n;p=row[_k])_k--;
}
for(;p>_i;p=CELT_PVQ_U_ROW[_k][_n])_k--;
_i-=p;
*_y++=(k0-_k+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