From aa9eb76406ed081f7757d5822153261cafdb11e1 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Fri, 28 Nov 2025 20:42:02 +0100 Subject: [PATCH] temp/libcamera: upgrade to 0.6.0 See https://gitlab.freedesktop.org/camera/libcamera/-/releases/v0.6.0 Remove various upstreamed and move downstream tuning files into a folder instead of wrapping them in patches. Also sync up a bit to the alpine package by adding dependencies and the python package. Note: unfortunately this release does not contain the GPU-ISP. There are various improvements to the SW-ISP, the simple pipeline handler and other areas which should improve the experience on various devices with pmOS, though. Part-of: --- ...-Enable-softwareISP-for-the-librem5.patch} | 12 +-- ...re_isp-Clarify-SwStatsCpu-setWindow-.patch | 70 -------------- ...Force-disable-softwareISP-for-milli.patch} | 16 ++-- ...re_isp-Pass-correct-y-coordinate-to-.patch | 70 -------------- ...le-Enable-softISP-for-the-Pinephone.patch} | 10 +- ...re_isp-Check-processed-window-size-a.patch | 47 --------- ...le-Avoid-incorrect-arithmetic-in-AWB.patch | 43 --------- ...Skip-hwISP-formats-if-swISP-is-acti.patch} | 10 +- ...mple-Prevent-division-by-zero-in-BLC.patch | 33 ------- ...Consider-output-sizes-when-choosing-.patch | 35 ------- ...Increase-internal-buffer-count-to-fo.patch | 27 ------ ...pa-simple-Add-tuning-file-for-IMX355.patch | 50 ---------- ...pa-simple-Add-tuning-file-for-IMX363.patch | 47 --------- ...-simple-Add-tuning-file-for-s5k3l6xx.patch | 44 --------- ...ipa-simple-Add-tuning-file-for-hi846.patch | 44 --------- ...pa-simple-Add-tuning-file-for-IMX371.patch | 44 --------- ...pa-simple-Add-tuning-file-for-IMX376.patch | 44 --------- ...pa-simple-Add-tuning-file-for-IMX858.patch | 44 --------- ...pa-simple-Add-tuning-file-for-s5kjn1.patch | 44 --------- temp/libcamera/APKBUILD | 96 ++++++++++--------- temp/libcamera/hi846.yaml | 11 +++ temp/libcamera/imx355.yaml | 11 +++ temp/libcamera/imx363.yaml | 11 +++ temp/libcamera/imx371.yaml | 11 +++ temp/libcamera/imx376.yaml | 11 +++ temp/libcamera/imx858.yaml | 11 +++ temp/libcamera/s5k3l6xx.yaml | 11 +++ temp/libcamera/s5kjn1.yaml | 11 +++ 28 files changed, 165 insertions(+), 753 deletions(-) rename temp/libcamera/{0006-libcamera-simple-Enable-softwareISP-for-the-librem5.patch => 0001-libcamera-simple-Enable-softwareISP-for-the-librem5.patch} (72%) delete mode 100644 temp/libcamera/0001-libcamera-software_isp-Clarify-SwStatsCpu-setWindow-.patch rename temp/libcamera/{0007-libcamera-simple-Force-disable-softwareISP-for-milli.patch => 0002-libcamera-simple-Force-disable-softwareISP-for-milli.patch} (73%) delete mode 100644 temp/libcamera/0002-libcamera-software_isp-Pass-correct-y-coordinate-to-.patch rename temp/libcamera/{0008-libcamera-simple-Enable-softISP-for-the-Pinephone.patch => 0003-libcamera-simple-Enable-softISP-for-the-Pinephone.patch} (80%) delete mode 100644 temp/libcamera/0003-libcamera-software_isp-Check-processed-window-size-a.patch delete mode 100644 temp/libcamera/0004-libcamera-simple-Avoid-incorrect-arithmetic-in-AWB.patch rename temp/libcamera/{0009-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch => 0004-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch} (83%) delete mode 100644 temp/libcamera/0005-libcamera-simple-Prevent-division-by-zero-in-BLC.patch delete mode 100644 temp/libcamera/0010-pipeline-simple-Consider-output-sizes-when-choosing-.patch delete mode 100644 temp/libcamera/0011-pipeline-simple-Increase-internal-buffer-count-to-fo.patch delete mode 100644 temp/libcamera/0012-ipa-simple-Add-tuning-file-for-IMX355.patch delete mode 100644 temp/libcamera/0013-ipa-simple-Add-tuning-file-for-IMX363.patch delete mode 100644 temp/libcamera/0014-ipa-simple-Add-tuning-file-for-s5k3l6xx.patch delete mode 100644 temp/libcamera/0015-ipa-simple-Add-tuning-file-for-hi846.patch delete mode 100644 temp/libcamera/0016-ipa-simple-Add-tuning-file-for-IMX371.patch delete mode 100644 temp/libcamera/0017-ipa-simple-Add-tuning-file-for-IMX376.patch delete mode 100644 temp/libcamera/0018-ipa-simple-Add-tuning-file-for-IMX858.patch delete mode 100644 temp/libcamera/0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch create mode 100644 temp/libcamera/hi846.yaml create mode 100644 temp/libcamera/imx355.yaml create mode 100644 temp/libcamera/imx363.yaml create mode 100644 temp/libcamera/imx371.yaml create mode 100644 temp/libcamera/imx376.yaml create mode 100644 temp/libcamera/imx858.yaml create mode 100644 temp/libcamera/s5k3l6xx.yaml create mode 100644 temp/libcamera/s5kjn1.yaml diff --git a/temp/libcamera/0006-libcamera-simple-Enable-softwareISP-for-the-librem5.patch b/temp/libcamera/0001-libcamera-simple-Enable-softwareISP-for-the-librem5.patch similarity index 72% rename from temp/libcamera/0006-libcamera-simple-Enable-softwareISP-for-the-librem5.patch rename to temp/libcamera/0001-libcamera-simple-Enable-softwareISP-for-the-librem5.patch index 6bbce2854..7d3d9e12f 100644 --- a/temp/libcamera/0006-libcamera-simple-Enable-softwareISP-for-the-librem5.patch +++ b/temp/libcamera/0001-libcamera-simple-Enable-softwareISP-for-the-librem5.patch @@ -1,7 +1,7 @@ -From ced95de9a798243f0152a5e2d8743d8cdc58d65d Mon Sep 17 00:00:00 2001 +From 0667741f5e4769a9918cc94f5d2a699d7bdaf9b3 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 22 Apr 2024 23:30:31 +0200 -Subject: [PATCH 06/17] libcamera: simple: Enable softwareISP for the librem5 +Subject: [PATCH 01/12] libcamera: simple: Enable softwareISP for the librem5 And - in theory - on similar devices. --- @@ -9,18 +9,18 @@ And - in theory - on similar devices. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp -index 4323472e1..74e0683f4 100644 +index a06a52926..a62fa7b8c 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp -@@ -250,7 +250,7 @@ namespace { +@@ -254,7 +254,7 @@ namespace { static const SimplePipelineInfo supportedDevices[] = { { "dcmipp", {}, false }, - { "imx7-csi", { { "pxp", 1 } }, false }, + { "imx7-csi", { { "pxp", 1 } }, true }, { "intel-ipu6", {}, true }, + { "intel-ipu7", {}, true }, { "j721e-csi2rx", {}, true }, - { "mtk-seninf", { { "mtk-mdp", 3 } }, false }, -- -2.50.1 +2.52.0 diff --git a/temp/libcamera/0001-libcamera-software_isp-Clarify-SwStatsCpu-setWindow-.patch b/temp/libcamera/0001-libcamera-software_isp-Clarify-SwStatsCpu-setWindow-.patch deleted file mode 100644 index ba0488784..000000000 --- a/temp/libcamera/0001-libcamera-software_isp-Clarify-SwStatsCpu-setWindow-.patch +++ /dev/null @@ -1,70 +0,0 @@ -From b5a01e2c62347f6815569cb16ce9ccbb85d6cb19 Mon Sep 17 00:00:00 2001 -From: Milan Zamazal -Date: Thu, 21 Aug 2025 15:41:37 +0200 -Subject: [PATCH 01/17] libcamera: software_isp: Clarify SwStatsCpu::setWindow - use - -The window coordinates passed to SwStatsCpu::setWindow are confusing. -Let's clarify what the coordinates should be. - -A source of confusion is that the specified window is relative to the -processed area. Debayering adjusts line pointers for its processed area -and this is what's also passed to stats processing. The window passed -to SwStatsCpu::setWindow should either specify the size of the whole -processed (not image) area, or its cropping in case the stats shouldn't -be gathered over the whole processed area. This patch should clarify -this in the code. - -Signed-off-by: Milan Zamazal ---- - src/libcamera/software_isp/debayer_cpu.cpp | 6 +++++- - src/libcamera/software_isp/swstats_cpu.cpp | 16 ++++++++++++++++ - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp -index 66f6038c1..bcc847ae6 100644 ---- a/src/libcamera/software_isp/debayer_cpu.cpp -+++ b/src/libcamera/software_isp/debayer_cpu.cpp -@@ -541,7 +541,11 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg, - window_.width = outputCfg.size.width; - window_.height = outputCfg.size.height; - -- /* Don't pass x,y since process() already adjusts src before passing it */ -+ /* -+ * Set the stats window to the whole processed window. Its coordinates are -+ * relative to the debayered area since debayering passes only the part of -+ * data to be processed to the stats; see SwStatsCpu::setWindow. -+ */ - stats_->setWindow(Rectangle(window_.size())); - - /* pad with patternSize.Width on both left and right side */ -diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp -index 4b77b3600..72aa88b69 100644 ---- a/src/libcamera/software_isp/swstats_cpu.cpp -+++ b/src/libcamera/software_isp/swstats_cpu.cpp -@@ -416,6 +416,22 @@ int SwStatsCpu::configure(const StreamConfiguration &inputCfg) - /** - * \brief Specify window coordinates over which to gather statistics - * \param[in] window The window object. -+ * -+ * This method specifies the image area over which to gather the statistics. -+ * It must be called to set the area, otherwise the default zero-sized -+ * \a Rectangle is used and no statistics is gathered. -+ * -+ * The specified \a window is relative to what is passed to processLine* -+ * methods. Typically, this means processLine* methods get only data from the -+ * processed area and \a window is \a Rectangle with (0, 0) top-left point and -+ * of the same size as the processed area. But if statistics is gathered only -+ * from some part of the image, e.g. its centre, \a window should specify such a -+ * restriction accordingly. -+ * -+ * The method may adjust the window slightly if it is not aligned according to -+ * the bayer pattern determined in \a SwStatsCpu::configure(). Such an -+ * adjustment is guaranteed to not exceed the bounds of -+ * Rectangle(0, 0, window.width, window.height). - */ - void SwStatsCpu::setWindow(const Rectangle &window) - { --- -2.50.1 - diff --git a/temp/libcamera/0007-libcamera-simple-Force-disable-softwareISP-for-milli.patch b/temp/libcamera/0002-libcamera-simple-Force-disable-softwareISP-for-milli.patch similarity index 73% rename from temp/libcamera/0007-libcamera-simple-Force-disable-softwareISP-for-milli.patch rename to temp/libcamera/0002-libcamera-simple-Force-disable-softwareISP-for-milli.patch index 0a707ceb0..a37f19099 100644 --- a/temp/libcamera/0007-libcamera-simple-Force-disable-softwareISP-for-milli.patch +++ b/temp/libcamera/0002-libcamera-simple-Force-disable-softwareISP-for-milli.patch @@ -1,7 +1,7 @@ -From cb0c4005f0303798c700352e00c9389e3e2f463b Mon Sep 17 00:00:00 2001 +From 125ab037a4395c1e9fffb0bd68fb2c3eeae95078 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 9 May 2024 21:07:07 +0200 -Subject: [PATCH 07/17] libcamera: simple: Force-disable softwareISP for +Subject: [PATCH 02/12] libcamera: simple: Force-disable softwareISP for millipixels As the later uses libcamera and requires raw-streams to get passed @@ -12,7 +12,7 @@ swIsp - at the same time. 1 file changed, 9 insertions(+) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp -index 74e0683f4..eb405e52c 100644 +index a62fa7b8c..a0aad052f 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -7,6 +7,7 @@ @@ -23,9 +23,9 @@ index 74e0683f4..eb405e52c 100644 #include #include #include -@@ -1680,6 +1681,14 @@ bool SimplePipelineHandler::matchDevice(MediaDevice *media, - - swIspEnabled_ = info.swIspEnabled; +@@ -1773,6 +1774,14 @@ bool SimplePipelineHandler::matchDevice(std::shared_ptr media, + } + } + std::string comm_string; + std::ifstream("/proc/self/comm") >> comm_string; @@ -36,8 +36,8 @@ index 74e0683f4..eb405e52c 100644 + } + /* Locate the sensors. */ - std::vector sensors = locateSensors(media); + std::vector sensors = locateSensors(media.get()); if (sensors.empty()) { -- -2.50.1 +2.52.0 diff --git a/temp/libcamera/0002-libcamera-software_isp-Pass-correct-y-coordinate-to-.patch b/temp/libcamera/0002-libcamera-software_isp-Pass-correct-y-coordinate-to-.patch deleted file mode 100644 index 51983eeeb..000000000 --- a/temp/libcamera/0002-libcamera-software_isp-Pass-correct-y-coordinate-to-.patch +++ /dev/null @@ -1,70 +0,0 @@ -From d3aaab99a267c160cd67cc853b61a7d5d972ad0f Mon Sep 17 00:00:00 2001 -From: Milan Zamazal -Date: Thu, 21 Aug 2025 15:41:38 +0200 -Subject: [PATCH 02/17] libcamera: software_isp: Pass correct y-coordinate to - stats - -The window set by SwStatsCpu::setWindow is relative to the processed -image area. But debayering passes the processed line y-coordinate to -the stats relative to the whole image area. This can result in -gathering stats from a wrong image area or in not gathering stats at -all. - -Let's pass the correct y-coordinate to the stats processing methods. - -Bug: https://bugs.libcamera.org/show_bug.cgi?id=280 -Co-developed-by: Maciej S. Szmigiero -Signed-off-by: Milan Zamazal ---- - src/libcamera/software_isp/debayer_cpu.cpp | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp -index bcc847ae6..185edd814 100644 ---- a/src/libcamera/software_isp/debayer_cpu.cpp -+++ b/src/libcamera/software_isp/debayer_cpu.cpp -@@ -648,7 +648,7 @@ void DebayerCpu::memcpyNextLine(const uint8_t *linePointers[]) - - void DebayerCpu::process2(const uint8_t *src, uint8_t *dst) - { -- unsigned int yEnd = window_.y + window_.height; -+ unsigned int yEnd = window_.height; - /* Holds [0] previous- [1] current- [2] next-line */ - const uint8_t *linePointers[3]; - -@@ -664,12 +664,12 @@ void DebayerCpu::process2(const uint8_t *src, uint8_t *dst) - linePointers[1] = src + inputConfig_.stride; - linePointers[2] = src; - /* Last 2 lines also need special handling */ -- yEnd -= 2; -+ yEnd = (yEnd > 2 ? yEnd - 2 : 0); - } - - setupInputMemcpy(linePointers); - -- for (unsigned int y = window_.y; y < yEnd; y += 2) { -+ for (unsigned int y = 0; y < yEnd; y += 2) { - shiftLinePointers(linePointers, src); - memcpyNextLine(linePointers); - stats_->processLine0(y, linePointers); -@@ -703,7 +703,7 @@ void DebayerCpu::process2(const uint8_t *src, uint8_t *dst) - - void DebayerCpu::process4(const uint8_t *src, uint8_t *dst) - { -- const unsigned int yEnd = window_.y + window_.height; -+ const unsigned int yEnd = window_.height; - /* - * This holds pointers to [0] 2-lines-up [1] 1-line-up [2] current-line - * [3] 1-line-down [4] 2-lines-down. -@@ -721,7 +721,7 @@ void DebayerCpu::process4(const uint8_t *src, uint8_t *dst) - - setupInputMemcpy(linePointers); - -- for (unsigned int y = window_.y; y < yEnd; y += 4) { -+ for (unsigned int y = 0; y < yEnd; y += 4) { - shiftLinePointers(linePointers, src); - memcpyNextLine(linePointers); - stats_->processLine0(y, linePointers); --- -2.50.1 - diff --git a/temp/libcamera/0008-libcamera-simple-Enable-softISP-for-the-Pinephone.patch b/temp/libcamera/0003-libcamera-simple-Enable-softISP-for-the-Pinephone.patch similarity index 80% rename from temp/libcamera/0008-libcamera-simple-Enable-softISP-for-the-Pinephone.patch rename to temp/libcamera/0003-libcamera-simple-Enable-softISP-for-the-Pinephone.patch index d4b8120de..84f7b9d59 100644 --- a/temp/libcamera/0008-libcamera-simple-Enable-softISP-for-the-Pinephone.patch +++ b/temp/libcamera/0003-libcamera-simple-Enable-softISP-for-the-Pinephone.patch @@ -1,7 +1,7 @@ -From a03f8f4e44e5b6d794022f8de8f54f2f68692d64 Mon Sep 17 00:00:00 2001 +From 8e43d2a54de04dff85816fdcc1723b6abcd2fef8 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Wed, 1 May 2024 18:12:02 +0200 -Subject: [PATCH 08/17] libcamera: simple: Enable softISP for the Pinephone +Subject: [PATCH 03/12] libcamera: simple: Enable softISP for the Pinephone In theory the PP should be able to use the actual HW ISP, however in practice this does not work well yet - especially as the driver for the @@ -15,10 +15,10 @@ improves, this can be dropped again. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp -index eb405e52c..f4b49b1ab 100644 +index a0aad052f..cc3bdc84b 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp -@@ -257,7 +257,7 @@ static const SimplePipelineInfo supportedDevices[] = { +@@ -262,7 +262,7 @@ static const SimplePipelineInfo supportedDevices[] = { { "mtk-seninf", { { "mtk-mdp", 3 } }, false }, { "mxc-isi", {}, false }, { "qcom-camss", {}, true }, @@ -28,5 +28,5 @@ index eb405e52c..f4b49b1ab 100644 } /* namespace */ -- -2.50.1 +2.52.0 diff --git a/temp/libcamera/0003-libcamera-software_isp-Check-processed-window-size-a.patch b/temp/libcamera/0003-libcamera-software_isp-Check-processed-window-size-a.patch deleted file mode 100644 index 6a8920ca5..000000000 --- a/temp/libcamera/0003-libcamera-software_isp-Check-processed-window-size-a.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 2611679a0a425bad4f071fb70c513f73be5132df Mon Sep 17 00:00:00 2001 -From: Milan Zamazal -Date: Thu, 21 Aug 2025 15:41:39 +0200 -Subject: [PATCH 03/17] libcamera: software_isp: Check processed window size - alignment - -The window of the image that should be debayered must be aligned to the -bayer pattern size. This is already ensured for the window corner -coordinates but not for the window sizes. - -We can either make the window sizes aligned similarly to how the window -corner coordinates are aligned or reject an unaligned configuration. -This patches chooses the latter as using a different window size than -the requested output size could lead to artefacts. Since such a -situation is not expected to occur in correctly set up environments, the -change should have no negative impact. - -Signed-off-by: Milan Zamazal ---- - src/libcamera/software_isp/debayer_cpu.cpp | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp -index 185edd814..3200b0c53 100644 ---- a/src/libcamera/software_isp/debayer_cpu.cpp -+++ b/src/libcamera/software_isp/debayer_cpu.cpp -@@ -539,7 +539,17 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg, - window_.y = ((inputCfg.size.height - outputCfg.size.height) / 2) & - ~(inputConfig_.patternSize.height - 1); - window_.width = outputCfg.size.width; -+ if (window_.width % inputConfig_.patternSize.width != 0) { -+ LOG(Debayer, Error) -+ << "Output width is not a multiple of the bayer pattern width"; -+ return -EINVAL; -+ } - window_.height = outputCfg.size.height; -+ if (window_.height % inputConfig_.patternSize.height != 0) { -+ LOG(Debayer, Error) -+ << "Output height is not a multiple of the bayer pattern height"; -+ return -EINVAL; -+ } - - /* - * Set the stats window to the whole processed window. Its coordinates are --- -2.50.1 - diff --git a/temp/libcamera/0004-libcamera-simple-Avoid-incorrect-arithmetic-in-AWB.patch b/temp/libcamera/0004-libcamera-simple-Avoid-incorrect-arithmetic-in-AWB.patch deleted file mode 100644 index e58fe496b..000000000 --- a/temp/libcamera/0004-libcamera-simple-Avoid-incorrect-arithmetic-in-AWB.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 242ae30056eb3d4964b518cb902d2dfef6c69de5 Mon Sep 17 00:00:00 2001 -From: Milan Zamazal -Date: Thu, 21 Aug 2025 15:41:40 +0200 -Subject: [PATCH 04/17] libcamera: simple: Avoid incorrect arithmetic in AWB - -The R/G/B sums computed in AWB simple IPA may be zero or perhaps even -negative. Let's make sure the sums are always positive, to prevent -division by zero or completely nonsense results. - -Signed-off-by: Milan Zamazal ---- - src/ipa/simple/algorithms/awb.cpp | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp -index cf567e894..9509129e9 100644 ---- a/src/ipa/simple/algorithms/awb.cpp -+++ b/src/ipa/simple/algorithms/awb.cpp -@@ -7,6 +7,7 @@ - - #include "awb.h" - -+#include - #include - #include - -@@ -69,9 +70,10 @@ void Awb::process(IPAContext &context, - const uint64_t nPixels = std::accumulate( - histogram.begin(), histogram.end(), 0); - const uint64_t offset = blackLevel * nPixels; -- const uint64_t sumR = stats->sumR_ - offset / 4; -- const uint64_t sumG = stats->sumG_ - offset / 2; -- const uint64_t sumB = stats->sumB_ - offset / 4; -+ const uint64_t minValid = 1; -+ const uint64_t sumR = std::max(stats->sumR_ - offset / 4, minValid); -+ const uint64_t sumG = std::max(stats->sumG_ - offset / 2, minValid); -+ const uint64_t sumB = std::max(stats->sumB_ - offset / 4, minValid); - - /* - * Calculate red and blue gains for AWB. --- -2.50.1 - diff --git a/temp/libcamera/0009-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch b/temp/libcamera/0004-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch similarity index 83% rename from temp/libcamera/0009-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch rename to temp/libcamera/0004-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch index 085dcf252..3fbdda85b 100644 --- a/temp/libcamera/0009-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch +++ b/temp/libcamera/0004-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch @@ -1,7 +1,7 @@ -From 39a3d481aabb6f92f4b3b846064d8bc6f049f36d Mon Sep 17 00:00:00 2001 +From 5e94fb4563b44ba1fd9c4d3109ddc5a0f35cfa2c Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 6 May 2024 21:21:57 +0200 -Subject: [PATCH 09/17] libcamera: simple: Skip hwISP formats if swISP is +Subject: [PATCH 04/12] libcamera: simple: Skip hwISP formats if swISP is active On devices like the Pinephone libcamera will advertise support for @@ -14,10 +14,10 @@ ISP when the SW ISP is enabled, to ensure we use the later. 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp -index f4b49b1ab..c19ce17d4 100644 +index cc3bdc84b..f44c2aa8e 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp -@@ -721,9 +721,7 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size) +@@ -736,9 +736,7 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size) config.outputFormats = swIsp_->formats(pixelFormat); config.outputSizes = swIsp_->sizes(pixelFormat, format.size); if (config.outputFormats.empty()) { @@ -29,5 +29,5 @@ index f4b49b1ab..c19ce17d4 100644 } else { config.outputFormats = { pixelFormat }; -- -2.50.1 +2.52.0 diff --git a/temp/libcamera/0005-libcamera-simple-Prevent-division-by-zero-in-BLC.patch b/temp/libcamera/0005-libcamera-simple-Prevent-division-by-zero-in-BLC.patch deleted file mode 100644 index f60f9e918..000000000 --- a/temp/libcamera/0005-libcamera-simple-Prevent-division-by-zero-in-BLC.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ef0b475f471e114044a7fbacf13bb16b5d362def Mon Sep 17 00:00:00 2001 -From: Milan Zamazal -Date: Thu, 21 Aug 2025 15:41:41 +0200 -Subject: [PATCH 05/17] libcamera: simple: Prevent division by zero in BLC - -When there are no values in the histogram, BLC simple IPA can crash on -division by zero. We cannot get anything meaningful in such a case -anyway, let's simply return from `process()' then. - -Signed-off-by: Milan Zamazal ---- - src/ipa/simple/algorithms/blc.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/ipa/simple/algorithms/blc.cpp b/src/ipa/simple/algorithms/blc.cpp -index 8c1e9ed08..71731c6f6 100644 ---- a/src/ipa/simple/algorithms/blc.cpp -+++ b/src/ipa/simple/algorithms/blc.cpp -@@ -77,6 +77,11 @@ void BlackLevel::process(IPAContext &context, - constexpr float ignoredPercentage = 0.02; - const unsigned int total = - std::accumulate(begin(histogram), end(histogram), 0); -+ if (total == 0) { -+ LOG(IPASoftBL, Debug) << "Not guessing black level, histogram is empty"; -+ return; -+ }; -+ - const unsigned int pixelThreshold = ignoredPercentage * total; - const unsigned int histogramRatio = 256 / SwIspStats::kYHistogramSize; - const unsigned int currentBlackIdx = --- -2.50.1 - diff --git a/temp/libcamera/0010-pipeline-simple-Consider-output-sizes-when-choosing-.patch b/temp/libcamera/0010-pipeline-simple-Consider-output-sizes-when-choosing-.patch deleted file mode 100644 index 68ae239ac..000000000 --- a/temp/libcamera/0010-pipeline-simple-Consider-output-sizes-when-choosing-.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9303db28aedd7e7ffe7af1627418c1ff070f2499 Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Fri, 11 Oct 2024 20:13:24 +0200 -Subject: [PATCH 10/17] pipeline: simple: Consider output sizes when choosing - pipe config - -In order to avoid having to adjust the size further down below which -again can break user assumptions. Notably, without this the capture size -of 1920x1080 gets adjusted to 1912x1080 when used with the swISP using a -bayer pattern width of 4, breaking users like Gstreamer down the line. - -Closes https://bugs.libcamera.org/show_bug.cgi?id=236 - -Signed-off-by: Robert Mader ---- - src/libcamera/pipeline/simple/simple.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp -index c19ce17d4..09310dc02 100644 ---- a/src/libcamera/pipeline/simple/simple.cpp -+++ b/src/libcamera/pipeline/simple/simple.cpp -@@ -1159,7 +1159,8 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate() - const Size &size = pipeConfig->captureSize; - - if (size.width >= maxStreamSize.width && -- size.height >= maxStreamSize.height) { -+ size.height >= maxStreamSize.height && -+ pipeConfig->outputSizes.contains(maxStreamSize)) { - if (!pipeConfig_ || size < pipeConfig_->captureSize) - pipeConfig_ = pipeConfig; - } --- -2.50.1 - diff --git a/temp/libcamera/0011-pipeline-simple-Increase-internal-buffer-count-to-fo.patch b/temp/libcamera/0011-pipeline-simple-Increase-internal-buffer-count-to-fo.patch deleted file mode 100644 index 6b6dbe227..000000000 --- a/temp/libcamera/0011-pipeline-simple-Increase-internal-buffer-count-to-fo.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 9b0f6c6d8c4bc3e4fed87c54daadaaf79c621341 Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Sun, 13 Oct 2024 14:13:44 +0200 -Subject: [PATCH 11/17] pipeline: simple: Increase internal buffer count to - four aswell - -Signed-off-by: Robert Mader ---- - src/libcamera/pipeline/simple/simple.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp -index 09310dc02..58e70993f 100644 ---- a/src/libcamera/pipeline/simple/simple.cpp -+++ b/src/libcamera/pipeline/simple/simple.cpp -@@ -415,7 +415,7 @@ protected: - int queueRequestDevice(Camera *camera, Request *request) override; - - private: -- static constexpr unsigned int kNumInternalBuffers = 3; -+ static constexpr unsigned int kNumInternalBuffers = 4; - - struct EntityData { - std::unique_ptr video; --- -2.50.1 - diff --git a/temp/libcamera/0012-ipa-simple-Add-tuning-file-for-IMX355.patch b/temp/libcamera/0012-ipa-simple-Add-tuning-file-for-IMX355.patch deleted file mode 100644 index f930bf483..000000000 --- a/temp/libcamera/0012-ipa-simple-Add-tuning-file-for-IMX355.patch +++ /dev/null @@ -1,50 +0,0 @@ -From bf9c2c76e8f390f35d0a0e0380cb2fae03abe806 Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Sat, 19 Oct 2024 00:25:03 +0200 -Subject: [PATCH 12/17] ipa/simple: Add tuning file for IMX355 - -64 at 10 bits. The value was guessed from known values for similar -sensors and testing - on a Google Pixel 3a - suggest it's correct. - -Adding this tuning file is partly motivated in order to serve as -example, as it's the first one for the simple IPA. - -Signed-off-by: Robert Mader ---- - src/ipa/simple/data/imx355.yaml | 11 +++++++++++ - src/ipa/simple/data/meson.build | 1 + - 2 files changed, 12 insertions(+) - create mode 100644 src/ipa/simple/data/imx355.yaml - -diff --git a/src/ipa/simple/data/imx355.yaml b/src/ipa/simple/data/imx355.yaml -new file mode 100644 -index 000000000..f7d01b738 ---- /dev/null -+++ b/src/ipa/simple/data/imx355.yaml -@@ -0,0 +1,11 @@ -+# SPDX-License-Identifier: CC0-1.0 -+%YAML 1.1 -+--- -+version: 1 -+algorithms: -+ - BlackLevel: -+ blackLevel: 4096 -+ - Awb: -+ - Lut: -+ - Agc: -+... -diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build -index 92795ee4c..6e690f82d 100644 ---- a/src/ipa/simple/data/meson.build -+++ b/src/ipa/simple/data/meson.build -@@ -1,6 +1,7 @@ - # SPDX-License-Identifier: CC0-1.0 - - conf_files = files([ -+ 'imx355.yaml', - 'uncalibrated.yaml', - ]) - --- -2.50.1 - diff --git a/temp/libcamera/0013-ipa-simple-Add-tuning-file-for-IMX363.patch b/temp/libcamera/0013-ipa-simple-Add-tuning-file-for-IMX363.patch deleted file mode 100644 index 1094eba43..000000000 --- a/temp/libcamera/0013-ipa-simple-Add-tuning-file-for-IMX363.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 9e21554b1374b057e84b3afa76b55855b01671f4 Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Sat, 19 Oct 2024 17:06:12 +0200 -Subject: [PATCH 13/17] ipa/simple: Add tuning file for IMX363 - -64 at 10 bits. The value was guessed from known values for similar -sensors and testing - on a Google Pixel 3a - suggest it's correct. - -Signed-off-by: Robert Mader ---- - src/ipa/simple/data/imx363.yaml | 11 +++++++++++ - src/ipa/simple/data/meson.build | 1 + - 2 files changed, 12 insertions(+) - create mode 100644 src/ipa/simple/data/imx363.yaml - -diff --git a/src/ipa/simple/data/imx363.yaml b/src/ipa/simple/data/imx363.yaml -new file mode 100644 -index 000000000..f7d01b738 ---- /dev/null -+++ b/src/ipa/simple/data/imx363.yaml -@@ -0,0 +1,11 @@ -+# SPDX-License-Identifier: CC0-1.0 -+%YAML 1.1 -+--- -+version: 1 -+algorithms: -+ - BlackLevel: -+ blackLevel: 4096 -+ - Awb: -+ - Lut: -+ - Agc: -+... -diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build -index 6e690f82d..7d07d5670 100644 ---- a/src/ipa/simple/data/meson.build -+++ b/src/ipa/simple/data/meson.build -@@ -2,6 +2,7 @@ - - conf_files = files([ - 'imx355.yaml', -+ 'imx363.yaml', - 'uncalibrated.yaml', - ]) - --- -2.50.1 - diff --git a/temp/libcamera/0014-ipa-simple-Add-tuning-file-for-s5k3l6xx.patch b/temp/libcamera/0014-ipa-simple-Add-tuning-file-for-s5k3l6xx.patch deleted file mode 100644 index 6f9c61925..000000000 --- a/temp/libcamera/0014-ipa-simple-Add-tuning-file-for-s5k3l6xx.patch +++ /dev/null @@ -1,44 +0,0 @@ -From e9694f7ed531d3a7394d42b9f4b0d00bf46e87be Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Sun, 24 Nov 2024 18:20:37 +0100 -Subject: [PATCH 14/17] ipa/simple: Add tuning file for s5k3l6xx - -Used by the Librem5 ---- - src/ipa/simple/data/meson.build | 1 + - src/ipa/simple/data/s5k3l6xx.yaml | 11 +++++++++++ - 2 files changed, 12 insertions(+) - create mode 100644 src/ipa/simple/data/s5k3l6xx.yaml - -diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build -index 7d07d5670..a763edc4f 100644 ---- a/src/ipa/simple/data/meson.build -+++ b/src/ipa/simple/data/meson.build -@@ -3,6 +3,7 @@ - conf_files = files([ - 'imx355.yaml', - 'imx363.yaml', -+ 's5k3l6xx.yaml', - 'uncalibrated.yaml', - ]) - -diff --git a/src/ipa/simple/data/s5k3l6xx.yaml b/src/ipa/simple/data/s5k3l6xx.yaml -new file mode 100644 -index 000000000..f7d01b738 ---- /dev/null -+++ b/src/ipa/simple/data/s5k3l6xx.yaml -@@ -0,0 +1,11 @@ -+# SPDX-License-Identifier: CC0-1.0 -+%YAML 1.1 -+--- -+version: 1 -+algorithms: -+ - BlackLevel: -+ blackLevel: 4096 -+ - Awb: -+ - Lut: -+ - Agc: -+... --- -2.50.1 - diff --git a/temp/libcamera/0015-ipa-simple-Add-tuning-file-for-hi846.patch b/temp/libcamera/0015-ipa-simple-Add-tuning-file-for-hi846.patch deleted file mode 100644 index 6a49baf0b..000000000 --- a/temp/libcamera/0015-ipa-simple-Add-tuning-file-for-hi846.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 175bb5ee1932242967e439955b0dad942228158d Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Sun, 24 Nov 2024 18:21:52 +0100 -Subject: [PATCH 15/17] ipa/simple: Add tuning file for hi846 - -Used by the Librem5 ---- - src/ipa/simple/data/hi846.yaml | 11 +++++++++++ - src/ipa/simple/data/meson.build | 1 + - 2 files changed, 12 insertions(+) - create mode 100644 src/ipa/simple/data/hi846.yaml - -diff --git a/src/ipa/simple/data/hi846.yaml b/src/ipa/simple/data/hi846.yaml -new file mode 100644 -index 000000000..f7d01b738 ---- /dev/null -+++ b/src/ipa/simple/data/hi846.yaml -@@ -0,0 +1,11 @@ -+# SPDX-License-Identifier: CC0-1.0 -+%YAML 1.1 -+--- -+version: 1 -+algorithms: -+ - BlackLevel: -+ blackLevel: 4096 -+ - Awb: -+ - Lut: -+ - Agc: -+... -diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build -index a763edc4f..cae83a3d5 100644 ---- a/src/ipa/simple/data/meson.build -+++ b/src/ipa/simple/data/meson.build -@@ -1,6 +1,7 @@ - # SPDX-License-Identifier: CC0-1.0 - - conf_files = files([ -+ 'hi846.yaml', - 'imx355.yaml', - 'imx363.yaml', - 's5k3l6xx.yaml', --- -2.50.1 - diff --git a/temp/libcamera/0016-ipa-simple-Add-tuning-file-for-IMX371.patch b/temp/libcamera/0016-ipa-simple-Add-tuning-file-for-IMX371.patch deleted file mode 100644 index 83ad21d3b..000000000 --- a/temp/libcamera/0016-ipa-simple-Add-tuning-file-for-IMX371.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 5d00a3b8aa891c0c0ca114c8ec1c0070d054055c Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Sat, 8 Mar 2025 10:38:06 +0100 -Subject: [PATCH 16/17] ipa/simple: Add tuning file for IMX371 - -The value is guessed from similar IMX sensors. ---- - src/ipa/simple/data/imx371.yaml | 11 +++++++++++ - src/ipa/simple/data/meson.build | 1 + - 2 files changed, 12 insertions(+) - create mode 100644 src/ipa/simple/data/imx371.yaml - -diff --git a/src/ipa/simple/data/imx371.yaml b/src/ipa/simple/data/imx371.yaml -new file mode 100644 -index 000000000..f7d01b738 ---- /dev/null -+++ b/src/ipa/simple/data/imx371.yaml -@@ -0,0 +1,11 @@ -+# SPDX-License-Identifier: CC0-1.0 -+%YAML 1.1 -+--- -+version: 1 -+algorithms: -+ - BlackLevel: -+ blackLevel: 4096 -+ - Awb: -+ - Lut: -+ - Agc: -+... -diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build -index cae83a3d5..19f90c976 100644 ---- a/src/ipa/simple/data/meson.build -+++ b/src/ipa/simple/data/meson.build -@@ -4,6 +4,7 @@ conf_files = files([ - 'hi846.yaml', - 'imx355.yaml', - 'imx363.yaml', -+ 'imx371.yaml', - 's5k3l6xx.yaml', - 'uncalibrated.yaml', - ]) --- -2.50.1 - diff --git a/temp/libcamera/0017-ipa-simple-Add-tuning-file-for-IMX376.patch b/temp/libcamera/0017-ipa-simple-Add-tuning-file-for-IMX376.patch deleted file mode 100644 index da24ba442..000000000 --- a/temp/libcamera/0017-ipa-simple-Add-tuning-file-for-IMX376.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2f0d4f7929afb239d2b74ce7cfee447a70101f36 Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Sat, 8 Mar 2025 10:39:44 +0100 -Subject: [PATCH 17/17] ipa/simple: Add tuning file for IMX376 - -The value is guessed from similar IMX sensors. ---- - src/ipa/simple/data/imx376.yaml | 11 +++++++++++ - src/ipa/simple/data/meson.build | 1 + - 2 files changed, 12 insertions(+) - create mode 100644 src/ipa/simple/data/imx376.yaml - -diff --git a/src/ipa/simple/data/imx376.yaml b/src/ipa/simple/data/imx376.yaml -new file mode 100644 -index 000000000..f7d01b738 ---- /dev/null -+++ b/src/ipa/simple/data/imx376.yaml -@@ -0,0 +1,11 @@ -+# SPDX-License-Identifier: CC0-1.0 -+%YAML 1.1 -+--- -+version: 1 -+algorithms: -+ - BlackLevel: -+ blackLevel: 4096 -+ - Awb: -+ - Lut: -+ - Agc: -+... -diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build -index 19f90c976..e0c8e443a 100644 ---- a/src/ipa/simple/data/meson.build -+++ b/src/ipa/simple/data/meson.build -@@ -5,6 +5,7 @@ conf_files = files([ - 'imx355.yaml', - 'imx363.yaml', - 'imx371.yaml', -+ 'imx376.yaml', - 's5k3l6xx.yaml', - 'uncalibrated.yaml', - ]) --- -2.50.1 - diff --git a/temp/libcamera/0018-ipa-simple-Add-tuning-file-for-IMX858.patch b/temp/libcamera/0018-ipa-simple-Add-tuning-file-for-IMX858.patch deleted file mode 100644 index 077424e49..000000000 --- a/temp/libcamera/0018-ipa-simple-Add-tuning-file-for-IMX858.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 1fe6f0def67fc76344ecd7c4e4b038b8d7cc7197 Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Thu, 23 Oct 2025 19:35:59 +0200 -Subject: [PATCH 18/19] ipa/simple: Add tuning file for IMX858 - -Used by the Fairphone 5. The value is guessed from similar IMX sensors. ---- - src/ipa/simple/data/imx858.yaml | 11 +++++++++++ - src/ipa/simple/data/meson.build | 1 + - 2 files changed, 12 insertions(+) - create mode 100644 src/ipa/simple/data/imx858.yaml - -diff --git a/src/ipa/simple/data/imx858.yaml b/src/ipa/simple/data/imx858.yaml -new file mode 100644 -index 000000000..f7d01b738 ---- /dev/null -+++ b/src/ipa/simple/data/imx858.yaml -@@ -0,0 +1,11 @@ -+# SPDX-License-Identifier: CC0-1.0 -+%YAML 1.1 -+--- -+version: 1 -+algorithms: -+ - BlackLevel: -+ blackLevel: 4096 -+ - Awb: -+ - Lut: -+ - Agc: -+... -diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build -index e0c8e443a..8536a9672 100644 ---- a/src/ipa/simple/data/meson.build -+++ b/src/ipa/simple/data/meson.build -@@ -6,6 +6,7 @@ conf_files = files([ - 'imx363.yaml', - 'imx371.yaml', - 'imx376.yaml', -+ 'imx858.yaml', - 's5k3l6xx.yaml', - 'uncalibrated.yaml', - ]) --- -2.51.0 - diff --git a/temp/libcamera/0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch b/temp/libcamera/0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch deleted file mode 100644 index 4f56c931d..000000000 --- a/temp/libcamera/0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f0466e0bf079919df780a1bdbc22a55d5fa67c7d Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Thu, 23 Oct 2025 19:37:31 +0200 -Subject: [PATCH 19/19] ipa/simple: Add tuning file for s5kjn1 - -Used by the Fairphone 5. The value is guessed from similar IMX sensors. ---- - src/ipa/simple/data/meson.build | 1 + - src/ipa/simple/data/s5kjn1.yaml | 11 +++++++++++ - 2 files changed, 12 insertions(+) - create mode 100644 src/ipa/simple/data/s5kjn1.yaml - -diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build -index 8536a9672..4cecff634 100644 ---- a/src/ipa/simple/data/meson.build -+++ b/src/ipa/simple/data/meson.build -@@ -8,6 +8,7 @@ conf_files = files([ - 'imx376.yaml', - 'imx858.yaml', - 's5k3l6xx.yaml', -+ 's5kjn1.yaml', - 'uncalibrated.yaml', - ]) - -diff --git a/src/ipa/simple/data/s5kjn1.yaml b/src/ipa/simple/data/s5kjn1.yaml -new file mode 100644 -index 000000000..f7d01b738 ---- /dev/null -+++ b/src/ipa/simple/data/s5kjn1.yaml -@@ -0,0 +1,11 @@ -+# SPDX-License-Identifier: CC0-1.0 -+%YAML 1.1 -+--- -+version: 1 -+algorithms: -+ - BlackLevel: -+ blackLevel: 4096 -+ - Awb: -+ - Lut: -+ - Agc: -+... --- -2.51.0 - diff --git a/temp/libcamera/APKBUILD b/temp/libcamera/APKBUILD index d513d326f..50169ff71 100644 --- a/temp/libcamera/APKBUILD +++ b/temp/libcamera/APKBUILD @@ -1,9 +1,9 @@ # Forked from Alpine for temporary downstream patches pkgname=libcamera -_pkgver=0.5.2 +_pkgver=0.6.0 pkgver=9999$_pkgver -pkgrel=3 +pkgrel=0 pkgdesc="Linux camera framework" url="https://libcamera.org/" arch="all" @@ -19,7 +19,11 @@ depends_dev=" makedepends="$depends_dev coreutils doxygen + eudev-dev + glib-dev + gnutls-dev graphviz + gst-plugins-bad-dev gtest-dev libevent-dev libpisp-dev @@ -29,42 +33,41 @@ makedepends="$depends_dev meson py3-jinja2 py3-ply + py3-pybind11-dev py3-sphinx py3-sphinxcontrib-doxylink py3-yaml + python3-dev + qt6-qtbase-dev qt6-qttools-dev yaml-dev " subpackages=" $pkgname-dbg $pkgname-dev - $pkgname-doc qcam $pkgname-gstreamer $pkgname-v4l2 $pkgname-tools + py3-$pkgname:py3 + " +_tuning_files=" + hi846.yaml + imx355.yaml + imx363.yaml + imx371.yaml + imx376.yaml + imx858.yaml + s5k3l6xx.yaml + s5kjn1.yaml " source="https://gitlab.freedesktop.org/camera/libcamera/-/archive/v$_pkgver/libcamera-v$_pkgver.tar.gz - 0001-libcamera-software_isp-Clarify-SwStatsCpu-setWindow-.patch - 0002-libcamera-software_isp-Pass-correct-y-coordinate-to-.patch - 0003-libcamera-software_isp-Check-processed-window-size-a.patch - 0004-libcamera-simple-Avoid-incorrect-arithmetic-in-AWB.patch - 0005-libcamera-simple-Prevent-division-by-zero-in-BLC.patch - 0006-libcamera-simple-Enable-softwareISP-for-the-librem5.patch - 0007-libcamera-simple-Force-disable-softwareISP-for-milli.patch - 0008-libcamera-simple-Enable-softISP-for-the-Pinephone.patch - 0009-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch - 0010-pipeline-simple-Consider-output-sizes-when-choosing-.patch - 0011-pipeline-simple-Increase-internal-buffer-count-to-fo.patch - 0012-ipa-simple-Add-tuning-file-for-IMX355.patch - 0013-ipa-simple-Add-tuning-file-for-IMX363.patch - 0014-ipa-simple-Add-tuning-file-for-s5k3l6xx.patch - 0015-ipa-simple-Add-tuning-file-for-hi846.patch - 0016-ipa-simple-Add-tuning-file-for-IMX371.patch - 0017-ipa-simple-Add-tuning-file-for-IMX376.patch - 0018-ipa-simple-Add-tuning-file-for-IMX858.patch - 0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch + 0001-libcamera-simple-Enable-softwareISP-for-the-librem5.patch + 0002-libcamera-simple-Force-disable-softwareISP-for-milli.patch + 0003-libcamera-simple-Enable-softISP-for-the-Pinephone.patch + 0004-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch qcam.desktop + $_tuning_files " builddir="$srcdir/$pkgname-v$_pkgver" # gstreamer tests fail @@ -89,9 +92,9 @@ esac build() { abuild-meson \ - -Dtest=true \ -Dv4l2=true \ -Dwerror=false \ + -Ddocumentation=disabled \ . output meson compile -C output } @@ -118,6 +121,13 @@ package() { ipa() { depends="" amove usr/lib/libcamera + amove usr/share/libcamera/ipa + + for _tuning_file in $_tuning_files; do + install -Dm644 -t "$subpkgdir"/usr/share/libcamera/ipa/simple \ + "$srcdir"/"$_tuning_file" + done + # then sign ipa's local ipa for ipa in "$subpkgdir"/usr/lib/libcamera/ipa/ipa*.so; do @@ -159,26 +169,26 @@ tools() { amove usr/bin/lc-compliance } +py3() { + pkgdesc="$pkgname (python bindings)" + depends="python3" + + amove usr/lib/python* +} + sha512sums=" -eb2ef122baa2a884c6b5303610882ba9d5699ebbadb24c21cdf2e09466a85ef54689c5e291fb153c0acd37307756dd4eb5353d16200b3469272398797513f131 libcamera-v0.5.2.tar.gz -85259c2001893cdb95a67c5df513844447b414e487cd5f1ec4fbc8aa4dc48ddc5463b4594f0f28272ff76e37615a7f40581c6caf5aadae45cf4e45541d2d59ae 0001-libcamera-software_isp-Clarify-SwStatsCpu-setWindow-.patch -ab394635f1b83608436930561361c5a1ab5c1965b3e5943a516e6d57c0e8e1cf59fcc2d1c21ef630aaa3c2878dd49bdf65ed30cb9a67265b13e43f8d0d8f45d5 0002-libcamera-software_isp-Pass-correct-y-coordinate-to-.patch -4513021d89055cb2727b111b0cee1cfa20cd3ee6700e8174d5cd9b3fbbd9a10f46fe56c267a1bd75115e2e7f7ad2bd62751f33510e9a948a28bd5766bbc8761c 0003-libcamera-software_isp-Check-processed-window-size-a.patch -82737bc297d933d54e103bfba101a745e39291219a7d04ddbcddf9eaaf49f0a808ff62ab9cae3954a5cd235c4fddf3883de58b7663632f7341de25abf076c57a 0004-libcamera-simple-Avoid-incorrect-arithmetic-in-AWB.patch -38512327348832411a95cc861a02d31d4c11906e1f8a8ea2120d8b9619b1370ec28e4ea9091b19940d669d2f52a44c3641106405ec8df350312ec0e17078e8cd 0005-libcamera-simple-Prevent-division-by-zero-in-BLC.patch -93d8d8d4b33d9cdba02abfba7b328bc7af92e8ee1baa104d7490285f18ec80ca06c4adb8da3b604f96199c6c41fcd5de432fb4cf466846671072deedbae630b4 0006-libcamera-simple-Enable-softwareISP-for-the-librem5.patch -e4f1929e978e7320969370557f835be9ec07142f579b550626ceafc97298fffea12da132cd210457b1df650591f5f14ced55a77594e7c548254c206033e46ff3 0007-libcamera-simple-Force-disable-softwareISP-for-milli.patch -1a2ce4d5607fda846d7b8bf28729f55055917969200c18506b9310b35680dc36b4f6590b6b721237673bf383780a044cc793dee55859760a2d120a51205abb57 0008-libcamera-simple-Enable-softISP-for-the-Pinephone.patch -670cc15f04b59142af1da667a22d9206df9a9116348a9ff94bce055ac6ee905298a3bc2f57f195d5063629dd6af56d0ad5fc0253f674e79067c9750348ecc4e0 0009-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch -c52de38726d4abacbf95fad89b41bf26648401d3c72645c573f09ad0735f4c0fb1cda1c24dffcd445b0cdb880be206564eb60b1e2292801550a284b131965584 0010-pipeline-simple-Consider-output-sizes-when-choosing-.patch -63a9291765dd67fdac0bbce908ce7f212a48c19e5694f2c0ea04509f32ad224a7f15518634796b90fe1bcdcfaeddcdbdcd3725ea1a039021afcffc6189335184 0011-pipeline-simple-Increase-internal-buffer-count-to-fo.patch -bb1dfadc125901bb6cac0bfc8640333833afe0a2616990f7ee7dd2fba7bf3f327afc37191dc517c43654af1cf59b3973d649ce395c96b76d0ba3ec443c693ee0 0012-ipa-simple-Add-tuning-file-for-IMX355.patch -8cf0b37974f15559f4686c7444f6b495b138f9ec082addcfa0322e251b02e535dc9446ed19bfd6d6adc48a030bed6f0ce4ef67ec6ed4e29b88e154203c9f9937 0013-ipa-simple-Add-tuning-file-for-IMX363.patch -5a2d1a2ee9d5e90e218ce04a875ee5dde48a4473c423de122b03c844a28ab1740c491345354c89b5c2881636bf856a589835b0713fe548328b1f9feba58f42bc 0014-ipa-simple-Add-tuning-file-for-s5k3l6xx.patch -e4902b96659c993e93776c0586395df51aea0bedb92e8e0813fc917264e709eb4f17283e80e26a7b43a7177af24c03b93032870a214045e3b09ab63d552bb7a5 0015-ipa-simple-Add-tuning-file-for-hi846.patch -7f2586be77bf629b18862dc7f33e29133c4dcac34200ce0435b4630abc08e16303441e67f86e4dd475dd09e8fd0690bb38f59792327bf42f25285b8d690aeb6f 0016-ipa-simple-Add-tuning-file-for-IMX371.patch -2f508f21d4ca51732407c2c97cf646d1f7a573687e8c36f8e48172183f1100e17517ee77f2ff11069437dd8da0d3600d6ea37768e41c418c52b35d363c38e19c 0017-ipa-simple-Add-tuning-file-for-IMX376.patch -bb7244f03363721428b85e3bdbe249e975d26ca0b36932d4f7733f669c336408093aee036bec14522e7c46fd81afdea20f0a4c41c9058bd18d82de00a2cc4864 0018-ipa-simple-Add-tuning-file-for-IMX858.patch -22cfe2e5992e1b850c5f0960a68c04fd7a9612ab7f66ccf6086d66e1d019b253a5030a35003cac2e23295e4823bec3c05329ae52ef590c25561a25f477b668d5 0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch +901debb8fe864ab5b7b9a9011c760165e0a94f9c14bb6654e297161aaadb6ed1929f1cf4fe20357c188bf24bd00db3953ddd257a0ac726973ad3ceeea07d959f libcamera-v0.6.0.tar.gz +b6e4d79bb3e206bec84804100033bec80d0c3a2408d5d0643c5c52c658b2a3ff2eb4bf4df0d1c21b91b510eecdeb59af826d324c64fcc481790952836cca2ea8 0001-libcamera-simple-Enable-softwareISP-for-the-librem5.patch +82b1e5278f571ff734bce80ded4395ac18191ea2ba94c7cb4f3d0bf5b1ff96e142a419ee6edec395e1af50fc131959b7c3bb963734bd0e573e3c197d00e99493 0002-libcamera-simple-Force-disable-softwareISP-for-milli.patch +7b9e97b1cc866cd0ad6e52c7980ebe5561d3e9a092912602cc85ff502cee5d69b6487ef16419a248a720617be3f1817aa92f8f15992869b87af5c02859fa6aa6 0003-libcamera-simple-Enable-softISP-for-the-Pinephone.patch +48de0e1e1acefb0a901dcfc4c266d633e73463f3ce2a89d7b83eed4833f6459abdc98528afe96d88c7bac78e75035a491f9228ed937e251849e9926e7d80216d 0004-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch 22167a4eceb6d1b40b0b7c45fdf116c71684f5340de7f767535cb8e160ad9d2ae0f00cb3d461f73a344520a48a4641cf46226841d78bee06bfbfd2a91337f754 qcam.desktop +fa9e4736c7651d4f97d97b58eef2d1d7ddd4616b1de67c840c4804585c62c78bb5ce80cb14669ae462414faa1c6af10c60cad0c416d69f685bc96434ad73e08a hi846.yaml +fa9e4736c7651d4f97d97b58eef2d1d7ddd4616b1de67c840c4804585c62c78bb5ce80cb14669ae462414faa1c6af10c60cad0c416d69f685bc96434ad73e08a imx355.yaml +fa9e4736c7651d4f97d97b58eef2d1d7ddd4616b1de67c840c4804585c62c78bb5ce80cb14669ae462414faa1c6af10c60cad0c416d69f685bc96434ad73e08a imx363.yaml +fa9e4736c7651d4f97d97b58eef2d1d7ddd4616b1de67c840c4804585c62c78bb5ce80cb14669ae462414faa1c6af10c60cad0c416d69f685bc96434ad73e08a imx371.yaml +fa9e4736c7651d4f97d97b58eef2d1d7ddd4616b1de67c840c4804585c62c78bb5ce80cb14669ae462414faa1c6af10c60cad0c416d69f685bc96434ad73e08a imx376.yaml +fa9e4736c7651d4f97d97b58eef2d1d7ddd4616b1de67c840c4804585c62c78bb5ce80cb14669ae462414faa1c6af10c60cad0c416d69f685bc96434ad73e08a imx858.yaml +fa9e4736c7651d4f97d97b58eef2d1d7ddd4616b1de67c840c4804585c62c78bb5ce80cb14669ae462414faa1c6af10c60cad0c416d69f685bc96434ad73e08a s5k3l6xx.yaml +fa9e4736c7651d4f97d97b58eef2d1d7ddd4616b1de67c840c4804585c62c78bb5ce80cb14669ae462414faa1c6af10c60cad0c416d69f685bc96434ad73e08a s5kjn1.yaml " diff --git a/temp/libcamera/hi846.yaml b/temp/libcamera/hi846.yaml new file mode 100644 index 000000000..f7d01b738 --- /dev/null +++ b/temp/libcamera/hi846.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +... diff --git a/temp/libcamera/imx355.yaml b/temp/libcamera/imx355.yaml new file mode 100644 index 000000000..f7d01b738 --- /dev/null +++ b/temp/libcamera/imx355.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +... diff --git a/temp/libcamera/imx363.yaml b/temp/libcamera/imx363.yaml new file mode 100644 index 000000000..f7d01b738 --- /dev/null +++ b/temp/libcamera/imx363.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +... diff --git a/temp/libcamera/imx371.yaml b/temp/libcamera/imx371.yaml new file mode 100644 index 000000000..f7d01b738 --- /dev/null +++ b/temp/libcamera/imx371.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +... diff --git a/temp/libcamera/imx376.yaml b/temp/libcamera/imx376.yaml new file mode 100644 index 000000000..f7d01b738 --- /dev/null +++ b/temp/libcamera/imx376.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +... diff --git a/temp/libcamera/imx858.yaml b/temp/libcamera/imx858.yaml new file mode 100644 index 000000000..f7d01b738 --- /dev/null +++ b/temp/libcamera/imx858.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +... diff --git a/temp/libcamera/s5k3l6xx.yaml b/temp/libcamera/s5k3l6xx.yaml new file mode 100644 index 000000000..f7d01b738 --- /dev/null +++ b/temp/libcamera/s5k3l6xx.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +... diff --git a/temp/libcamera/s5kjn1.yaml b/temp/libcamera/s5kjn1.yaml new file mode 100644 index 000000000..f7d01b738 --- /dev/null +++ b/temp/libcamera/s5kjn1.yaml @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: CC0-1.0 +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + blackLevel: 4096 + - Awb: + - Lut: + - Agc: +...