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

Ralph Giles giles at xiph.org
Thu Oct 30 05:54:32 PST 2003



giles       03/10/30 08:54:32

  Modified:    lib      toplevel.c
  Log:
  Move the keyframe granulepos shift to the end of the info header, for
  easier (byte aligned) casual access to the colorspace and nominal
  bitrate fields.
  
  THIS IS AN INCOMPATIBLE BITSTREAM CHANGE.
  
  However, our example players don't seek and ignore the colorspace info,
  so they're technically unaffected. Not sure about anyone else.

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

Index: toplevel.c
===================================================================
RCS file: /usr/local/cvsroot/theora/lib/toplevel.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- toplevel.c	26 Oct 2003 21:57:15 -0000	1.31
+++ toplevel.c	30 Oct 2003 13:54:31 -0000	1.32
@@ -11,7 +11,7 @@
  ********************************************************************
 
   function:
-  last mod: $Id: toplevel.c,v 1.31 2003/10/26 21:57:15 giles Exp $
+  last mod: $Id: toplevel.c,v 1.32 2003/10/30 13:54:31 giles Exp $
 
  ********************************************************************/
 
@@ -1052,12 +1052,12 @@
   oggpackB_write(&cpi->oggbuffer,cpi->pb.info.aspect_numerator,24);
   oggpackB_write(&cpi->oggbuffer,cpi->pb.info.aspect_denominator,24);
 
-  oggpackB_write(&cpi->oggbuffer,cpi->pb.keyframe_granule_shift,5);
-
   oggpackB_write(&cpi->oggbuffer,cpi->pb.info.colorspace,8);
   oggpackB_write(&cpi->oggbuffer,cpi->pb.info.target_bitrate,24);
   oggpackB_write(&cpi->oggbuffer,cpi->pb.info.quality,6);
 
+  oggpackB_write(&cpi->oggbuffer,cpi->pb.keyframe_granule_shift,5);
+
   op->packet=oggpackB_get_buffer(&cpi->oggbuffer);
   op->bytes=oggpackB_bytes(&cpi->oggbuffer);
 
@@ -1214,12 +1214,12 @@
   ci->aspect_numerator=oggpackB_read(opb,24);
   ci->aspect_denominator=oggpackB_read(opb,24);
 
-  ci->keyframe_frequency_force=1<<oggpackB_read(opb,5);
-
   ci->colorspace=oggpackB_read(opb,8);
   ci->target_bitrate=oggpackB_read(opb,24);
   ci->quality=ret=oggpackB_read(opb,6);
 
+  ci->keyframe_frequency_force=1<<oggpackB_read(opb,5);
+
   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