[xiph-cvs] cvs commit: theora/lib decode.c encode.c

Ralph Giles giles at xiph.org
Thu Nov 6 15:44:58 PST 2003



giles       03/11/06 18:44:58

  Modified:    lib      decode.c encode.c
  Log:
  Reserve a bit for possible future per-block Q index selection.
  Suggestion from Derf.
  
  THIS IS AN INCOMPATIBLE BITSTREAM CHANGE.

Revision  Changes    Path
1.8       +4 -3      theora/lib/decode.c

Index: decode.c
===================================================================
RCS file: /usr/local/cvsroot/theora/lib/decode.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- decode.c	21 Oct 2003 22:12:36 -0000	1.7
+++ decode.c	6 Nov 2003 23:44:57 -0000	1.8
@@ -11,7 +11,7 @@
  ********************************************************************
 
   function:
-  last mod: $Id: decode.c,v 1.7 2003/10/21 22:12:36 giles Exp $
+  last mod: $Id: decode.c,v 1.8 2003/11/06 23:44:57 giles Exp $
 
  ********************************************************************/
 
@@ -70,8 +70,9 @@
   /* Quality (Q) index */
   DctQMask = (unsigned char)oggpackB_read( &pbi->opb, 6 );
 
-  /* If the frame was a base frame then read the frame dimensions and
-     build a bitmap structure. */
+  /* spare bit for possible additional Q indicies - should be 0 */
+  SpareBits = (unsigned char)oggpackB_read(&pbi->opb,1);
+
   if ( (pbi->FrameType == BASE_FRAME) ){
     /* Read the type / coding method for the key frame. */
     pbi->KeyFrameType = (unsigned char)oggpackB_read( &pbi->opb, 1 );

<p><p>1.14      +4 -1      theora/lib/encode.c

Index: encode.c
===================================================================
RCS file: /usr/local/cvsroot/theora/lib/encode.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- encode.c	15 Jun 2003 04:29:04 -0000	1.13
+++ encode.c	6 Nov 2003 23:44:57 -0000	1.14
@@ -11,7 +11,7 @@
  ********************************************************************
 
   function:
-  last mod: $Id: encode.c,v 1.13 2003/06/15 04:29:04 tterribe Exp $
+  last mod: $Id: encode.c,v 1.14 2003/11/06 23:44:57 giles Exp $
 
  ********************************************************************/
 
@@ -1473,6 +1473,9 @@
     oggpackB_write( opb, 31, 6 );
   }
 
+  /* we only support on Q index per frame */
+  oggpackB_write( opb, 0, 1 );
+
   /* If the frame was a base frame then write out the frame dimensions. */
   if ( cpi->pb.FrameType == BASE_FRAME ) {
     /* Key frame type / method */

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list