-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Occlusion bug fix #7131
Occlusion bug fix #7131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For review
src/proc/occlusion-filter.cpp
Outdated
for (int i = 0; i < height; i = i + ROTATION_BUFFER_SIZE) | ||
auto buffer_size = maxDivisorRange(height, width, 1, ROTATION_BUFFER_SIZE); | ||
|
||
byte *buffer = new byte[buffer_size * buffer_size * SIZE]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see delete[]...
Here managed (RAII) memory is preferred, so please switch to std::vector
src/proc/occlusion-filter.cpp
Outdated
return a; | ||
return gcd(b, a % b); | ||
} | ||
// Return the gretest common divisor of a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
greatest
impact on performance? |
{ | ||
int g = gcd(a, b); | ||
int res = g; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add check low<high
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Only GCD function could impact performance, but it is not significant. |
Have you measured it? |
yes, these are some prints: With GCD: NO GCD: |
Tracked on: RS5-8522
Fixes #6990