[Ffmpeg-devel] H.264 encoder

Christian Iversen chrivers
Wed Oct 4 18:49:27 CEST 2006


On Wednesday 04 October 2006 17:51, Panagiotis Issaris wrote:

> > [...]
> >
> > > +                if (val > 0)
> > > +                    val--;
> > > +                else // < 0
> > > +                    val++;
> >
> > val -= (val>>31)|1;
>
> Fixed.

Is it because I appearantly don't understand C, or is that a pretty odd 
expression? 

You take the sign bit, and "or" it with 1, leaving ... 1, in all cases.

Is this expression equiv. to val--; ? 

-- 
Regards,
Christian Iversen




More information about the ffmpeg-devel mailing list