fix: reset HW D2C undistortion after profile change

This commit is contained in:
slz
2026-07-08 17:39:42 +08:00
parent d59c78d750
commit d7cc005ff4
+7
View File
@@ -3638,8 +3638,12 @@ bool OBCameraNode::applyStreamProfiles(const std::vector<PendingStreamProfile> &
stopColorFrameThreads();
clearColorFrameQueues();
bool profile_affects_hw_d2c_color_undistortion = false;
for (const auto &pending_profile : pending_profiles) {
const auto &stream_index = pending_profile.stream_index;
if (stream_index == COLOR || stream_index == DEPTH) {
profile_affects_hw_d2c_color_undistortion = true;
}
auto selected_profile = pending_profile.profile;
const auto old_format = format_[stream_index];
stream_profile_[stream_index] = selected_profile;
@@ -3667,6 +3671,9 @@ bool OBCameraNode::applyStreamProfiles(const std::vector<PendingStreamProfile> &
image_format_[stream_index], cv::Scalar(0, 0, 0));
}
}
if (profile_affects_hw_d2c_color_undistortion && shouldUseHwD2CColorUndistortion()) {
hw_d2c_color_undistortion_configured_ = false;
}
setupImageBuffers();
clearColorFrameQueues();