Fix SumOfFrame for extremely wide frames#3958
Conversation
|
A workaround had to be added to meson.build because otherwise compilation of the gtest library failed. The correct fix there is probably just to uprev the gtest dependency. Other than that this now passes the tests on all platforms and is ready for review. |
The gtest dependency has been upgraded on master to fix the compiler failure, so the -Wno-uninitialized-const-pointer workaround is no longer needed. Could you please merge the latest master into your branch and drop that workaround? Thanks! @sprangerik |
1d0c0d9 to
247f9a6
Compare
247f9a6 to
1f0dced
Compare
When using very large strides (e.g. with wide resolutions like 21824x16), the value of
3 * kiRefStrideexceeds 65535 and sets the 17th bit ofr6.Inside the loop,
r6wis used to load a 16-bit value from memory. However, the 16-bit move does not clear the upper bits ofr6, leaving the stale high bits from the stride calculation intact. This leads to incorrect index calculations whenr6is subsequently used.This PR resolves the issue by using
movzxto zero-extend the 16-bit load intor6d, ensuring the upper bits of the register are cleared.