[xiph-commits] r9784 - trunk/theora/lib

giles at svn.xiph.org giles at svn.xiph.org
Sat Aug 20 11:01:12 PDT 2005


Author: giles
Date: 2005-08-20 11:01:11 -0700 (Sat, 20 Aug 2005)
New Revision: 9784

Modified:
   trunk/theora/lib/frarray.c
Log:
Add some comments and remove unnecessary casts.


Modified: trunk/theora/lib/frarray.c
===================================================================
--- trunk/theora/lib/frarray.c	2005-08-20 17:45:20 UTC (rev 9783)
+++ trunk/theora/lib/frarray.c	2005-08-20 18:01:11 UTC (rev 9784)
@@ -19,6 +19,7 @@
 #include "codec_internal.h"
 #include "block_inline.h"
 
+/* Long run bit string coding */
 static ogg_uint32_t FrArrayCodeSBRun( CP_INSTANCE *cpi, ogg_uint32_t value ){
   ogg_uint32_t CodedVal = 0;
   ogg_uint32_t CodedBits = 0;
@@ -55,13 +56,15 @@
     CodedVal = 0x3F000 + (value - 34);
     CodedBits = 18;
   }
+  /* todo: handle value > 4129 extension */
 
   /* Add the bits to the encode holding buffer. */
-  oggpackB_write( cpi->oggbuffer, CodedVal, (ogg_uint32_t)CodedBits );
+  oggpackB_write( cpi->oggbuffer, CodedVal, CodedBits );
 
   return CodedBits;
 }
 
+/* Short run bit string coding */
 static ogg_uint32_t FrArrayCodeBlockRun( CP_INSTANCE *cpi,
                                          ogg_uint32_t value ) {
   ogg_uint32_t CodedVal = 0;
@@ -100,7 +103,7 @@
  }
 
   /* Add the bits to the encode holding buffer. */
-  oggpackB_write( cpi->oggbuffer, CodedVal, (ogg_uint32_t)CodedBits );
+  oggpackB_write( cpi->oggbuffer, CodedVal, CodedBits );
 
   return CodedBits;
 }
@@ -228,6 +231,7 @@
   pbi->bits_so_far = 0;
 }
 
+/* Short run bit string decoding */
 static int FrArrayDeCodeBlockRun(  PB_INSTANCE *pbi, ogg_uint32_t bit_value,
                             ogg_int32_t * run_value ){
   int  ret_val = 0;
@@ -296,6 +300,7 @@
   return ret_val;
 }
 
+/* Long run bit string decoding */
 static int FrArrayDeCodeSBRun (PB_INSTANCE *pbi, ogg_uint32_t bit_value,
                         ogg_int32_t * run_value ){
   int ret_val = 0;
@@ -373,6 +378,8 @@
     break;
   }
 
+  /* todo: handle additional bits for values over 4129 */
+
   return ret_val;
 }
 



More information about the commits mailing list