You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q. Their results are different. Which are these behaviours correct/better ?
If arm64 behaviours should be fixed...
For arm64, I think it can fix following patch.
However v_round() function seems to used many times.
I feel the risk of breaking backwards compatibility.
I would appreciate it if you could comment on this issue.
I felt that the existing tests were sufficient to confirm the impact and the side effects.
I tried the existing tests, including core module, on 64bit arm Ubuntu running on Raspi4 and found no new issues.
I created Pull Request with new test code.
This fix should also affect MacOS ARM64, but I don't have the equipment and couldn't try it. I'm sorry
Supplement.
The same Neon instruction is used in v_truncate().
When using v_truncate, I think it is better to move it to the zero side when the decimal part becomes 0.5.
System Information
OpenCV version: 4.x branch
Operating System / Platform: Ubuntu 20.04 (Raspi4, arm64)
Compiler & compiler version: GCC 9.3.0
Detailed description
This issue is about
cv::divide()
. related with #24074Rounding rule for it is not describled at cv::divide()
In arm64, it works with Round to nearest, ties away from zero
In x86-64, it works with Round to nearest, ties to even.
(Possibly, the behavior may change according to the rounding mode specification of the floating point unit.)
Q. Their results are different. Which are these behaviours correct/better ?
If arm64 behaviours should be fixed...
For arm64, I think it can fix following patch.
However
v_round()
function seems to used many times.I feel the risk of breaking backwards compatibility.
I would appreciate it if you could comment on this issue.
before : https://developer.arm.com/architectures/instruction-sets/intrinsics/vcvtaq_s64_f64
after : https://developer.arm.com/architectures/instruction-sets/intrinsics/vcvtnq_s64_f64
Steps to reproduce
Issue submission checklist
The text was updated successfully, but these errors were encountered: