fix: update decimation factor references in OBCameraNode and listCameraProfile

This commit is contained in:
ob-yalian
2026-01-13 17:23:09 +08:00
parent 0c0a4d3f53
commit 69c1daa678
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -1406,19 +1406,19 @@ void OBCameraNode::setupProfiles() {
OBHardwareDecimationConfig conf; OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem]; conf.originWidth = width_[elem];
conf.originHeight = height_[elem]; conf.originHeight = height_[elem];
conf.decimationFactor = depth_downscale_; conf.factor = depth_downscale_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]); selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else if (pid == GEMINI_305_PID && elem == INFRA1) { } else if (pid == GEMINI_305_PID && elem == INFRA1) {
OBHardwareDecimationConfig conf; OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem]; conf.originWidth = width_[elem];
conf.originHeight = height_[elem]; conf.originHeight = height_[elem];
conf.decimationFactor = left_ir_downscale_; conf.factor = left_ir_downscale_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]); selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else if (pid == GEMINI_305_PID && elem == INFRA2) { } else if (pid == GEMINI_305_PID && elem == INFRA2) {
OBHardwareDecimationConfig conf; OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem]; conf.originWidth = width_[elem];
conf.originHeight = height_[elem]; conf.originHeight = height_[elem];
conf.decimationFactor = right_ir_downscale_; conf.factor = right_ir_downscale_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]); selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else { } else {
selected_profile = profiles->getVideoStreamProfile(width_[elem], height_[elem], selected_profile = profiles->getVideoStreamProfile(width_[elem], height_[elem],
+3 -3
View File
@@ -32,9 +32,9 @@ void listSensorProfiles(const std::shared_ptr<ob::Device>& device) {
std::cout << magic_enum::enum_name(sensor->getType()) << " profile: " << profile->getWidth() std::cout << magic_enum::enum_name(sensor->getType()) << " profile: " << profile->getWidth()
<< "x" << profile->getHeight() << " " << profile->getFps() << "fps " << "x" << profile->getHeight() << " " << profile->getFps() << "fps "
<< magic_enum::enum_name(profile->getFormat()) << magic_enum::enum_name(profile->getFormat())
<< " | Weight: " << profile->getDownSampleConfig().originWidth << " | Weight: " << profile->getDecimationConfig().originWidth
<< " Height: " << profile->getDownSampleConfig().originHeight << " Height: " << profile->getDecimationConfig().originHeight
<< " downscale:" << profile->getDownSampleConfig().decimationFactor << std::endl; << " downscale:" << profile->getDecimationConfig().factor << std::endl;
} else if (sensor->getType() == OB_SENSOR_COLOR || sensor->getType() == OB_SENSOR_DEPTH || } else if (sensor->getType() == OB_SENSOR_COLOR || sensor->getType() == OB_SENSOR_DEPTH ||
sensor->getType() == OB_SENSOR_IR || sensor->getType() == OB_SENSOR_IR_LEFT || sensor->getType() == OB_SENSOR_IR || sensor->getType() == OB_SENSOR_IR_LEFT ||
sensor->getType() == OB_SENSOR_IR_RIGHT) { sensor->getType() == OB_SENSOR_IR_RIGHT) {