[FFmpeg-devel] [RFC] "Likely" and "Unlikely" macros
Jason Garrett-Glaser
darkshikari
Tue Oct 7 23:03:31 CEST 2008
The following macros seem to provide great benefit in some critical
code sections, such as decode_cabac_residual, where I've shaved off a
few clocks experimenting with them:
#define likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)
This is probably due to gcc knowing which side of each if statement to inline.
Is there any objection to using these in various critical code
sections in ffmpeg?
Dark Shikari
More information about the ffmpeg-devel
mailing list