View Single Post
Old 2nd November 2009, 07:30   #18  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Code:
([ceiling(w / 16) * 16] * [ceiling(h / 16) * 16])
->
(((width+15)&~15) * ((height+15)&~15))
though it's not readable to most non-programmers, the above style is how x264 does it in a number of places.
simplicity-wise, what LoRd_MuldeR has would be easiest to read and understand for most people though.
__________________
custom x264 builds & patches | F@H | My Specs

Last edited by kemuri-_9; 2nd November 2009 at 07:42.
kemuri-_9 is offline   Reply With Quote