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

Ralph Giles giles at xiph.org
Fri Oct 31 05:53:49 PST 2003



giles       03/10/31 08:53:49

  Modified:    lib      toplevel.c
  Log:
  Reserve five configuration bits at the end of the info header. It is
  proposed (by derf) that these be used to indicate the chroma subsampling
  level and interlaced flag in future versions. Three of them anyway, but
  we have 5 to fill out the byte.
  
  We write '0' now to avoid having to make these fields conditional on the
  version at a later date. We don't actually verify that they're zero,
  though.

Revision  Changes    Path
1.33      +5 -1      theora/lib/toplevel.c

Index: toplevel.c
===================================================================
RCS file: /usr/local/cvsroot/theora/lib/toplevel.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- toplevel.c	30 Oct 2003 13:54:31 -0000	1.32
+++ toplevel.c	31 Oct 2003 13:53:49 -0000	1.33
@@ -11,7 +11,7 @@
  ********************************************************************
 
   function:
-  last mod: $Id: toplevel.c,v 1.32 2003/10/30 13:54:31 giles Exp $
+  last mod: $Id: toplevel.c,v 1.33 2003/10/31 13:53:49 giles Exp $
 
  ********************************************************************/
 
@@ -1058,6 +1058,8 @@
 
   oggpackB_write(&cpi->oggbuffer,cpi->pb.keyframe_granule_shift,5);
 
+  oggpackB_write(&cpi->oggbuffer,0,5); /* spare config bits */
+
   op->packet=oggpackB_get_buffer(&cpi->oggbuffer);
   op->bytes=oggpackB_bytes(&cpi->oggbuffer);
 
@@ -1220,6 +1222,8 @@
 
   ci->keyframe_frequency_force=1<<oggpackB_read(opb,5);
 
+  ret=oggpackB_read(opb,5); /* spare configuration bits */
+
   if(ret==-1L)return(OC_BADHEADER);
 
   return(0);

<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