1
0
forked from jengelh/libcamera

14 Commits

Author SHA256 Message Date
9ceeb90757 Sync changes to SLFO-1.2 branch 2025-08-20 09:35:52 +02:00
ebd4518164 Accepting request 1233212 from graphics
- Update to release 0.4.0

OBS-URL: https://build.opensuse.org/request/show/1233212
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcamera?expand=0&rev=23
2024-12-26 11:23:18 +00:00
OBS User unknown
ac12b184d2 [info=a947ca7173a6ae6711aeb28eaf5a3787c95cbc43505bd881b4d2e9eb043e339c]
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=55
2024-12-24 02:37:13 +00:00
OBS User unknown
2452493a53 [info=56d5d94fe231ff34ec3fa771ded5bb806e8d4bef16d0a6b3c614d3937e6c8749]
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=54
2024-12-24 01:26:16 +00:00
e06bbe78b7 Accepting request 1219491 from graphics
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1219491
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcamera?expand=0&rev=22
2024-10-31 15:09:17 +00:00
OBS User unknown
9cef968c51 [info=0f3c64f78d9dc14e4bd7e7b55a3e8ed803a219f053ab7b6c260836f19cadb250]
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=53
2024-10-19 17:10:30 +00:00
259b43dc90 Accepting request 1194915 from graphics
- Split SDL/Qt-dependent tools to multibuilt subpackage
- Update to release 0.3.1

OBS-URL: https://build.opensuse.org/request/show/1194915
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcamera?expand=0&rev=21
2024-08-21 21:24:45 +00:00
OBS User unknown
97e4e421e3 [info=25c26bf3382ab16389f2c2053e5be1af269ea41d1a3815f45f79f8533b9cac3c]
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=52
2024-08-20 12:37:10 +00:00
OBS User unknown
d7002e98bf [info=8fd5818ce47ba786b9c54a5b59e057255ea2d948a26acb9bc8ae6ce45c0c1583]
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=51
2024-08-20 07:33:40 +00:00
OBS User unknown
e17114be0c [info=74ec3fe50da967f157801a1c34a9a5270df6e9179fb7305c68f0797d0650a01d]
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=50
2024-08-19 16:16:40 +00:00
OBS User unknown
6bec057ddb [info=ad29c9928f6467fac0e47fbe642fc8090d447813cac397f8787621b373fbe663]
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=49
2024-08-19 16:16:11 +00:00
09df7011aa [info=787d1706d3ab005d36cdddbf9ba4203b95e3b350778beab50b7fd2e13dd06d7b]
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=48
2024-08-12 11:22:21 +00:00
OBS User buildservice-autocommit
e5e8180451 Accepting request 1159296 from graphics
baserev update by copy to link target

OBS-URL: https://build.opensuse.org/request/show/1159296
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=47
2024-03-20 20:09:53 +00:00
646de8b6c3 Accepting request 1159243 from home:rguenther:branches:graphics
- Avoid %if %{pkg_vcmp gcc < 8}, instead replicate the condition
  from the BuildRequires section.

OBS-URL: https://build.opensuse.org/request/show/1159243
OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=46
2024-03-19 08:31:58 +00:00
23 changed files with 11 additions and 793 deletions

View File

@@ -1,70 +0,0 @@
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

@@ -1,70 +0,0 @@
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

@@ -1,47 +0,0 @@
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

@@ -1,43 +0,0 @@
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

@@ -1,33 +0,0 @@
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

@@ -1,26 +0,0 @@
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

@@ -1,43 +0,0 @@
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

@@ -1,32 +0,0 @@
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

@@ -1,33 +0,0 @@
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

@@ -1,35 +0,0 @@
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

@@ -1,27 +0,0 @@
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

@@ -1,50 +0,0 @@
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

@@ -1,47 +0,0 @@
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

@@ -1,44 +0,0 @@
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

@@ -1,44 +0,0 @@
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

@@ -1,44 +0,0 @@
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

@@ -1,44 +0,0 @@
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

View File

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

View File

@@ -1,9 +1,9 @@
<services>
<service name="tar_scm" mode="manual">
<param name="scm">git</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="url">https://git.libcamera.org/libcamera/libcamera.git</param>
<param name="revision">refs/tags/v0.5.1</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v([0-9\.]*)</param>
</service>
<service name="recompress" mode="manual">

BIN
libcamera-0.5.1.tar.xz LFS Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -1,19 +1,3 @@
-------------------------------------------------------------------
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>

View File

@@ -24,7 +24,7 @@
%define extname %nil
%endif
Name: libcamera%extname
Version: 0.5.2
Version: 0.5.1
Release: 0
Summary: A complex camera support library in C++
License: CC-BY-SA-4.0 AND GPL-2.0-or-later AND LGPL-2.1-or-later
@@ -33,25 +33,7 @@ URL: https://libcamera.org/
#Git-Web: https://git.libcamera.org/libcamera/libcamera.git/
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
Patch0: reproducible.patch
BuildRequires: boost-devel
BuildRequires: c++_compiler
%if 0%{?suse_version} <= 1500
@@ -74,11 +56,6 @@ 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)
@@ -180,9 +157,9 @@ export CXX=g++-11
%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
-Dv4l2=false -Dtracing=disabled \
-Dpipelines=ipu3,rkisp1,simple,uvcvideo,vimc \
-Dlc-compliance=disabled
%meson_build
%install
@@ -192,13 +169,6 @@ cd "%buildroot"
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
@@ -222,9 +192,6 @@ rm -v usr/bin/cam
%_libexecdir/libcamera/
%_libdir/libcamera/
%_datadir/libcamera/
%{_udevrulesdir}/
%{_bindir}/libcamerify
%{_bindir}/lc-compliance
%files -n gstreamer-plugins-libcamera
%_libdir/gstreamer-1.0/