[theora] Theora, liboil and Cell processors
giles at xiph.org
Tue Jul 18 09:55:37 PDT 2006
On Tue, Jul 18, 2006 at 10:49:35PM +1200, Aaron Whitehouse wrote:
> On more than one occasion I have advocated the use of liboil over
> incorporating mmx code into libtheora.
I'll try an summarize the current counter-arguments:
Theora, like most video codecs, uses particular algorithms. So it's not
that using liboil magically provides optimized versions of theora's
inner loops. It's more that optimized versions of theora's inner loops
can be developed inside liboil instead of libtheora; they're still
specific to theora, which is why _theora_ is a keyword in many of
routines called by the theora-oil branch. This aligns with your
argument about centralizing expertise, but it's more that some people
like developing optimized code within the liboil framework than using
it conveys instant advantages to naive code. Nor would using liboil
automatically get us optimized versions on other platforms. Someone has
to write that code either way.
Mike Smith had another complaint, which I will probably mangle, along
the lines of liboil's brittleness. It takes the approach of trying to
compile every possibly applicable version for a given architecture
and then doing run-time profiling to choose between them. This is a
great idea for some applications, but it takes too long to get accurate
results with data streams the size of what we see in video, and in
practice seems to make the build brittle since any bit-rotted code
path can make somebody's executable go boom.
Finally, the abstract-everything-into-a-library trend you cite with
linux development is certainly the GNOME idiom. But libtheora is more
than just a linux library. It needs to be broadly portable (which liboil
currently is not, although David has said he intends it to be) and even
within the linux world, not everyone agrees multiple libraries are worth
the pain for everything. I guess this is just restating the "minimal
dependencies" argument you refer to.
As far as altivec and other archs go, the framework we're using to
optionally call mmx and mmxext routines in libtheora and theora-exp
are equally extensible. And I'd certainly like to have altivec, and
arm asm as well.
More information about the theora