diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2014-01-21 10:39:33 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2014-01-21 10:39:33 -0500 |
commit | 29354ff6e05c9ead9454981a7404a9b9ea203d2e (patch) | |
tree | 16aa779b5131949ce01b9d1837d2533f1654fc43 /celt/vq.c | |
parent | ce1173c77fa2ed5e731db2bbd4c7527d57a8c335 (diff) | |
download | libopus-29354ff6e05c9ead9454981a7404a9b9ea203d2e.tar.gz |
Save more integer divisions on ARM when we know the operands are positive
Diffstat (limited to 'celt/vq.c')
-rw-r--r-- | celt/vq.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -94,7 +94,7 @@ static void exp_rotation(celt_norm *X, int len, int dir, int stride, int K, int } /*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for extract_collapse_mask().*/ - len /= stride; + len = celt_udiv(len, stride); for (i=0;i<stride;i++) { if (dir < 0) @@ -143,7 +143,7 @@ static unsigned extract_collapse_mask(int *iy, int N, int B) return 1; /*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for exp_rotation().*/ - N0 = N/B; + N0 = celt_udiv(N, B); collapse_mask = 0; i=0; do { int j; |