[FFmpeg-devel] [PATCH] Ogg Theora granules confused by spec
Tue Apr 22 14:01:37 CEST 2008
On Tue, 2008-04-22 at 12:58 +0200, Baptiste Coudurier wrote:
> Henrik Gulbrandsen wrote:
> > A statement from the guy responsible for this particular section of the
> > Theora specification follows:
> > On Sun, 2008-04-20 at 15:41 -0700, Ralph Giles wrote:
> >> No, the tiny revision number isn't a flag. We changed the granulepos
> >> definition and bumped the revision number to indicate the change, but
> >> that's all. The intent was just that old streams could be handled
> >> correctly based on their version number; we expect later revisions to
> >> have the same granulepos scheme as 3.2.1 streams.
> >> VREV signals optional features that are generally compatible with the
> >> major and minor revision numbers. Since the granulepos is only a off-
> >> by-one, usually in the more forgiving direction, we thought it was
> >> reasonable to treat it as backward-compatible.
> IMHO this was not a reasonable backward-compatible change for ogg
> container, considering how it clutters the code and force every muxer to
> handle it when stream copy.
> > I guess this means that the original patch is reasonable. It doesn't
> > influence regression tests (or anything else, actually), so I simply
> > attach it again, without any real updates.
> 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.
> 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:
> 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:
More information about the ffmpeg-devel