[Theora-dev] theora optimizations

Thomas Vander Stichele thomas at apestaart.org
Fri Jul 29 09:58:56 PDT 2005


Hi everyone,

I wanted to throw out some data points on some of the theora
optimization efforts.  There are a few different efforts going on and it
would be nice to unify all of those into something that can live in the
main branch and be kept uptodate, while making it easy for people that
want to contribute specific optimisations (we have one eager new
powerbook owner ready to give the ppc ones a try for example once the
dust settles :) )

I tested transcoding from an .avi file to theora with different versions
of theora versions.  I did this by compiling theora and setting
LD_LIBRARY_PATH, then running a gstreamer pipeline.

Wim has adapted a patch from David Schleef, maintainer of liboil, and
made patches to both theora and liboil for mmx.

- unoptimized TRUNK:

[xiph-head] [thomas at thomas theora]$ time
LD_LIBRARY_PATH=/home/thomas/xiph/head/theora/lib/.libs gst-launch
filesrc location=/home/thomas/gst/media/large/matrix.avi ! spider !
theoraenc ! fakesink
RUNNING pipeline ...
Execution ended after 3637 iterations (sum 490841744000 ns, average
134957861 ns, min 169000 ns, max 2447342000 ns).

real    8m11.662s
user    7m49.656s
sys     0m2.247s

- alpha3 with wim's original patch:

[xiph-head] [thomas at thomas theora.alpha3.opt]$ time
LD_LIBRARY_PATH=/home/thomas/xiph/head/theora.alpha3.opt/lib/.libs
gst-launch filesrc location=/home/thomas/gst/media/large/matrix.avi !
spider ! theoraenc ! fakesink
RUNNING pipeline ...
Execution ended after 3637 iterations (sum 398314759000 ns, average
109517393 ns, min 228000 ns, max 2251552000 ns).

real    6m39.545s
user    6m19.533s
sys     0m2.233s

- theora-mmx branch:

[thomas at thomas theora-mmx]$ time
LD_LIBRARY_PATH=/home/thomas/xiph/head/theora-mmx/lib/.libs gst-launch
filesrc location=/home/thomas/gst/media/large/matrix.avi ! spider !
theoraenc ! fakesink
RUNNING pipeline ...
Execution ended after 3637 iterations (sum 183482548000 ns, average
50448872 ns, min 213000 ns, max 545223000 ns).

real    3m4.201s
user    2m55.868s
sys     0m2.046s

- liboil'd version:

[xiph-head] [thomas at thomas examples]$ time
LD_LIBRARY_PATH=//home/thomas/xiph/head/theora.liboil/lib/.libs/
gst-launch filesrc location=/home/thomas/gst/media/large/matrix.avi !
spider ! theoraenc ! fakesink
RUNNING pipeline ...
Execution ended after 3637 iterations (sum 243869832000 ns, average
67052469 ns, min 170000 ns, max 989989000 ns).

real    4m4.221s
user    3m52.545s
sys     0m2.176s


- liboil'd version, but with hardcoded MMXEXT flag enabled:
  (there's some discussion about how MMXEXT should be handled in liboil,
so I hardcoded my liboil version to trick it into running MMXEXT code)

[xiph-head] [thomas at thomas examples]$ time
LD_LIBRARY_PATH=//home/thomas/xiph/head/theora.liboil/lib/.libs/
gst-launch filesrc location=/home/thomas/gst/media/large/matrix.avi !
spider ! theoraenc ! fakesink
RUNNING pipeline ...
Execution ended after 3637 iterations (sum 205431506000 ns, average
56483779 ns, min 167000 ns, max 634565000 ns).

real    3m25.786s
user    3m19.607s
sys     0m2.102s

I'm attaching the patches for theora trunk and liboil HEAD so people can
try it out.  Does anyone know what other encoder-specific optimizations
have gone in theora-mmx ? I'm guessing some of those can also be put in
the liboil patch to further speed things up.

Thomas




Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
Black out the windows
It's party time
You know how I like stormy weather
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: theora.oil.patch.gz
Type: application/x-gzip
Size: 4857 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20050729/521dc624/theora.oil.patch-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: liboil.theora.patch.gz
Type: application/x-gzip
Size: 22821 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20050729/521dc624/liboil.theora.patch-0001.bin


More information about the Theora-dev mailing list