[FFmpeg-devel] [PATCH] Bink Video decoder for FFmpeg 0.6
Wed Feb 17 18:59:19 CET 2010
On Wed, Feb 17, 2010 at 03:05:06PM +0200, Kostya wrote:
> On Tue, Feb 16, 2010 at 11:45:31AM -0800, Jason Garrett-Glaser wrote:
> > + if (v & 0x80)
> > + v = -(v & 0x7F);
> > Same here.
> I don't see an easy way to bit manipulate it.
Hm? The "stupid" way:
int mask = (int8_t)v >> 7;
v = ((v & 0x7F) ^ mask) - mask;
or maybe a tiny bit better:
v = ((v & 0x7F) + mask) ^ mask;
More information about the ffmpeg-devel