From abae4ef72c462eef55c8a35f14365ed8b94c2bcc Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 14 Sep 2021 11:48:34 -0700 Subject: [PATCH] Revert "ui: use C3 video sizes by default on PC" This reverts commit cf4cd3b6935f7d0fcfc35ef0e9ea4ec0aae7155f. --- selfdrive/common/modeldata.h | 15 +++++++-------- selfdrive/ui/ui.h | 5 +++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/selfdrive/common/modeldata.h b/selfdrive/common/modeldata.h index 569514910f..e68bf1883a 100644 --- a/selfdrive/common/modeldata.h +++ b/selfdrive/common/modeldata.h @@ -26,13 +26,12 @@ const double X_IDXS[TRAJECTORY_SIZE] = { #include "selfdrive/common/mat.h" #include "selfdrive/hardware/hw.h" const mat3 fcam_intrinsic_matrix = - (Hardware::TICI() || Hardware::PC()) ? - (mat3){{2648.0, 0.0, 1928.0 / 2, - 0.0, 2648.0, 1208.0 / 2, - 0.0, 0.0, 1.0}} - : (mat3){{910., 0., 1164.0 / 2, - 0., 910., 874.0 / 2, - 0., 0., 1.}}; + Hardware::TICI() ? (mat3){{2648.0, 0.0, 1928.0 / 2, + 0.0, 2648.0, 1208.0 / 2, + 0.0, 0.0, 1.0}} + : (mat3){{910., 0., 1164.0 / 2, + 0., 910., 874.0 / 2, + 0., 0., 1.}}; // without unwarp, focal length is for center portion only const mat3 ecam_intrinsic_matrix = (mat3){{620.0, 0.0, 1928.0 / 2, @@ -40,7 +39,7 @@ const mat3 ecam_intrinsic_matrix = (mat3){{620.0, 0.0, 1928.0 / 2, 0.0, 0.0, 1.0}}; static inline mat3 get_model_yuv_transform(bool bayer = true) { - float db_s = (Hardware::TICI() || Hardware::PC()) ? 1.0 : 0.5; // debayering does a 2x downscale on EON + float db_s = Hardware::TICI() ? 1.0 : 0.5; // debayering does a 2x downscale on EON const mat3 transform = (mat3){{ 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index cb3175a6dd..62d407129c 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -28,9 +28,10 @@ typedef cereal::CarControl::HUDControl::AudibleAlert AudibleAlert; +// TODO: this is also hardcoded in common/transformations/camera.py // TODO: choose based on frame input size -const float y_offset = (Hardware::TICI() || Hardware::PC()) ? 150.0 : 0.0; -const float ZOOM = (Hardware::TICI() || Hardware::PC()) ? 2912.8 : 2138.5; +const float y_offset = Hardware::TICI() ? 150.0 : 0.0; +const float ZOOM = Hardware::TICI() ? 2912.8 : 2138.5; typedef struct Rect { int x, y, w, h;