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

deprecate Z16H format #13743

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/rendering.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ namespace rs2
case RS2_FORMAT_ANY:
throw std::runtime_error("not a valid format");
case RS2_FORMAT_Z16H:
throw std::runtime_error("unexpected format: Z16H. Check decoder processing block");
throw std::runtime_error("unexpected format: Z16H is deprecated! Check decoder processing block");
case RS2_FORMAT_Z16:
case RS2_FORMAT_DISPARITY16:
case RS2_FORMAT_DISPARITY32:
Expand Down
6 changes: 0 additions & 6 deletions src/ds/d400/d400-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ namespace librealsense
{fourcc('Y','1','6',' '), RS2_FORMAT_Y16},
{fourcc('Y','1','2','I'), RS2_FORMAT_Y12I},
{fourcc('Z','1','6',' '), RS2_FORMAT_Z16},
{fourcc('Z','1','6','H'), RS2_FORMAT_Z16H},
{fourcc('R','G','B','2'), RS2_FORMAT_BGR8},
{fourcc('M','J','P','G'), RS2_FORMAT_MJPEG},
{fourcc('B','Y','R','2'), RS2_FORMAT_RAW16}
Expand Down Expand Up @@ -638,11 +637,6 @@ namespace librealsense
usb_modality = false;
}

if (_fw_version >= firmware_version("5.12.1.1"))
{
depth_sensor.register_processing_block(processing_block_factory::create_id_pbf(RS2_FORMAT_Z16H, RS2_STREAM_DEPTH));
}

depth_sensor.register_processing_block(
{ {RS2_FORMAT_Y8I} },
{ {RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1} , {RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 2} },
Expand Down
3 changes: 0 additions & 3 deletions src/ds/d500/d500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ namespace librealsense
{rs_fourcc('Y','1','2','I'), RS2_FORMAT_Y12I},
{rs_fourcc('Y','1','6','I'), RS2_FORMAT_Y16I},
{rs_fourcc('Z','1','6',' '), RS2_FORMAT_Z16},
{rs_fourcc('Z','1','6','H'), RS2_FORMAT_Z16H},
{rs_fourcc('R','G','B','2'), RS2_FORMAT_BGR8},
{rs_fourcc('M','J','P','G'), RS2_FORMAT_MJPEG},
{rs_fourcc('B','Y','R','2'), RS2_FORMAT_RAW16}
Expand Down Expand Up @@ -505,8 +504,6 @@ namespace librealsense

_is_symmetrization_enabled = check_symmetrization_enabled();

depth_sensor.register_processing_block(processing_block_factory::create_id_pbf(RS2_FORMAT_Z16H, RS2_STREAM_DEPTH));

depth_sensor.register_processing_block(
{ {RS2_FORMAT_Y8I} },
{ {RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1} , {RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 2} },
Expand Down
2 changes: 1 addition & 1 deletion src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace librealsense
case RS2_FORMAT_INZI: return 32;
case RS2_FORMAT_INVI: return 16;
case RS2_FORMAT_W10: return 32;
case RS2_FORMAT_Z16H: return 16;
case RS2_FORMAT_Z16H: return 16; // DEPRECATED!
case RS2_FORMAT_FG: return 16;
case RS2_FORMAT_Y411: return 12;
case RS2_FORMAT_Y16I: return 32;
Expand Down
2 changes: 1 addition & 1 deletion src/proc/synthetic-stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ namespace librealsense
composite.foreach_rs([&](const rs2::frame& frame)
{
auto format = frame.get_profile().format();
if (depth_result_frame && val_in_range(format, { RS2_FORMAT_DISPARITY32, RS2_FORMAT_DISPARITY16, RS2_FORMAT_Z16H }))
if (depth_result_frame && val_in_range(format, { RS2_FORMAT_DISPARITY32, RS2_FORMAT_DISPARITY16 }))
return;
if (disparity_result_frame && format == RS2_FORMAT_Z16)
return;
Expand Down
2 changes: 1 addition & 1 deletion src/uvc-sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void uvc_sensor::open( const stream_profiles & requests )
expected_size = compute_frame_expected_size( width, height, bpp );

// For compressed formats copy the raw data as is
if( val_in_range( req_profile_base->get_format(), { RS2_FORMAT_MJPEG, RS2_FORMAT_Z16H } ) )
if( val_in_range( req_profile_base->get_format(), { RS2_FORMAT_MJPEG } ) )
expected_size = static_cast< int >( f.frame_size );

auto extension = frame_source::stream_to_frame_types( req_profile_base->get_stream_type() );
Expand Down
4 changes: 1 addition & 3 deletions third-party/realdds/src/dds-stream-profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ enum rs2_format // copy from rs2_sensor.h
RS2_FORMAT_INZI, /**< multi-planar Depth 16bit + IR 10bit. */
RS2_FORMAT_INVI, /**< 8-bit IR stream. */
RS2_FORMAT_W10, /**< Grey-scale image as a bit-packed array. 4 pixel data stream taking 5 bytes */
RS2_FORMAT_Z16H, /**< Variable-length Huffman-compressed 16-bit depth values. */
RS2_FORMAT_Z16H, /**< DEPRECATED! - Variable-length Huffman-compressed 16-bit depth values. */
RS2_FORMAT_FG, /**< 16-bit per-pixel frame grabber format. */
RS2_FORMAT_Y411, /**< 12-bit per-pixel. */
RS2_FORMAT_COMBINED_MOTION,
Expand All @@ -84,7 +84,6 @@ int dds_video_encoding::to_rs2() const
{ "Y12I", RS2_FORMAT_Y12I },
// { "Y16I", RS2_FORMAT_Y16I },
{ "16UC1", RS2_FORMAT_Z16 }, // Used by depth streams; ROS2-compatible
{ "Z16H", RS2_FORMAT_Z16H },
{ "rgb8", RS2_FORMAT_RGB8 }, // Used by color streams; ROS2-compatible
{ "RGBA", RS2_FORMAT_RGBA8 },
{ "RGB2", RS2_FORMAT_BGR8 },
Expand Down Expand Up @@ -117,7 +116,6 @@ dds_video_encoding dds_video_encoding::from_rs2( int rs2_format )
case RS2_FORMAT_Y12I: encoding = "Y12I"; break;
// case RS2_FORMAT_Y16I: encoding = "Y16I"; break;
case RS2_FORMAT_Z16: encoding = "16UC1"; break;
case RS2_FORMAT_Z16H: encoding = "Z16H"; break;
case RS2_FORMAT_RGB8: encoding = "rgb8"; break;
case RS2_FORMAT_RGBA8: encoding = "RGBA"; break; // todo
case RS2_FORMAT_BGR8: encoding = "RGB2"; break;
Expand Down