On Mon, Apr 09, 2012 at 09:23:53PM +0200, Michael Niedermayer wrote: > + else return (v & 0x8000) ? 0 : 0xffff; Probably too rare to matter, but (v >> 15) - 1 should be equivalent.