[FFmpeg-devel] [PATCH] Missing Theora 3.2.1 granule support

Henrik Gulbrandsen henrik
Tue Apr 22 11:57:50 CEST 2008


On Sun, 2008-04-20 at 13:37 +0100, M?ns Rullg?rd wrote:
> Henrik Gulbrandsen <henrik at gulbra.net> writes:
> 
> > On Fri, 2008-04-18 at 09:27 +0100, M?ns Rullg?rd wrote:
> >> Henrik Gulbrandsen <henrik at gulbra.net> writes:
> >> 
> >> > Given the modified granule semantics for Theora bitstreams, which was
> >> > mentioned in my previous email, the theora_gptopts function needs to
> >> > change if it should still map from granule positions to PTS when the
> >> > bitstream version is 3.2.1 or higher.
> >> >
> >> > I haven't actually tested this on a new bitstream, but with some good
> >> > code review and a little luck, this may actually work as intended :-)

[...]

> >> > +    // We want PTS (beginning of display interval)
> >> > +    // rather than the count of frames seen so far.
> >> > +    if (thp->version >= 0x030201 && iframe > 0)
> >> > +        iframe--;
> >> 
> >> What if iframe == 0?
> >
> > For Theora bitstream versions >= 3.2.1, that means that the current
> > packet doesn't contain any frames. It would probably be some kind of
> > header packet. In any case, we don't want the PTS to go negative...
> 
> We also don't want two packets with the same PTS.

Actually, if the packets don't contain any frames, that's precisely what
we want. However, this discussion is out-of-date if we keep the current
gptopts mapping. In that case, the current patch should fix the mapping
for the older version 3.2.0 of Theora bitstreams.

Note that this and the other Ogg-related patches of mine are still for
discussion only. I guess there will be regression tests to handle as
well, but since the different patches are likely to interfere, I can't
deliver the correct test updates until I know the order of acceptance.

/Henrik

-------------- next part --------------
A non-text attachment was scrubbed...
Name: theora_granule_2.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080422/5962e6a4/attachment.bin>



More information about the ffmpeg-devel mailing list