[x265] x265 bug report
nathan
13022198075 at 163.com
Thu Nov 25 04:36:18 UTC 2021
hi Guys,
At source/common/pixel.cpp: line 203
An function seems have an error:
// in: a pseudo-simd number of the form x+(y<<16)
// return: abs(x)+(abs(y)<<16)
inlinesum2_tabs2(sum2_ta)
{
sum2_ts = ((a >> (BITS_PER_SUM - 1)) & (((sum2_t)1 << BITS_PER_SUM) + 1)) * ((sum_t)-1);
return (a + s) ^ s;
}
see my test :
int main()
{
sum_t A = -1; # 0xffff
sum_t B = -2; # 0xfffe
sum2_t C = (B << BITS_PER_SUM) + A; # 0xfffeffff
sum2_t D = abs2(C); # 0x00010001
sum2_t E = (2 << BITS_PER_SUM) + 1; # 0x00020001
}
At the function description, the D should be equal to E, but it not the same from my test.
(please check the test is ok or not, in case I missed something....)
the abs2() is used to calculate SATD, which effect the selection of motion evaluation, not effect the correctness of encoder function.
(can someone tell me where can I commit this bug report to? Thanks!)
BR-x265,
Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20211125/bf73d5be/attachment.html>
More information about the x265-devel
mailing list