[FFmpeg-devel] [PATCH] Ogg Theora granules confused by spec

Diego Biurrun diego
Fri Apr 18 09:55:39 CEST 2008

On Fri, Apr 18, 2008 at 12:37:45AM -0700, Baptiste Coudurier wrote:
> Henrik Gulbrandsen wrote:
> > The last paragraph in section A.2.3 ("Granule position") of Appendix A
> > in the current Theora specification states the following:
> > 
> > -------------------------------------------------------------------------------
> > Prior to bitstream version 3.2.1, data packets were marked by a granulepos
> > derived from the index of the frame being decoded, rather than the count. That
> > is they marked the beginning of the display interval of a frame rather than the
> > end. Such streams have the VREV field of the identification header set to `0'
> > instead of `1'. They can be interpreted according to the description above by
> > adding 1 to the more signification field of the split granulepos when VREV is
> > less than 1.
> > -------------------------------------------------------------------------------
> > 
> > I must admit that this is badly worded and confused me when I read it
> > the first time, but I still think the current FFmpeg implementation in
> > libavformat/oggenc.c interprets the spec a bit too literally. 
> In specs, there should be no place for interpretation IMHO.
> > I doubt the intention of its author was to turn the third part of the version
> > field (the version revision) into a generic flag field for the future.
> IMHO specs writers must really take care and think before writing such 
> statements.

There is a better solution IMO: Get in contact with the spec writers and
ask them to clarify the spec.


More information about the ffmpeg-devel mailing list