You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in /issues/6373 - depth camera is not working properly when librealsense is build with CUDA. There is a bug in src/proc/depth-formats-converter.cpp file, which causes the wrong data to be copied for build with CUDA.
The functions unpack_z16_y8_from_sr300_inzi and unpack_z16_y16_from_sr300_inzi use the source data pointer (in) - the first half of the data is bit-shifted and stored in dest[1], the second half is directly copied to dest[0]. In the CPU version, the pointer is moved in a loop and after its execution it points to in + count - so the copying works as it should. In the CUDA version, the pointer is never moved, so bad data is copied to dest[0], resulting in an incorrect depth image. Simply moving the pointer to the right place fixes the problem.
The text was updated successfully, but these errors were encountered:
Thanks very much @andrusza2 for your report of your own experience of this SR300 issue and your kind contribution of a PR solution to address the problem. This case will be kept open for the duration that the PR is active. Thanks again!
Hi @andrusza2 As your kindly contributed PR fix for incorrect depth with CUDA was released in SDK 2.47.0, I will close this case. Thanks so much for your work in resolving this SR300 issue!
Issue Description
As mentioned in /issues/6373 - depth camera is not working properly when librealsense is build with CUDA. There is a bug in
src/proc/depth-formats-converter.cpp
file, which causes the wrong data to be copied for build with CUDA.The functions
unpack_z16_y8_from_sr300_inzi
andunpack_z16_y16_from_sr300_inzi
use the source data pointer (in
) - the first half of the data is bit-shifted and stored indest[1]
, the second half is directly copied todest[0]
. In the CPU version, the pointer is moved in a loop and after its execution it points toin + count
- so the copying works as it should. In the CUDA version, the pointer is never moved, so bad data is copied todest[0]
, resulting in an incorrect depth image. Simply moving the pointer to the right place fixes the problem.The text was updated successfully, but these errors were encountered: