[xiph-commits] r14409 - trunk/ghost/libentcode

tterribe at svn.xiph.org tterribe at svn.xiph.org
Wed Jan 16 23:51:18 PST 2008


Author: tterribe
Date: 2008-01-16 23:51:18 -0800 (Wed, 16 Jan 2008)
New Revision: 14409

Modified:
   trunk/ghost/libentcode/entdec.c
Log:
Update ec_dec_bits64() to correspond to the new ec_enc_bits64().
Not sure why this wasn't committed before.


Modified: trunk/ghost/libentcode/entdec.c
===================================================================
--- trunk/ghost/libentcode/entdec.c	2008-01-16 10:27:16 UTC (rev 14408)
+++ trunk/ghost/libentcode/entdec.c	2008-01-17 07:51:18 UTC (rev 14409)
@@ -97,13 +97,13 @@
 }
 
 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){



More information about the commits mailing list