[MPlayer-dev-eng] Re: [PATCH] theora support

David Kühling dvdkhlng at gmx.de
Tue May 13 18:38:25 CEST 2003

> If you have a specific scenario to offer why the granpos strategy is 
> 'unbelievably stupid', I'll be happy to discuss it.  FWIW, that 
> strategy is not set in stone; however, the objections I've seen to it 
> so far have been wrongheaded.  (I personally have a few things in the 
> 'con' column for the granpos method, but the common objections aren't 
> the ones I have). 
I apologize for my wording.  Didn't meant to insult any of the Xiph people. 
I actually appreciate a lot what you do.  But some of the 
design descisions for ogg in combination with vorbis and theora seem very
contraintuitive and sometimes contradicting to me.  
You asked for reasons? 
* Have a look at mpayer's emux_ogg.c it is ugly.  Why did I had to do so
many changes to the demuxer for implementing theora 
support?  I first thought I'd just have to implement a stream handler for
theora, and of course I was annoyed, having to go into all 
the dirty details of ogg.  There should have been a standardized way defined
for the Ogg container to encode granule positions and 
things like keyframes in the first place.  Now every codec needs special
casing :-(   You know what that means for extensibility? 
* The interface of theora seems incomplete, as it does not specify a routine
for recognizing key-frames.  I do not consider 
calculating the logarithm of an undocumented theora_info data member plus
knowledge of key-frame ganule pos encoding a 
sufficient interface.  Recognizing key-frames requires knowledge of the
theora stream.  There should be plenty of other methods 
for doing that cleaner, eg just set a bit, change the sign of the
granule-pos field etc.  
* Theora is bound to the Ogg format.  Isn't that ugly, as it doesn't allow a
clean use of Theora with other container formats?  Why 
do I need libogg, if I just need a video codec?  Doesn't the Ogg
documentation state, that Ogg just contains binary packets, of any 
content?  Why must theora_decode/encode operate on ogg_packet, shouldn't
(void *, int len) be more generic, especially since it 
would remove the destinction between Theora and other video formats?  This
looks a little like a strategy often used by large 
companies to limit interoperability.  It just takes away parts of the
freedom to independently choose container and codec. 
> This is certain to break with the next release, but then again, next 
> release will likely see more bitstream format shift anyway.  If we're 
> lucky, it might see an early OggFile as well. 
What will break with the next release?  Are you going to change the
granulepos encoding?  Shouldn't libtheora hide knowledge of 
the bitstream format from players/encoders.  Some more interface routines
might be necessary.  
- David Kuehling 

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!

More information about the MPlayer-dev-eng mailing list