Skip to content
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

Merged
merged 5 commits into from
Aug 20, 2020
Merged

Conversation

nohayassin
Copy link
Contributor

@nohayassin nohayassin commented Aug 19, 2020

Tracked on: RS5-8522
Fixes #6990

@dorodnic dorodnic changed the base branch from master to development August 19, 2020 15:01
Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For review

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];
Copy link
Collaborator

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

return a;
return gcd(b, a % b);
}
// Return the gretest common divisor of a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

greatest

@dorodnic
Copy link
Contributor

impact on performance?

{
int g = gcd(a, b);
int res = g;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add check low<high

Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nohayassin
Copy link
Contributor Author

impact on performance?

Only GCD function could impact performance, but it is not significant.

@ev-mp ev-mp merged commit 98740d9 into IntelRealSense:development Aug 20, 2020
@dorodnic
Copy link
Contributor

impact on performance?

Only GCD function could impact performance, but it is not significant.

Have you measured it?

@nohayassin
Copy link
Contributor Author

nohayassin commented Aug 23, 2020

impact on performance?

Only GCD function could impact performance, but it is not significant.

Have you measured it?

yes, these are some prints:

With GCD:
Vertical Scan ..................................... 2,523 usec, 31 Hz
Vertical Scan ..................................... 2,620 usec, 31 Hz
Vertical Scan ..................................... 2,471 usec, 31 Hz
Vertical Scan ..................................... 2,492 usec, 30 Hz
Vertical Scan ..................................... 2,488 usec, 32 Hz

NO GCD:
Vertical Scan ..................................... 2,449 usec, 31 Hz
Vertical Scan ..................................... 2,490 usec, 31 Hz
Vertical Scan ..................................... 2,408 usec, 31 Hz
Vertical Scan ..................................... 2,351 usec, 31 Hz
Vertical Scan ..................................... 2,291 usec, 30 Hz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants