Index: celt/entenc.c |
diff --git a/celt/entenc.c b/celt/entenc.c |
index a7e34ecef971f486e63bfd011c3bc7b5788a7f4a..f1750d25b8425c0cca2ea83861b8229ca26ef512 100644 |
--- a/celt/entenc.c |
+++ b/celt/entenc.c |
@@ -98,7 +98,7 @@ static void ec_enc_carry_out(ec_enc *_this,int _c){ |
else _this->ext++; |
} |
-static void ec_enc_normalize(ec_enc *_this){ |
+static OPUS_INLINE void ec_enc_normalize(ec_enc *_this){ |
/*If the range is too small, output some bits and rescale it.*/ |
while(_this->rng<=EC_CODE_BOT){ |
ec_enc_carry_out(_this,(int)(_this->val>>EC_CODE_SHIFT)); |
@@ -127,7 +127,7 @@ void ec_enc_init(ec_enc *_this,unsigned char *_buf,opus_uint32 _size){ |
void ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft){ |
opus_uint32 r; |
- r=_this->rng/_ft; |
+ r=celt_udiv(_this->rng,_ft); |
if(_fl>0){ |
_this->val+=_this->rng-IMUL32(r,(_ft-_fl)); |
_this->rng=IMUL32(r,(_fh-_fl)); |