On optimizing Theora

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Fri Feb 20 00:28:42 EST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have been testing libtheora-1.0 on a MP XO.  On build 767, using F9's
gcc-4.3, I compiled libtheora with CFLAGS="-march=geode".  I tested
encode, with the command

time encoder_example -v 1 coastguard_cif.y4m > /dev/null
using the test video from
http://media.xiph.org/video/derf/y4m/coastguard_qcif.y4m.  This test ran
in 44.15 +/- 0.15 seconds (all times are "user" time).

I then tested decode, with the command
time dump_video coastguard_cif1.ogv > /dev/null
using the ogg video that would be produced by the encoder above were it
not redirected to /dev/null.  This test ran in 4.60 +/- 0.05 seconds.

I then repeated these tests after recompiling with "-march=i586
- -mtune=generic", which I assume are approximately the CFLAGS used by
Fedora.  The resultant times  were 41.6 +/- 0.1 and 4.45 +/- 0.05.

In conclusion, compiling libtheora with "-march=geode" causes it to run
significantly (20 sigma, 7%) slower than "-march=i586 -mtune=generic" for
encoding, and possibly slightly slower for decoding as well.  GCC 4.3
evidently does not do a very good job of optimizing for geode.

- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkmeP4oACgkQUJT6e6HFtqQw8wCdEhQQi0qzQNjn++HQU1uQRMXG
+aIAnA/LStzVA7pSZGMRFIWXUbeQv3oc
=wp55
-----END PGP SIGNATURE-----



More information about the Devel mailing list