4141namespace librealsense
4242{
4343 std::map<uint32_t , rs2_format> ds5_depth_fourcc_to_rs2_format = {
44+ {rs_fourcc (' Y' ,' U' ,' Y' ,' 2' ), RS2_FORMAT_YUYV},
45+ {rs_fourcc (' Y' ,' U' ,' Y' ,' V' ), RS2_FORMAT_YUYV},
46+ {rs_fourcc (' U' ,' Y' ,' V' ,' Y' ), RS2_FORMAT_UYVY},
4447 {rs_fourcc (' G' ,' R' ,' E' ,' Y' ), RS2_FORMAT_Y8},
4548 {rs_fourcc (' Y' ,' 8' ,' I' ,' ' ), RS2_FORMAT_Y8I},
4649 {rs_fourcc (' W' ,' 1' ,' 0' ,' ' ), RS2_FORMAT_W10},
4750 {rs_fourcc (' Y' ,' 1' ,' 6' ,' ' ), RS2_FORMAT_Y16},
4851 {rs_fourcc (' Y' ,' 1' ,' 2' ,' I' ), RS2_FORMAT_Y12I},
4952 {rs_fourcc (' Z' ,' 1' ,' 6' ,' ' ), RS2_FORMAT_Z16},
50- {rs_fourcc (' U' ,' Y' ,' V' ,' Y' ), RS2_FORMAT_UYVY},
5153 {rs_fourcc (' R' ,' G' ,' B' ,' 2' ), RS2_FORMAT_BGR8}
5254
5355 };
5456 std::map<uint32_t , rs2_stream> ds5_depth_fourcc_to_rs2_stream = {
57+ {rs_fourcc (' Y' ,' U' ,' Y' ,' 2' ), RS2_STREAM_INFRARED},
58+ {rs_fourcc (' Y' ,' U' ,' Y' ,' V' ), RS2_STREAM_INFRARED},
59+ {rs_fourcc (' U' ,' Y' ,' V' ,' Y' ), RS2_STREAM_INFRARED},
5560 {rs_fourcc (' G' ,' R' ,' E' ,' Y' ), RS2_STREAM_INFRARED},
5661 {rs_fourcc (' Y' ,' 8' ,' I' ,' ' ), RS2_STREAM_INFRARED},
5762 {rs_fourcc (' W' ,' 1' ,' 0' ,' ' ), RS2_STREAM_INFRARED},
5863 {rs_fourcc (' Y' ,' 1' ,' 6' ,' ' ), RS2_STREAM_INFRARED},
5964 {rs_fourcc (' Y' ,' 1' ,' 2' ,' I' ), RS2_STREAM_INFRARED},
60- {rs_fourcc (' U' ,' Y' ,' V' ,' Y' ), RS2_STREAM_INFRARED},
6165 {rs_fourcc (' R' ,' G' ,' B' ,' 2' ), RS2_STREAM_INFRARED},
6266 {rs_fourcc (' Z' ,' 1' ,' 6' ,' ' ), RS2_STREAM_DEPTH},
6367 };
@@ -284,7 +288,7 @@ namespace librealsense
284288 public:
285289 explicit ds5_depth_sensor (ds5_device* owner,
286290 std::shared_ptr<uvc_sensor> uvc_sensor)
287- : synthetic_sensor(" Depth Sensor " , uvc_sensor, owner, ds5_depth_fourcc_to_rs2_format, ds5_depth_fourcc_to_rs2_stream),
291+ : synthetic_sensor(ds::DEPTH_STEREO , uvc_sensor, owner, ds5_depth_fourcc_to_rs2_format, ds5_depth_fourcc_to_rs2_stream),
288292 _owner(owner),
289293 _depth_units(-1 )
290294 {}
@@ -364,7 +368,6 @@ namespace librealsense
364368 });
365369 }
366370 }
367- add_source_profiles_missing_data ();
368371
369372 return results;
370373 }
@@ -451,7 +454,6 @@ namespace librealsense
451454 });
452455 }
453456 }
454- add_source_profiles_missing_data ();
455457
456458 return results;
457459 }
@@ -915,7 +917,7 @@ namespace librealsense
915917 std::unique_ptr<frame_timestamp_reader> ds5_timestamp_reader_metadata (new ds5_timestamp_reader_from_metadata (std::move (ds5_timestamp_reader_backup)));
916918
917919 auto enable_global_time_option = std::shared_ptr<global_time_option>(new global_time_option ());
918- auto raw_depth_ep = std::make_shared<uvc_sensor>(" Depth Sensor " , std::make_shared<platform::multi_pins_uvc_device>(depth_devices), std::unique_ptr<frame_timestamp_reader>(new global_timestamp_reader (std::move (ds5_timestamp_reader_metadata), _tf_keeper, enable_global_time_option)), this );
920+ auto raw_depth_ep = std::make_shared<uvc_sensor>(ds::DEPTH_STEREO , std::make_shared<platform::multi_pins_uvc_device>(depth_devices), std::unique_ptr<frame_timestamp_reader>(new global_timestamp_reader (std::move (ds5_timestamp_reader_metadata), _tf_keeper, enable_global_time_option)), this );
919921 auto depth_ep = std::make_shared<ds5u_depth_sensor>(this , raw_depth_ep);
920922
921923 depth_ep->register_option (RS2_OPTION_GLOBAL_TIME_ENABLED, enable_global_time_option);
@@ -926,11 +928,8 @@ namespace librealsense
926928 depth_ep->register_processing_block ({ {RS2_FORMAT_W10} }, { {RS2_FORMAT_RAW10, RS2_STREAM_INFRARED, 1 } }, []() { return std::make_shared<w10_converter>(RS2_FORMAT_RAW10); });
927929 depth_ep->register_processing_block ({ {RS2_FORMAT_W10} }, { {RS2_FORMAT_Y10BPACK, RS2_STREAM_INFRARED, 1 } }, []() { return std::make_shared<w10_converter>(RS2_FORMAT_Y10BPACK); });
928930
929- depth_ep->register_processing_block ({ {RS2_FORMAT_UYVY} }, { {RS2_FORMAT_RGB8, RS2_STREAM_INFRARED} }, []() { return std::make_shared<uyvy_converter>(RS2_FORMAT_RGB8, RS2_STREAM_INFRARED); });
930- depth_ep->register_processing_block ({ {RS2_FORMAT_UYVY} }, { {RS2_FORMAT_RGBA8, RS2_STREAM_INFRARED} }, []() { return std::make_shared<uyvy_converter>(RS2_FORMAT_RGBA8, RS2_STREAM_INFRARED); });
931- depth_ep->register_processing_block ({ {RS2_FORMAT_UYVY} }, { {RS2_FORMAT_BGR8, RS2_STREAM_INFRARED} }, []() { return std::make_shared<uyvy_converter>(RS2_FORMAT_BGR8, RS2_STREAM_INFRARED); });
932- depth_ep->register_processing_block ({ {RS2_FORMAT_UYVY} }, { {RS2_FORMAT_BGRA8, RS2_STREAM_INFRARED} }, []() { return std::make_shared<uyvy_converter>(RS2_FORMAT_BGRA8, RS2_STREAM_INFRARED); });
933- depth_ep->register_processing_block (processing_block_factory::create_id_pbf (RS2_FORMAT_UYVY, RS2_STREAM_INFRARED));
931+ depth_ep->register_processing_block (processing_block_factory::create_pbf_vector<uyvy_converter>(RS2_FORMAT_UYVY, map_supported_color_formats (RS2_FORMAT_UYVY), RS2_STREAM_INFRARED));
932+
934933
935934 return depth_ep;
936935 }
0 commit comments