On Wed, Apr 20, 2016 at 12:35 AM, Mark Thompson <[email protected]> wrote:
> On 19/04/16 21:36, Luca Barbato wrote:
>> -                *f->adaptcoeffs = ((res & ((~0UL) << 31)) ^ ((~0UL) << 30)) 
>> >>
>> +                *f->adaptcoeffs = ((res & INT32_MIN) ^ (INT32_MIN >> 1)) >>
>>                                    (25 + (absres <= f->avg*3) + (absres <= 
>> f->avg*4/3));
>
> This is still relying on implementation-defined behaviour by right-shifting a 
> negative signed integer (and on int being 32 bits).  The compiler can still 
> do the wrong thing if it wants, but at least it now has to have documented 
> that it will in advance.
>

Thats because for some reason he replaced the second part with
INT32_MIN as well, the original commit I linked in the other thread
didn't rely on implementation defined behavior anymore.

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

Reply via email to