[x264-devel] does overflow in abs2() ?

BugMaster BugMaster at narod.ru
Fri Dec 19 00:29:40 CET 2014


On Fri, 19 Dec 2014 05:55:40 +0800 (CST), chen wrote:
> In the SATD, x264 call abs2() to accelerate 2 pixels parallelism.
> I test the function abs2(), it seem can't output right result.
> of course, it is less possible mistake.

> eg:
> abs(0) & abs(-1) ---> abs2(0x0000FFFF) ---> 0x00010001
>  
> Am I right?
>  
> Thanks,
> Min
>   
Hi. IMHO your interpretation of input parameter for this function was
wrong. After some thinking I get to conclusion that "in: a pseudo-simd
number of the form x+(y<<16)" for y = 0, x=-1 would be 0xFFFFFFFF and
not 0x0000FFFF which would correspond to y=1, x=-1 and so answer is
correct.



More information about the x264-devel mailing list