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

Fix cast/conversion issue when using mixed int/float types #10839

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

ev-mp
Copy link
Collaborator

@ev-mp ev-mp commented Aug 29, 2022

Fix for integer type miscalculated in conversion. Corrects #10794
(cherry picked from commit 3e8b34a)

Tracked by: DSO-18458

@ev-mp ev-mp requested review from Nir-Az and maloel August 29, 2022 11:21
@ev-mp ev-mp force-pushed the fix_y12i_heuristic branch 2 times, most recently from 9d840a8 to d9814da Compare August 29, 2022 11:59
@ev-mp ev-mp force-pushed the fix_y12i_heuristic branch from d9814da to 1f30ed7 Compare August 29, 2022 12:01
Copy link
Collaborator

@Nir-Az Nir-Az left a comment

Choose a reason for hiding this comment

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

LGTM

// The calibration format Y12BPP is modified to be 32 bits instead of 24 due to an issue with MIPI driver
// and padding that occurs in transmission.
// For D4xx cameras the original 24 bit support is achieved by comparing actual vs expected size:
// when it is exactly 75% of the MIPI-generated size (24/32bpp), then 24bpp-sized image will be processed
Copy link
Collaborator

Choose a reason for hiding this comment

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

The calibration format is supposed to be 24 bpp?
With D457 24 bpp are sent, but packed in a buffer that's sized for 32 bpp, so the last 25% is garbage?
This explanation needs to be very clear.
The cast (byte*) on line 473 is a bad idea.

@ev-mp ev-mp merged commit 1b4300f into IntelRealSense:D4XX_MIPI Aug 29, 2022
@ev-mp ev-mp deleted the fix_y12i_heuristic branch February 14, 2023 08: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.

3 participants