From 9948eb64d1d0a96c175114cfb2069cd301df740d Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 17 Mar 2024 16:11:22 +0200 Subject: chore(users/flokli/ipu6-softisp): refresh libcamera patches Refresh them with the patches from https://patchwork.libcamera.org/cover/19663/. This is still based off v0.2.0. Change-Id: I875fd64e3bb71a95c92af1108a23d27c0f3494e0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11179 Tested-by: BuildkiteCI Reviewed-by: flokli Autosubmit: flokli --- .../ipu6-softisp/libcamera/0024-ov01a1s-HACK.patch | 95 ---------------------- 1 file changed, 95 deletions(-) delete mode 100644 users/flokli/ipu6-softisp/libcamera/0024-ov01a1s-HACK.patch (limited to 'users/flokli/ipu6-softisp/libcamera/0024-ov01a1s-HACK.patch') diff --git a/users/flokli/ipu6-softisp/libcamera/0024-ov01a1s-HACK.patch b/users/flokli/ipu6-softisp/libcamera/0024-ov01a1s-HACK.patch deleted file mode 100644 index 3b558e06d0e9..000000000000 --- a/users/flokli/ipu6-softisp/libcamera/0024-ov01a1s-HACK.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 9bec33e5c7e6765734eeef2d22d7f7f65dee2264 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Tue, 19 Dec 2023 15:45:51 +0100 -Subject: [PATCH 24/25] ov01a1s HACK - -Signed-off-by: Hans de Goede ---- - src/libcamera/camera_sensor.cpp | 6 ++++++ - src/libcamera/software_isp/debayer_cpu.cpp | 8 ++++++++ - src/libcamera/software_isp/swstats_cpu.cpp | 5 +++++ - 3 files changed, 19 insertions(+) - -diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp -index f19f72ea..7ad4b9ef 100644 ---- a/src/libcamera/camera_sensor.cpp -+++ b/src/libcamera/camera_sensor.cpp -@@ -34,6 +34,9 @@ - - namespace libcamera { - -+// HACK HACK -+bool is_ov01a1s = false; -+ - LOG_DEFINE_CATEGORY(CameraSensor) - - /** -@@ -426,6 +429,9 @@ int CameraSensor::initProperties() - model_ = subdev_->model(); - properties_.set(properties::Model, utils::toAscii(model_)); - -+ if (model_ == "ov01a1s") -+ is_ov01a1s = true; -+ - /* Generate a unique ID for the sensor. */ - int ret = generateId(); - if (ret) -diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp -index 41c8805f..b6393925 100644 ---- a/src/libcamera/software_isp/debayer_cpu.cpp -+++ b/src/libcamera/software_isp/debayer_cpu.cpp -@@ -23,6 +23,8 @@ - - namespace libcamera { - -+extern bool is_ov01a1s; -+ - DebayerCpu::DebayerCpu(std::unique_ptr stats) - : stats_(std::move(stats)), gamma_correction_(1.0) - { -@@ -471,6 +473,9 @@ int DebayerCpu::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf - BayerFormat bayerFormat = - BayerFormat::fromPixelFormat(inputFormat); - -+ if (is_ov01a1s) -+ bayerFormat.order = BayerFormat::IGIG_GBGR_IGIG_GRGB; -+ - if ((bayerFormat.bitDepth == 8 || bayerFormat.bitDepth == 10 || bayerFormat.bitDepth == 12) && - bayerFormat.packing == BayerFormat::Packing::None && - isStandardBayerOrder(bayerFormat.order)) { -@@ -548,6 +553,9 @@ int DebayerCpu::setDebayerFunctions(PixelFormat inputFormat, PixelFormat outputF - BayerFormat bayerFormat = - BayerFormat::fromPixelFormat(inputFormat); - -+ if (is_ov01a1s) -+ bayerFormat.order = BayerFormat::IGIG_GBGR_IGIG_GRGB; -+ - swapRedBlueGains_ = false; - - switch (outputFormat) { -diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp -index 96e21be5..503ce799 100644 ---- a/src/libcamera/software_isp/swstats_cpu.cpp -+++ b/src/libcamera/software_isp/swstats_cpu.cpp -@@ -19,6 +19,8 @@ - - namespace libcamera { - -+extern bool is_ov01a1s; -+ - SwStatsCpu::SwStatsCpu() - : SwStats() - { -@@ -301,6 +303,9 @@ int SwStatsCpu::configure(const StreamConfiguration &inputCfg) - BayerFormat bayerFormat = - BayerFormat::fromPixelFormat(inputCfg.pixelFormat); - -+ if (is_ov01a1s) -+ bayerFormat.order = BayerFormat::IGIG_GBGR_IGIG_GRGB; -+ - startFrame_ = (SwStats::statsVoidFn)&SwStatsCpu::resetStats; - finishFrame_ = (SwStats::statsVoidFn)&SwStatsCpu::finishStats; - --- -2.43.0 - -- cgit 1.4.1