On 19/04/16 20:45, Luca Barbato wrote: > ... > - *f->adaptcoeffs = ((res & ((~0UL) << 31)) ^ ((~0UL) << 30)) > >> > + *f->adaptcoeffs = ((res & (int)((~0UL) << 31)) ^ > (int)((~0UL) << 30)) >>
(int)((~0UL) << 31) is signed integer overflow and therefore undefined behaviour. This is trying to choose between two values depending on whether the sign bit of a 32-bit int is set or not? Maybe just remove all the overly-clever shifting and write a conditional. It would also be clearer what's going on. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
