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

Baptiste Coudurier baptiste.coudurier
Tue Apr 22 14:54:06 CEST 2008

Henrik Gulbrandsen wrote:
> On Tue, 2008-04-22 at 12:58 +0200, Baptiste Coudurier wrote:
>> [...]
>> Im sorry but I won't accept this patch until theora official specs are
>> updated. This patch is strictly not needed atm.
> Well, the patch is not particularly important to me personally, so I'm
> not going to force the issue. As you say, it's not strictly needed at
> the moment. It's just a matter of avoiding a predictable future issue.
> When it comes to interpretation of the spec, I was as confused as you by
> the wording at first reading. However, strictly speaking it's not really
> incorrect. The thing is that the spec ONLY applies to bitstreams 3.2.*
> and for this subset of bitstream versions, the statement is technically
> correct. Section 6.2 (Identification Header Decode) clearly states that
> (VMAJ,VMIN) must be (3,2) or the Theora stream is simply not decodable
> according to the current specification. In the same way, the current
> FFmpeg implementation simply reflects the spec, while being technically
> correct, as long as versions 3.3.* and above are rejected. However, it
> would be interesting to get an explanation of why there are references
> to bitstream versions 3.4.0 and 3.64.0 in libavformat/oggparsetheora.c.

This part is irrelevant.

Quoting specs:
"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
less than 1."

Muxer is doing what the specs say, there is no real ambiguity here IMHO:
"They _can_ be interpreted .... when _VREV_ is less than 1"

No specs update -> no code update.

>> [...]
>> Besides what was the original email ?
>> Did you ask him to update specs and/or what will happen when they will
>> use vrev 0 again, considering old software did strictly what was written
>> in specs ?
> For the record, my original email follows.
> On Sun, 2008-04-20 at 08:45 +0200, Henrik Gulbrandsen wrote: 
>> Hi Ralph,
>> I have a question about this commit of yours:
>>     http://lists.xiph.org/pipermail/commits/2007-October/012310.html
>> The wording seems to have introduced some confusion in the Ogg handling
>> code of FFmpeg, so I'd like to have your input on the issue and perhaps
>> an update of the spec to avoid the potential for misinterpretation:
>>     http://article.gmane.org/gmane.comp.video.ffmpeg.devel/66932
>>     http://article.gmane.org/gmane.comp.video.ffmpeg.devel/66942

I was fearing this, point is not about FFmpeg at all, point is only
about specs needing modifications.

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