-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correlation function arm_correlate_f32 has wrong output array length expectation for NEON #120
Comments
In the documentation I can read:
and also in documentation:
So I don't see any bug. It behaves as expected but I agree that it may be improved to use less memory. I think the reason it is done like that is to:
|
From the documentation :
but should not the result Edit Depending of whether If I found the documentation a bit misleading about the definition domain of |
@rohardy The output is padded with zeros. It is longer than what is strictly needed. |
@christophe0606 I understand, but I think the documentation could be more precise about where the actual result lays. |
@rohardy You're right. Documentation will be improved. |
arm_correlate_f32()
expecting the output array size to be2*srcALen - 1
instead ofsrcALen + srcBLen - 1
forARM_MATH_DSP
case.Maybe just changing line 361 will be enough to fix the issue.
Now the output is unexpected, and call leads to buffer overflow if you don't guess output array size correctly:
results in
The text was updated successfully, but these errors were encountered: