On Tue, Aug 09, 2016 at 06:35:14PM +0200, Luca Barbato wrote:
> On 02/08/16 12:28, Diego Biurrun wrote:
> > --- a/libavcodec/golomb.h
> > +++ b/libavcodec/golomb.h
> > @@ -490,19 +490,9 @@ static inline void set_te_golomb(PutBitContext *pb, 
> > int i, int range)
> >  static inline void set_se_golomb(PutBitContext *pb, int i)
> >  {
> > -#if 0
> > -    if (i <= 0)
> > -        i = -2 * i;
> > -    else
> > -        i = 2 * i - 1;
> > -#elif 1
> >      i = 2 * i - 1;
> >      if (i < 0)
> >          i ^= -1;    //FIXME check if gcc does the right thing
> > -#else
> > -    i  = 2 * i - 1;
> > -    i ^= (i >> 31);
> > -#endif
> >      set_ue_golomb(pb, i);
> >  }
> 
> Does gcc do the right thing? and clang?

I'm not sure what exactly that would be.  FWIW, for the second and third
variant, my gcc generates seemingly the same assembly.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to