mipi color md type changed in fw side adjustments#14394
mipi color md type changed in fw side adjustments#14394Nir-Az merged 3 commits intorealsenseai:developmentfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adjusts metadata handling for MIPI color frames to accommodate firmware version-dependent type changes. The firmware now uses different metadata type IDs based on version, requiring backward compatibility.
- Restores the proper
META_DATA_MIPI_INTEL_RGB_IDtype and removes the workaround comment - Implements a new firmware version-aware metadata parser class for MIPI color streams
- Updates all MIPI color metadata registrations to use the new version-aware parser
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/metadata.h | Restores proper MIPI RGB metadata type and removes legacy workaround |
| src/metadata-parser.h | Adds new firmware version-aware metadata parser class for MIPI color |
| src/ds/d400/d400-color.cpp | Updates all metadata registrations to use the new version-aware parser |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/metadata-parser.h
Outdated
| expected_type = md_type_trait<S>::type; | ||
| } | ||
|
|
||
| // checking type and size, with updated expected type |
There was a problem hiding this comment.
Inconsistent indentation detected. This line uses tabs while the surrounding code uses spaces. Please use consistent spacing throughout the file.
| // checking type and size, with updated expected type | |
| // checking type and size, with updated expected type |
| template<class S, class Attribute, typename Flag> | ||
| const librealsense::firmware_version md_attribute_parser_mipi_color<S, Attribute, Flag>::_min_fw_for_type{ "5.17.0.12" }; |
There was a problem hiding this comment.
The firmware version string '5.17.0.12' is hardcoded. Consider defining this as a named constant or configuration value to improve maintainability and make it easier to update when firmware requirements change.
| template<class S, class Attribute, typename Flag> | |
| const librealsense::firmware_version md_attribute_parser_mipi_color<S, Attribute, Flag>::_min_fw_for_type{ "5.17.0.12" }; | |
| // Named constant for minimum firmware version required for MIPI color type | |
| constexpr const char MIN_FW_VERSION_FOR_MIPI_COLOR_TYPE[] = "5.17.0.12"; | |
| template<class S, class Attribute, typename Flag> | |
| const librealsense::firmware_version md_attribute_parser_mipi_color<S, Attribute, Flag>::_min_fw_for_type{ MIN_FW_VERSION_FOR_MIPI_COLOR_TYPE }; |
Nir-Az
left a comment
There was a problem hiding this comment.
Currently merging as is, we will try later to optimize it
Tracked by: RSDSO-20682