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

Henrik Gulbrandsen henrik
Fri Apr 18 03:03:10 CEST 2008

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. 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.

Instead of dealing with the problems when version 3.3.0 appears, we
might as well start using the full version immediately...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: theora_vrev.patch
Type: text/x-patch
Size: 1718 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080418/1f7a939e/attachment.bin>

More information about the ffmpeg-devel mailing list