A little bit of __attribute__((always_inline)) goes a long way

Previously, with my SPU programs, I’ve been relying on heavy, gratuitous use of the param option to set various inlining thresholds absurdly high – the result being large programs that take a long time to compile, but run quite fast.

The alternative is a little bit more precision – working out where the compiler isn’t inlining something that would be beneficial to be inlined (i.e. handling sw cache hits) and forcing it to do so using always_inline.

The result? Faster compilation, smaller programs and (so far) programs that are as fast or faster – the compiler generally knows what it’s doing when it comes to inlining, there’s just some silly little, very hot, cache routines that it doesn’t handle well.

Vid to MPEG2

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,harddup \-srate 48000 -af lavcresample=48000 \-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9:\acodec=ac3:abitrate=192 -ofps 25 -o your_video.mpg your_video.avi(from http://www.linux.com/feature/53702)

Alternatively, tovid or DeVeDe.