commit | 29354ff6e05c9ead9454981a7404a9b9ea203d2e | [log] [tgz] |
---|---|---|
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | Tue Jan 21 10:39:33 2014 -0500 |
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | Tue Jan 21 10:39:33 2014 -0500 |
tree | 16aa779b5131949ce01b9d1837d2533f1654fc43 | |
parent | ce1173c77fa2ed5e731db2bbd4c7527d57a8c335 [diff] [blame] |
Save more integer divisions on ARM when we know the operands are positive
diff --git a/celt/entcode.h b/celt/entcode.h index c10fe8d..66f281d 100644 --- a/celt/entcode.h +++ b/celt/entcode.h
@@ -122,6 +122,7 @@ /* Tested exhaustively for all n and for 1<=d<=256 */ static OPUS_INLINE opus_uint32 celt_udiv(opus_uint32 n, opus_uint32 d) { + celt_assert(d>0); #ifdef USE_SMALL_DIV_TABLE if (d>256) return n/d;