View Full Version : How much of x264 could be assembly?


Inventive Software
10th May 2006, 17:06
I'm curious, as I wanna learn ASM this summer, and I figure I ought to work on a meaningful project, such as x264, while doing so. It needs to be speeded up considerably IMO, and I think by making some of it Assembly that could help.

morph166955
10th May 2006, 17:21
writing x264 in assembly, while plausably could be great, would be an absolute and complete pain. while i havent counted the lines in c/c++ that x264 is written in, i would say multiply it by 10 to write it in assembly and thats assuming you have a VERY good understanding of it. ive written software in i386 assembly and while its definitely doable, it would probably take months of daily work on it to get a working version and thats assuming you know assembly very well when you start. sorry to burst your bubble, but thats a really bad idea for a first project. if you wanna write something that would be on the challenging side but still good i say write a web server or something of that nature.

If you want to do something meaningful and help the x264 people i suggest trying to optimize their alg's to speed it up. While i have the utmost confidence in them and they have definitely built a great piece of software im sure that a fresh set of eyes may be able to find a faster way to run some of their calculations.

nm
10th May 2006, 17:34
Writing any software completely in assembly is a waste of time these days. Anyway, Inventive Software said that he was considering implementing some parts of x264 in assembly, which is a good idea. If you browse the x264 source code through, you'll see that many functions have already been implemented in hand coded assembly for different architectures. Probably more could be done, but the gains won't be high since the most time-demanding parts have already been optimized (at least for x86 and x86-64). Unless you come up with some miraculous hack to speed up the code ;)