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

Baptiste Coudurier baptiste.coudurier
Fri Apr 18 09:37:45 CEST 2008


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 

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

We will see when 3.3.0 comes, specs will change, and code will be 
updated, or version will bump at 3.3.1 and there will be no problem at 
all. No need to clutter more code like it is already.

Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312

More information about the ffmpeg-devel mailing list