Skip to content

Commit

Permalink
Add calib_info frame counter
Browse files Browse the repository at this point in the history
  • Loading branch information
ev-mp authored and Evgeni Raikhel committed Nov 5, 2022
1 parent 03e120c commit 03bee19
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/librealsense2/h/rs_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ typedef enum rs2_frame_metadata_value
RS2_FRAME_METADATA_INPUT_WIDTH,
RS2_FRAME_METADATA_INPUT_HEIGHT,
RS2_FRAME_METADATA_SUB_PRESET_INFO,
RS2_FRAME_METADATA_CALIB_INFO,
RS2_FRAME_METADATA_CRC,

RS2_FRAME_METADATA_COUNT
Expand Down
6 changes: 5 additions & 1 deletion src/ds5/ds5-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1314,10 +1314,14 @@ namespace librealsense
make_attribute_parser(&md_mipi_depth_mode::input_height,
md_mipi_depth_control_attributes::input_height_attribute,
md_prop_offset));
depth_sensor.register_metadata(RS2_FRAME_METADATA_SUB_PRESET_INFO, // added for mipi
depth_sensor.register_metadata(RS2_FRAME_METADATA_SUB_PRESET_INFO,
make_attribute_parser(&md_mipi_depth_mode::sub_preset_info,
md_mipi_depth_control_attributes::sub_preset_info_attribute,
md_prop_offset));
depth_sensor.register_metadata(RS2_FRAME_METADATA_CALIB_INFO,
make_attribute_parser(&md_mipi_depth_mode::calib_info,
md_mipi_depth_control_attributes::calibration_info_attribute,
md_prop_offset));
depth_sensor.register_metadata(RS2_FRAME_METADATA_CRC, // added for mipi
make_attribute_parser(&md_mipi_depth_mode::crc,
md_mipi_depth_control_attributes::crc_attribute,
Expand Down
7 changes: 5 additions & 2 deletions src/metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ namespace librealsense
input_width_attribute = (1u << 10),
input_height_attribute = (1u << 11),
sub_preset_info_attribute = (1u << 12),
crc_attribute = (1u << 13)
calibration_info_attribute = (1u << 13), // shall be used to stire the frame counter in calibration routines
crc_attribute = (1u << 14)
};

/**\brief md_mipi_rgb_control_attributes - bit mask to find active attributes,
Expand Down Expand Up @@ -368,7 +369,9 @@ namespace librealsense
struct md_mipi_depth_mode
{
md_header header;
uint32_t version; // maybe need to replace by uint8_t for version and 3 others for reserved
uint8_t version; // maybe need to replace by uint8_t for version and 3 others for reserved
uint16_t calib_info;
uint8_t reserved;
uint32_t flags; // Bit array to specify attributes that are valid
uint32_t hw_timestamp;
uint32_t optical_timestamp; //In microsecond unit
Expand Down
1 change: 1 addition & 0 deletions src/to-string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ const char * get_string( rs2_frame_metadata_value value )
CASE( INPUT_WIDTH )
CASE( INPUT_HEIGHT )
CASE( SUB_PRESET_INFO )
CASE( CALIB_INFO )
CASE( CRC )

default:
Expand Down

0 comments on commit 03bee19

Please sign in to comment.