You are not logged in.
Hey all!
I recently tried to recompile HandBrake from /community to optimize encoding performance. I have an AMD Phenom II X4 965, and using -march=native should give me (among a bunch of other things) -march=amdfam10 and -mtune=amdfam10. I was hoping that this would improve the time it takes to encode something. So first I timed how long it took to encode a particular clip with the HandBrake from the repos, and got 3m4s. Then I replaced -march=x86_64 and -mtune=generic in makepkg.conf with -march=native (keeping -O2 -pipe), got the PKGBUILD from abs, compiled and installed. Then I went on to encode the same clip under the same system conditions. Time: 2m57s.
My question is: should the difference be this small? I read most places that things like encoding are what benefits most from CPU optimizations. Do I need to rebuild the libraries that HandBrake uses as well?
Cheers ^^
Last edited by mariusmeyer (2011-03-24 10:28:34)
Offline
My question is: should the difference be this small?
In short, yes.
Handbrake is just a frontend, not an encoder itself. It uses x264 for encoding, of which a large part is written in Assembler, so there are no further optimisations for your architecture (or any other specific architecture). If it was written in C or C++ it would have been even slower, and you would get some performance gain - and that would still be far slower than what it currently is.
There are other video/audio encoders which benefit from architecture optimisations, although most of this benefit will be seen when comparing 32-bit to 64-bit architecture, nothing more specific (again, there might be a little more performance gain). Such encoders would - IIRC - be LAME and Ogg Vorbis for audio, Theora for video, et al.
edit: also, without any offence to anyone, AMD is really bad at mincing lots of data, compared to Intel. Seriously, if you want better encoding time, the first thing you need is a better CPU, preferrably Intel since they specialise in such stuff. Server-type processors, such as the Xeon family, excel in this particular field.
HTH ![]()
Last edited by Wintershade (2011-03-24 10:25:07)
Only the best is good enough.
Offline
Thanks for the explanation
Didn't know that about x264.
Solved ^^
Offline
You're welcome. ![]()
Only the best is good enough.
Offline