[FFmpeg-devel] [PATCH] Bink Video decoder for FFmpeg 0.6

Kostya kostya.shishkov
Wed Feb 17 19:16:58 CET 2010


On Wed, Feb 17, 2010 at 06:59:19PM +0100, Reimar D?ffinger wrote:
> 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;

Ahem, overlooked it. Thanks.



More information about the ffmpeg-devel mailing list