Update ec_dec_bits64() to correspond to the new ec_enc_bits64(). Not sure why this...
authortterribe <tterribe@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Thu, 17 Jan 2008 07:51:18 +0000 (07:51 +0000)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Thu, 17 Jan 2008 08:26:17 +0000 (19:26 +1100)
git-svn-id: http://svn.xiph.org/trunk/ghost@14409 0101bb08-14d6-0310-b084-bc0e0c8e3800

libentcode/entdec.c

index 3ec7cf5..e5617ba 100644 (file)
@@ -97,13 +97,13 @@ ec_uint32 ec_dec_bits(ec_dec *_this,int _ftb){
 }
 
 ec_uint64 ec_dec_bits64(ec_dec *_this,int _ftb){
-  ec_uint64 t;
+  ec_uint32 t;
   if(_ftb>32){
-    t=ec_dec_bits(_this,32);
-    _ftb-=32;
+    t=ec_dec_bits(_this,_ftb-32);
+    _ftb=32;
   }
   else t=0;
-  return t<<_ftb|ec_dec_bits(_this,_ftb);
+  return (ec_uint64)t<<32|ec_dec_bits(_this,_ftb);
 }
 
 ec_uint32 ec_dec_uint(ec_dec *_this,ec_uint32 _ft){