Made a second version of ec_{en|de}code optimised for encoding bits (no div
required) and using it in ec_{en|de}c_bits()
diff --git a/libcelt/entdec.c b/libcelt/entdec.c
index 76b8c90..3b25dd5 100644
--- a/libcelt/entdec.c
+++ b/libcelt/entdec.c
@@ -88,13 +88,13 @@
unsigned ft;
t=0;
while(_ftb>EC_UNIT_BITS){
- s=ec_decode(_this,EC_UNIT_MASK+1);
+ s=ec_decode_bin(_this,EC_UNIT_BITS);
ec_dec_update(_this,s,s+1,EC_UNIT_MASK+1);
t=t<<EC_UNIT_BITS|s;
_ftb-=EC_UNIT_BITS;
}
ft=1U<<_ftb;
- s=ec_decode(_this,ft);
+ s=ec_decode_bin(_this,_ftb);
ec_dec_update(_this,s,s+1,ft);
t=t<<_ftb|s;
return t;