11// License: Apache 2.0. See LICENSE file in root directory.
2- // Copyright(c) 2016 Intel Corporation. All Rights Reserved.
2+ // Copyright(c) 2016-24 Intel Corporation. All Rights Reserved.
33
44#include < librealsense2/h/rs_internal.h>
55#include < src/device.h>
1919#include " d400-color.h"
2020#include " d400-nonmonochrome.h"
2121#include < src/platform/platform-utils.h>
22- #include < src/fourcc.h>
2322
2423#include < src/ds/features/amplitude-factor-feature.h>
2524#include < src/ds/features/emitter-frequency-feature.h>
3736#include < common/fw/firmware-version.h>
3837#include < src/fw-update/fw-update-unsigned.h>
3938
39+ #include < rsutils/type/fourcc.h>
40+ using rsutils::type::fourcc;
41+
4042#include < rsutils/string/hexdump.h>
4143#include < regex>
4244#include < iterator>
@@ -52,36 +54,36 @@ constexpr bool hw_mon_over_xu = false;
5254
5355namespace librealsense
5456{
55- std::map<uint32_t , rs2_format> d400_depth_fourcc_to_rs2_format = {
56- {rs_fourcc (' Y' ,' U' ,' Y' ,' 2' ), RS2_FORMAT_YUYV},
57- {rs_fourcc (' Y' ,' U' ,' Y' ,' V' ), RS2_FORMAT_YUYV},
58- {rs_fourcc (' U' ,' Y' ,' V' ,' Y' ), RS2_FORMAT_UYVY},
59- {rs_fourcc (' G' ,' R' ,' E' ,' Y' ), RS2_FORMAT_Y8},
60- {rs_fourcc (' Y' ,' 8' ,' I' ,' ' ), RS2_FORMAT_Y8I},
61- {rs_fourcc (' W' ,' 1' ,' 0' ,' ' ), RS2_FORMAT_W10},
62- {rs_fourcc (' Y' ,' 1' ,' 6' ,' ' ), RS2_FORMAT_Y16},
63- {rs_fourcc (' Y' ,' 1' ,' 2' ,' I' ), RS2_FORMAT_Y12I},
64- {rs_fourcc (' Z' ,' 1' ,' 6' ,' ' ), RS2_FORMAT_Z16},
65- {rs_fourcc (' Z' ,' 1' ,' 6' ,' H' ), RS2_FORMAT_Z16H},
66- {rs_fourcc (' R' ,' G' ,' B' ,' 2' ), RS2_FORMAT_BGR8},
67- {rs_fourcc (' M' ,' J' ,' P' ,' G' ), RS2_FORMAT_MJPEG},
68- {rs_fourcc (' B' ,' Y' ,' R' ,' 2' ), RS2_FORMAT_RAW16}
57+ std::map<fourcc::value_type , rs2_format> d400_depth_fourcc_to_rs2_format = {
58+ {fourcc (' Y' ,' U' ,' Y' ,' 2' ), RS2_FORMAT_YUYV},
59+ {fourcc (' Y' ,' U' ,' Y' ,' V' ), RS2_FORMAT_YUYV},
60+ {fourcc (' U' ,' Y' ,' V' ,' Y' ), RS2_FORMAT_UYVY},
61+ {fourcc (' G' ,' R' ,' E' ,' Y' ), RS2_FORMAT_Y8},
62+ {fourcc (' Y' ,' 8' ,' I' ,' ' ), RS2_FORMAT_Y8I},
63+ {fourcc (' W' ,' 1' ,' 0' ,' ' ), RS2_FORMAT_W10},
64+ {fourcc (' Y' ,' 1' ,' 6' ,' ' ), RS2_FORMAT_Y16},
65+ {fourcc (' Y' ,' 1' ,' 2' ,' I' ), RS2_FORMAT_Y12I},
66+ {fourcc (' Z' ,' 1' ,' 6' ,' ' ), RS2_FORMAT_Z16},
67+ {fourcc (' Z' ,' 1' ,' 6' ,' H' ), RS2_FORMAT_Z16H},
68+ {fourcc (' R' ,' G' ,' B' ,' 2' ), RS2_FORMAT_BGR8},
69+ {fourcc (' M' ,' J' ,' P' ,' G' ), RS2_FORMAT_MJPEG},
70+ {fourcc (' B' ,' Y' ,' R' ,' 2' ), RS2_FORMAT_RAW16}
6971
7072 };
71- std::map<uint32_t , rs2_stream> d400_depth_fourcc_to_rs2_stream = {
72- {rs_fourcc (' Y' ,' U' ,' Y' ,' 2' ), RS2_STREAM_COLOR},
73- {rs_fourcc (' Y' ,' U' ,' Y' ,' V' ), RS2_STREAM_COLOR},
74- {rs_fourcc (' U' ,' Y' ,' V' ,' Y' ), RS2_STREAM_INFRARED},
75- {rs_fourcc (' G' ,' R' ,' E' ,' Y' ), RS2_STREAM_INFRARED},
76- {rs_fourcc (' Y' ,' 8' ,' I' ,' ' ), RS2_STREAM_INFRARED},
77- {rs_fourcc (' W' ,' 1' ,' 0' ,' ' ), RS2_STREAM_INFRARED},
78- {rs_fourcc (' Y' ,' 1' ,' 6' ,' ' ), RS2_STREAM_INFRARED},
79- {rs_fourcc (' Y' ,' 1' ,' 2' ,' I' ), RS2_STREAM_INFRARED},
80- {rs_fourcc (' R' ,' G' ,' B' ,' 2' ), RS2_STREAM_INFRARED},
81- {rs_fourcc (' Z' ,' 1' ,' 6' ,' ' ), RS2_STREAM_DEPTH},
82- {rs_fourcc (' Z' ,' 1' ,' 6' ,' H' ), RS2_STREAM_DEPTH},
83- {rs_fourcc (' B' ,' Y' ,' R' ,' 2' ), RS2_STREAM_COLOR},
84- {rs_fourcc (' M' ,' J' ,' P' ,' G' ), RS2_STREAM_COLOR}
73+ std::map<fourcc::value_type , rs2_stream> d400_depth_fourcc_to_rs2_stream = {
74+ {fourcc (' Y' ,' U' ,' Y' ,' 2' ), RS2_STREAM_COLOR},
75+ {fourcc (' Y' ,' U' ,' Y' ,' V' ), RS2_STREAM_COLOR},
76+ {fourcc (' U' ,' Y' ,' V' ,' Y' ), RS2_STREAM_INFRARED},
77+ {fourcc (' G' ,' R' ,' E' ,' Y' ), RS2_STREAM_INFRARED},
78+ {fourcc (' Y' ,' 8' ,' I' ,' ' ), RS2_STREAM_INFRARED},
79+ {fourcc (' W' ,' 1' ,' 0' ,' ' ), RS2_STREAM_INFRARED},
80+ {fourcc (' Y' ,' 1' ,' 6' ,' ' ), RS2_STREAM_INFRARED},
81+ {fourcc (' Y' ,' 1' ,' 2' ,' I' ), RS2_STREAM_INFRARED},
82+ {fourcc (' R' ,' G' ,' B' ,' 2' ), RS2_STREAM_INFRARED},
83+ {fourcc (' Z' ,' 1' ,' 6' ,' ' ), RS2_STREAM_DEPTH},
84+ {fourcc (' Z' ,' 1' ,' 6' ,' H' ), RS2_STREAM_DEPTH},
85+ {fourcc (' B' ,' Y' ,' R' ,' 2' ), RS2_STREAM_COLOR},
86+ {fourcc (' M' ,' J' ,' P' ,' G' ), RS2_STREAM_COLOR}
8587 };
8688
8789 std::vector<uint8_t > d400_device::send_receive_raw_data (const std::vector<uint8_t >& input)
0 commit comments