aboutsummaryrefslogtreecommitdiff
path: root/celt/vq.c
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2014-01-21 10:39:33 -0500
committerJean-Marc Valin <jmvalin@jmvalin.ca>2014-01-21 10:39:33 -0500
commit29354ff6e05c9ead9454981a7404a9b9ea203d2e (patch)
tree16aa779b5131949ce01b9d1837d2533f1654fc43 /celt/vq.c
parentce1173c77fa2ed5e731db2bbd4c7527d57a8c335 (diff)
downloadlibopus-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/celt/vq.c b/celt/vq.c
index 7d922467..914ec861 100644
--- a/celt/vq.c
+++ b/celt/vq.c
@@ -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;