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

camerad: optimize calculate_exposure_value with improved loop performance #34633

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Feb 20, 2025

improves the performance of the calculate_exposure_value function by

  1. Pre-calculating loop limits to reduce redundant computations.
  2. Using row_ptr in the inner loop to minimize memory access overhead.

These changes reduce execution time by approximately 1ms per camera. If execution time remains a bottleneck, future optimizations could consider downsampling the ROI to further speed up the luminance calculation.

@deanlee deanlee marked this pull request as draft February 20, 2025 17:20
@deanlee deanlee force-pushed the camerad_improve_calculate_exposure_value branch 3 times, most recently from 7ff7c03 to ae94aca Compare February 21, 2025 02:05
@deanlee deanlee marked this pull request as ready for review February 21, 2025 02:51
@deanlee deanlee force-pushed the camerad_improve_calculate_exposure_value branch from ae94aca to 99e3e3c Compare February 21, 2025 02:53
@deanlee deanlee marked this pull request as draft February 21, 2025 04:04
@deanlee deanlee force-pushed the camerad_improve_calculate_exposure_value branch from 99e3e3c to 15eca7a Compare February 21, 2025 14:50
@deanlee deanlee force-pushed the camerad_improve_calculate_exposure_value branch from 15eca7a to a17ed25 Compare February 21, 2025 14:51
@deanlee deanlee marked this pull request as ready for review February 21, 2025 14:51
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.

1 participant