1
0
forked from pool/libcamera

49 Commits

Author SHA256 Message Date
0aab2f393e Update to GPU-ISP 2025-10-31 22:58:47 +01:00
96c2436306 Update to GPU-ISP 2025-10-31 22:14:48 +01:00
1082b35005 Update to GPU-ISP 2025-10-31 21:25:02 +01:00
33a56e992a Update to GPU-ISP 2025-10-31 21:20:59 +01:00
8adce2359a Update to GPU-ISP 2025-10-31 21:20:20 +01:00
1dae4ed60d Update to GPU-ISP 2025-10-31 21:19:22 +01:00
fb1a9894eb Update to GPU-ISP 2025-10-31 21:04:02 +01:00
01a858bb14 Update to GPU-ISP 2025-10-31 20:57:34 +01:00
0880faa3fb Update to GPU-ISP 2025-10-31 20:56:23 +01:00
3379cacde9 Update to GPU-ISP 2025-10-31 20:52:30 +01:00
aefad565c6 Rules 2025-09-16 20:09:18 +02:00
fd5198a2b6 add 2025-09-16 15:52:27 +02:00
f47db589ac add 2025-09-16 15:52:00 +02:00
5344ac30fb Add 2025-09-16 13:33:40 +02:00
8e67cc2377 Add 2025-09-16 12:31:19 +02:00
bb6fe94e1e Add 2025-09-16 12:22:21 +02:00
e448df1d23 Add 2025-09-16 11:37:25 +02:00
3472954e30 Add 2025-09-16 11:24:40 +02:00
743671ac22 Add 2025-09-16 11:09:50 +02:00
b1226dc989 Add 2025-09-16 11:04:43 +02:00
99c5a4825a Add 2025-09-16 10:53:44 +02:00
489d3bc3c8 Add 2025-09-16 10:40:07 +02:00
7d1ef4101d Add 2025-09-16 10:38:43 +02:00
9939c832a6 Add 2025-09-16 10:33:39 +02:00
6a61e1b70a Add 2025-09-16 10:24:40 +02:00
a6f3d6c60b Add 2025-09-16 10:04:09 +02:00
325fbf1bf2 Add 2025-09-16 10:00:41 +02:00
f1d82dde24 Add bindir 2025-09-16 09:55:37 +02:00
05565bed7b Add 2025-09-16 09:50:30 +02:00
39fe66ebc6 Add 2025-09-16 09:42:39 +02:00
e7f46ebedb Add Mobile Patches 2025-09-15 21:48:22 +02:00
be36ffa5a5 Add Mobile Patches 2025-09-15 21:21:40 +02:00
5b68f7f119 Add Mobile Patches 2025-09-15 21:09:00 +02:00
Petr Gajdos
72d4c69bd2 version update to 0.5.2 2025-09-09 15:07:43 +02:00
Bernhard M. Wiedemann
a1e8288163 Add reproducible.patch to skip module signing (boo#1217690) 2025-07-09 13:36:20 +02:00
daa9768622 libcamera 0.5.1 2025-06-06 00:00:58 +02:00
2b9ac9eaca Trim excess EOL whitespace 2025-05-29 19:52:00 +02:00
95c580b3e3 Remove Qt5 BuildRequires which aren't really needed nor used 2025-05-29 18:26:50 +02:00
5267758c51 Also bump the soname in baselibs.conf 2025-04-08 15:52:42 +02:00
20b773b2bc Update to 0.5.0 2025-04-08 09:07:09 +02:00
7dabd86819 POSIX sh compat: drop use of pushd 2025-03-20 13:19:07 +01:00
314d8074f9 Replace libcamera-fix-for-gcc15.patch with upstream change 2025-03-20 13:18:08 +01:00
e022cf9cf3 Add trivial patch to fix build with gcc15 2025-03-20 11:53:08 +01:00
a947ca7173 Update baselibs.conf 2024-12-24 03:36:55 +01:00
56d5d94fe2 Update to libcamera 0.4.0 2024-12-23 23:12:23 +01:00
0f3c64f78d libcamera 0.3.2 2024-10-19 19:10:03 +02:00
25c26bf338 Split SDL/Qt-dependent tools to multibuilt subpackage 2024-08-20 14:41:32 +02:00
8fd5818ce4 Ditch dependency on SDL 2024-08-20 09:38:04 +02:00
74ec3fe50d libcamera 0.3.1 2024-08-19 18:21:02 +02:00
26 changed files with 1033 additions and 33 deletions

View File

@@ -0,0 +1,70 @@
From b5a01e2c62347f6815569cb16ce9ccbb85d6cb19 Mon Sep 17 00:00:00 2001
From: Milan Zamazal <mzamazal@redhat.com>
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 <mzamazal@redhat.com>
---
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

View File

@@ -0,0 +1,70 @@
From d3aaab99a267c160cd67cc853b61a7d5d972ad0f Mon Sep 17 00:00:00 2001
From: Milan Zamazal <mzamazal@redhat.com>
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 <mail@maciej.szmigiero.name>
Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
---
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

View File

@@ -0,0 +1,47 @@
From 2611679a0a425bad4f071fb70c513f73be5132df Mon Sep 17 00:00:00 2001
From: Milan Zamazal <mzamazal@redhat.com>
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 <mzamazal@redhat.com>
---
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

View File

@@ -0,0 +1,43 @@
From 242ae30056eb3d4964b518cb902d2dfef6c69de5 Mon Sep 17 00:00:00 2001
From: Milan Zamazal <mzamazal@redhat.com>
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 <mzamazal@redhat.com>
---
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 <algorithm>
#include <numeric>
#include <stdint.h>
@@ -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

View File

@@ -0,0 +1,33 @@
From ef0b475f471e114044a7fbacf13bb16b5d362def Mon Sep 17 00:00:00 2001
From: Milan Zamazal <mzamazal@redhat.com>
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 <mzamazal@redhat.com>
---
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

View File

@@ -0,0 +1,26 @@
From ced95de9a798243f0152a5e2d8743d8cdc58d65d Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
Date: Mon, 22 Apr 2024 23:30:31 +0200
Subject: [PATCH 06/17] libcamera: simple: Enable softwareISP for the librem5
And - in theory - on similar devices.
---
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 4323472e1..74e0683f4 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -250,7 +250,7 @@ namespace {
static const SimplePipelineInfo supportedDevices[] = {
{ "dcmipp", {}, false },
- { "imx7-csi", { { "pxp", 1 } }, false },
+ { "imx7-csi", { { "pxp", 1 } }, true },
{ "intel-ipu6", {}, true },
{ "j721e-csi2rx", {}, true },
{ "mtk-seninf", { { "mtk-mdp", 3 } }, false },
--
2.50.1

View File

@@ -0,0 +1,43 @@
From cb0c4005f0303798c700352e00c9389e3e2f463b Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
Date: Thu, 9 May 2024 21:07:07 +0200
Subject: [PATCH 07/17] libcamera: simple: Force-disable softwareISP for
millipixels
As the later uses libcamera and requires raw-streams to get passed
through. In the future, libcamera will likely support both - raw and
swIsp - at the same time.
---
src/libcamera/pipeline/simple/simple.cpp | 9 +++++++++
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
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -7,6 +7,7 @@
*/
#include <algorithm>
+#include <fstream>
#include <iterator>
#include <list>
#include <map>
@@ -1680,6 +1681,14 @@ bool SimplePipelineHandler::matchDevice(MediaDevice *media,
swIspEnabled_ = info.swIspEnabled;
+ std::string comm_string;
+ std::ifstream("/proc/self/comm") >> comm_string;
+ if (comm_string == "millipixels") {
+ LOG(SimplePipeline, Warning)
+ << "Detected millipixels, disabling swIsp";
+ swIspEnabled_ = false;
+ }
+
/* Locate the sensors. */
std::vector<MediaEntity *> sensors = locateSensors(media);
if (sensors.empty()) {
--
2.50.1

View File

@@ -0,0 +1,32 @@
From a03f8f4e44e5b6d794022f8de8f54f2f68692d64 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
Date: Wed, 1 May 2024 18:12:02 +0200
Subject: [PATCH 08/17] 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
front camera in Megi differs heavily from the upstream one.
Thus enable the swISP to make both cameras work reliably for now. This
is essentially what Megapixels does as well. If the HW ISP situation
improves, this can be dropped again.
---
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 eb405e52c..f4b49b1ab 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -257,7 +257,7 @@ static const SimplePipelineInfo supportedDevices[] = {
{ "mtk-seninf", { { "mtk-mdp", 3 } }, false },
{ "mxc-isi", {}, false },
{ "qcom-camss", {}, true },
- { "sun6i-csi", {}, false },
+ { "sun6i-csi", {}, true },
};
} /* namespace */
--
2.50.1

View File

@@ -0,0 +1,33 @@
From 39a3d481aabb6f92f4b3b846064d8bc6f049f36d Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
Date: Mon, 6 May 2024 21:21:57 +0200
Subject: [PATCH 09/17] libcamera: simple: Skip hwISP formats if swISP is
active
On devices like the Pinephone libcamera will advertise support for
formats provided by the HW ISP and the SW ISP at the same time. The
reason why we enable the SW ISP in the first place is, however, that the
HW ISP does not work reliable atm. Thus filter out formats from the HW
ISP when the SW ISP is enabled, to ensure we use the later.
---
src/libcamera/pipeline/simple/simple.cpp | 4 +---
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
--- 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)
config.outputFormats = swIsp_->formats(pixelFormat);
config.outputSizes = swIsp_->sizes(pixelFormat, format.size);
if (config.outputFormats.empty()) {
- /* Do not use swIsp for unsupported pixelFormat's. */
- config.outputFormats = { pixelFormat };
- config.outputSizes = config.captureSize;
+ continue;
}
} else {
config.outputFormats = { pixelFormat };
--
2.50.1

View File

@@ -0,0 +1,35 @@
From 9303db28aedd7e7ffe7af1627418c1ff070f2499 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
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 <robert.mader@collabora.com>
---
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

View File

@@ -0,0 +1,27 @@
From 9b0f6c6d8c4bc3e4fed87c54daadaaf79c621341 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
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 <robert.mader@collabora.com>
---
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<V4L2VideoDevice> video;
--
2.50.1

View File

@@ -0,0 +1,50 @@
From bf9c2c76e8f390f35d0a0e0380cb2fae03abe806 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
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 <robert.mader@collabora.com>
---
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

View File

@@ -0,0 +1,47 @@
From 9e21554b1374b057e84b3afa76b55855b01671f4 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
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 <robert.mader@collabora.com>
---
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

View File

@@ -0,0 +1,44 @@
From e9694f7ed531d3a7394d42b9f4b0d00bf46e87be Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
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

View File

@@ -0,0 +1,44 @@
From 175bb5ee1932242967e439955b0dad942228158d Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
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

View File

@@ -0,0 +1,44 @@
From 5d00a3b8aa891c0c0ca114c8ec1c0070d054055c Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
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

View File

@@ -0,0 +1,44 @@
From 2f0d4f7929afb239d2b74ce7cfee447a70101f36 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
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

1
90-libcamera.rules Normal file
View File

@@ -0,0 +1 @@
KERNEL=="udmabuf",GROUP="video",MODE="0660"

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<flavor>full</flavor>
</multibuild>

View File

@@ -1,9 +1,9 @@
<services>
<service name="tar_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://git.libcamera.org/libcamera/libcamera.git</param>
<param name="revision">refs/tags/v0.2.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="url">https://gitlab.freedesktop.org/rmader/libcamera.git</param>
<param name="revision">postmarketos-gpuisp-v4-master</param>
<param name="versionformat">v0.5.2</param>
<param name="versionrewrite-pattern">v([0-9\.]*)</param>
</service>
<service name="recompress" mode="manual">

View File

@@ -1,2 +1,2 @@
libcamera0_2
libcamera-base0_2
libcamera0_5
libcamera-base0_5

Binary file not shown.

BIN
libcamera-0.5.2.tar.xz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,167 @@
-------------------------------------------------------------------
Tue Sep 9 12:42:46 UTC 2025 - pgajdos@suse.com
- Update to release 0.5.2
* This release substantial development on gstreamer.
* In core we can see development that cleans up ProcessManager
in a drive to reduce singleton patterns throughout libcamera.
* Pipelines are now able to limit the number of requests queued
into the pipeline handler which helps prevent issues when
applications desire to use a larger request queue.
* It's now possible to check if controls exist with new macros
defined for every control to help codebases compile against
multiple versions.
- see https://gitlab.freedesktop.org/camera/libcamera/-/releases/v0.5.2
for details
-------------------------------------------------------------------
Wed Jul 9 11:32:16 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.de>
- Add reproducible.patch to skip module signing (boo#1217690)
-------------------------------------------------------------------
Thu Jun 5 21:57:29 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Update to release 0.5.1
* Improvements have been made to the Raspberry Pi Camera Tuning
Tools, and the geometry, matrix and vector class helpers have
been expanded for greater reuse throughout the project.
* The software ISP has a new Saturation control.
-------------------------------------------------------------------
Thu May 29 16:21:24 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
- Remove Qt5 BuildRequires which aren't really needed nor used.
-------------------------------------------------------------------
Tue Apr 8 13:52:10 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
- Also bump the soname in baselibs.conf
-------------------------------------------------------------------
Tue Apr 8 06:57:18 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
- Update to release 0.5.0
* The abi-compliance-checker reports there are both ABI and API
changes in this release.
* Substantially less than the previous release, and ultimately
quite minor but unfortunately there nonetheless and so the
SONAME is updated to 0.5 accordingly. I do not anticipate
anything there that cannot be solved for applications without
just a recompile.
* This release brings in 201 commits with a huge list of fixes
and code clean up which I'm very happy to see, including
interesting fixes to the AGC and AWB handling in libipa.
* In regards to new features, libcamera-0.5 has aptly now got
the core Raspberry Pi 5 support merged!. There are still
patches that are currently maintained by Raspberry Pi for
additional features, and while the transition to upstream API's
continue, but I think we're all happy to see this support
getting in directly, and Raspberry Pi continue to lead the way
in upstream camera development. I look forward to the kernel
API's for streams being fully utilised by the PiSP platform for
upstream camera metadata handling. This upcoming work is also
supported by the CameraSensor factory and CameraSensorRaw
support that is now also merged in this release.
* Further more in the platform support, the software_isp
continues to be developed and is now able to measure colour
temperature, which will bring in improvements for AWB, and a
CCM can be applied while peforming debayering (at a CPU cost)
which will allow us to finally apply color tuning for sensors
on devices that need to fall back to the software ISP.
* New sensor support seems fairly short in this release, with the
IMX415 being the prominent addition.
* In libipa, and algorithm developments, along with many fixes
and improvements there is a substantial new feature that the
Baysian AWB algorithm from Raspberry Pi can now also be used on
all libipa supported IPA modules, and has shown good impovements
for the RkISP1 supported devices.
* There is minimal changes to the application support side, but
it is notable that now the Y444 format has been mapped to be
usable by the gstreamer src element. lc-compliance has seen
some progress which I hope will bring this to being a more
central part of the test infrastructure.
* For a full list of changes, please see:
https://git.libcamera.org/libcamera/libcamera.git/commit/?id=058f589ae36170935e537910f2c303b1c3ea03b3
- Drop patch which is already included by upstream:
* libcamera-fix-for-gcc15.patch
-------------------------------------------------------------------
Thu Mar 20 12:19:00 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Make build recipe POSIX sh compatible
-------------------------------------------------------------------
Thu Mar 20 10:48:50 UTC 2025 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Add trivial patch to fix build with gcc15:
* libcamera-fix-for-gcc15.patch
-------------------------------------------------------------------
Mon Dec 23 21:51:19 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Update to release 0.4.0
* The abi-compliance-checker reports that there is both ABI and
API breakage in this release.
* The majority of the ABI breakages are around the public API for
Control handling and definitions, which have caused underlying
identifiers to be changed, and the reuqired storage for
controls has increased.
* This release brings in 253 commits, with substantial
development on image control and tuning features for IPA and
Pipeline handlers supporting libipa, as well as integrating
libipa support for IPA handling on the ARM Mali-C55 ISP.
* A new 'Virtual Pipeline Handler' has been introduced to support
more testing in CI and virtual environments.
* Gstreamer has had some interesting development to rework
expressing the full control set from libcamera using auto
generation from the full control descriptors.
* A key and notable change in this release too is that the
softISP is now moving towards utilising the libipa
implementaitons which will enable future tuning and image
control capabilities, and should also support future
development on a GPU-ISP implementation for GPU-accelerated
handling. I do believe this work may have introduced an
oscillation regression in the AEGC which will need to be
investigated and fixed in the near future, but I don't want to
hold up progressing the ABI updates at this stage.
* The i.MX8MP can now make full use of the DW100 Dewarp Engine
for full rotation and digital zoom capabilities.
* Raspberry Pi systems now have improved support for the OV7251,
IMX462, and IMX327 Sensors, and libipa platforms can now make
use of the GalaxyCore gc05a2 and gc08a3 Image sensors.
* For a full list of changes, please see:
https://git.libcamera.org/libcamera/libcamera.git/commit/?id=35ed4b91291d9f3d08e4b51acfb51163e65df8f8
-------------------------------------------------------------------
Sat Oct 19 17:05:03 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 0.3.2
* Add Sony IMX214 sensor properties
-------------------------------------------------------------------
Tue Aug 20 07:37:45 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Split SDL/Qt-dependent tools to multibuilt subpackage
-------------------------------------------------------------------
Mon Aug 12 15:41:49 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 0.3.1
* new Soft ISP feature and enablement in the simple-pipeline
handler for Qualcomm based devices supporting CamSS and the
inclusion of a new Pipeline handler to support the Mali-C55
ISP which now has open source kernel drivers available.
* The i.MX8MP ISP is now officially supported through the
existing RKISP1 pipeline handler, and the Simple Pipeline
handler now supports the MediaTek MT8365 platform.
* Three additional camera sensors, IMX283, IMX335, and IMX415
are also now supported.
* The IPU6 is now supported by the SoftISP and Simple Pipeline
handler and the Onsemi AR0144 is now supported by libipa. A
new control has been added to support setting and reading of
Gamma, and gamma control has been added to the RKISP1 IPA.
-------------------------------------------------------------------
Tue Mar 19 07:41:24 UTC 2024 - Richard Biener <rguenther@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package libcamera
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,31 +16,50 @@
#
%define lname libcamera0_2
%define lname_base libcamera-base0_2
Name: libcamera
Version: 0.2.0
%define lname libcamera0_5
%define lname_base libcamera-base0_5
%if "@BUILD_FLAVOR@" != ""
%define extname -@BUILD_FLAVOR@
%else
%define extname %nil
%endif
Name: libcamera%extname
Version: 0.5.2
Release: 0
Summary: A complex camera support library in C++
License: GPL-2.0-or-later AND LGPL-2.1-or-later
License: CC-BY-SA-4.0 AND GPL-2.0-or-later AND LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://libcamera.org/
#Git-Web: https://git.libcamera.org/libcamera/libcamera.git/
Source: %name-%version.tar.xz
Source: libcamera-%version.tar.xz
Source1: baselibs.conf
Source2: 90-libcamera.rules
Patch0: reproducible.patch
#Patch1: 0001-libcamera-software_isp-Clarify-SwStatsCpu-setWindow-.patch
#Patch2: 0002-libcamera-software_isp-Pass-correct-y-coordinate-to-.patch
#Patch3: 0003-libcamera-software_isp-Check-processed-window-size-a.patch
#Patch4: 0004-libcamera-simple-Avoid-incorrect-arithmetic-in-AWB.patch
#Patch5: 0005-libcamera-simple-Prevent-division-by-zero-in-BLC.patch
#Patch6: 0006-libcamera-simple-Enable-softwareISP-for-the-librem5.patch
#Patch7: 0007-libcamera-simple-Force-disable-softwareISP-for-milli.patch
#Patch8: 0008-libcamera-simple-Enable-softISP-for-the-Pinephone.patch
#Patch9: 0009-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch
#Patch10: 0010-pipeline-simple-Consider-output-sizes-when-choosing-.patch
#Patch11: 0011-pipeline-simple-Increase-internal-buffer-count-to-fo.patch
#Patch12: 0012-ipa-simple-Add-tuning-file-for-IMX355.patch
#Patch13: 0013-ipa-simple-Add-tuning-file-for-IMX363.patch
#Patch14: 0014-ipa-simple-Add-tuning-file-for-s5k3l6xx.patch
#Patch15: 0015-ipa-simple-Add-tuning-file-for-hi846.patch
#Patch16: 0016-ipa-simple-Add-tuning-file-for-IMX371.patch
#Patch17: 0017-ipa-simple-Add-tuning-file-for-IMX376.patch
BuildRequires: boost-devel
BuildRequires: c++_compiler
%if 0%{?suse_version} <= 1500
BuildRequires: gcc9
BuildRequires: gcc9-c++
BuildRequires: gcc11
BuildRequires: gcc11-c++
%endif
BuildRequires: libQt5Core-devel
BuildRequires: libQt5Gui-devel
BuildRequires: libQt5Widgets-devel
BuildRequires: meson >= 0.56
BuildRequires: pkgconfig
BuildRequires: pkg-config
BuildRequires: python3-Jinja2
BuildRequires: python3-PyYAML
BuildRequires: python3-ply
@@ -52,7 +71,22 @@ BuildRequires: pkgconfig(libevent_pthreads)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pybind11)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(yaml-0.1)
BuildRequires: pkgconfig(libpisp)
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(libyuv)
BuildRequires: Mesa-libGLESv3-devel
%if "@BUILD_FLAVOR@" != ""
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6OpenGL)
BuildRequires: pkgconfig(Qt6OpenGLWidgets)
BuildRequires: pkgconfig(Qt6Widgets)
BuildRequires: pkgconfig(sdl2)
%endif
%description
libcamera is an experimental camera user-space API.
@@ -104,6 +138,14 @@ Group: Development/Tools/Other
%description tools
libcamera is an experimental camera user-space API.
%package -n libcamera-cam
Summary: Command-line interfaces for libcamera
Group: Development/Tools/Other
# Heavy runtime deps (SDL, Qt6)
%description -n libcamera-cam
libcamera is an experimental camera user-space API.
"cam" is a command-line utility to interact with cameras. The initial state is
limited and only supports listing cameras in the system and selecting a camera
to interact with.
@@ -116,28 +158,53 @@ Group: Productivity/Multimedia/Other
libcamera is an experimental camera user-space API.
This is its integration plugin for gstreamer.
%package -n python3-libcamera
Summary: Python bindings for libcamera
Group: Development/Languages/Python
%description -n python3-libcamera
Python bindings for libcamera.
%prep
%autosetup -p1
%autosetup -p1 -n libcamera-%version
%build
%if 0%{?suse_version} <= 1500
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
%endif
%meson \
-Ddocumentation=disabled \
-Dqcam=enabled \
-Dv4l2=false -Dtracing=disabled \
-Dpipelines=ipu3,rkisp1,simple,uvcvideo,vimc \
-Dlc-compliance=disabled
-Ddocumentation=disabled \
%if "@BUILD_FLAVOR@" != ""
-Dqcam=enabled \
%else
-Dqcam=disabled \
%endif
-Dv4l2=enabled -Dtracing=disabled \
-Dlc-compliance=enabled -Dudev=enabled \
-Dpipelines=all -Dipas=ipu3,mali-c55,rkisp1,rpi/pisp,rpi/vc4,simple,vimc
%meson_build
%install
%meson_install
cd "%buildroot"
%if "@BUILD_FLAVOR@" != ""
find . ! -type d ! -path ./usr/bin/cam ! -path ./usr/bin/qcam -print -delete
%else
rm -v usr/bin/cam
%{__install} -Dm0644 -t %{buildroot}%{_udevrulesdir} %{SOURCE2}
#for ipa in %{buildroot}%{_libdir}/libcamera/ipa/ipa*.so; do
# %{_builddir}/%name-%version/src/ipa/ipa-sign.sh \
# "$(find %{_builddir}/%name-%version/ -type f -iname "*ipa-priv-key.pem")" \
# "$ipa" \
# "$ipa".sign
#done
%endif
%ldconfig_scriptlets -n %lname
%ldconfig_scriptlets -n %lname_base
%if "@BUILD_FLAVOR@" == ""
%files -n %lname
%_libdir/libcamera.so.*
@@ -152,13 +219,25 @@ export CXX=g++-9
%_libdir/pkgconfig/*.pc
%files tools
%_bindir/cam
%_bindir/qcam
%_libexecdir/libcamera/
%_libdir/libcamera/
%_datadir/libcamera/
%{_udevrulesdir}/
%{_bindir}/libcamerify
%{_bindir}/lc-compliance
%files -n gstreamer-plugins-libcamera
%_libdir/gstreamer-1.0/
%files -n python3-libcamera
%python3_sitearch/*
%else
%files -n libcamera-cam
%_bindir/cam
%_bindir/qcam
%endif
%changelog

21
reproducible.patch Normal file
View File

@@ -0,0 +1,21 @@
Date: 2024-09-21
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Skip module signing for https://bugzilla.opensuse.org/show_bug.cgi?id=1217690
reproducible builds, until we can get a better upstream solution
such as
https://lists.libcamera.org/pipermail/libcamera-devel/2024-January/040244.html
diff --git a/src/meson.build b/src/meson.build
index 8eb8f05..41e556d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -16,7 +16,7 @@ summary({
# Module Signing
openssl = find_program('openssl', required : false)
-if openssl.found()
+if false
ipa_priv_key = custom_target('ipa-priv-key',
output : ['ipa-priv-key.pem'],
command : [gen_ipa_priv_key, '@OUTPUT@'])