diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2025-04-03 14:38:25 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2025-04-03 14:38:25 +0100 |
commit | 058f589ae36170935e537910f2c303b1c3ea03b3 (patch) | |
tree | 1e9b753c4a55e2ad50e087dd8b0245edcf8da3d0 /test/py/unittests.py | |
parent | 80ac19a50795dea80c4bad33588e1fc6df1ef3e6 (diff) |
libcamera v0.5.0v0.5.0
The abi-compliance-checker reports there are both ABI and API changes in this
release:
Binary compatibility: 99%
Source compatibility: 99.5%
Total binary compatibility problems: 5, warnings: 1
Total source compatibility problems: 6, warnings: 1
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. I had hoped to get a longer run for 0.4
series...
A full and detailed ABI report for those interested can always be generated
between any two versions with the internal tooling:
"./utils/abi-compat.sh v0.4.0 v0.5.0"
Integration overview:
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.
The following commits in this release relate to either a bug fix or an
improvement to an existing commit.
- DmaBufAllocator: Make DmaSyncer non-copyable
- Fixes: 39482d59fe71 ("DmaBufAllocator: Add Dma Buffer synchronization function & helper class")
- utils: codegen: controls.py: Fix missing direction error message
- Fixes: 39fe4ad96803 ("utils: codegen: controls.py: Parse direction information")
- Thread: Fix setThreadAffinity race condition in start
- Fixes: 4d9db06d6690 ("libcamera: add method to set thread affinity")
- meson: Don't override pipeline list when `auto` is selected
- Bug: https://bugs.libcamera.org/show_bug.cgi?id=247
- DmaBufAllocator: Avoid syncing with an inva/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2020, Google Inc.
*
* span.cpp - Span tests
*/
/*
* Include first to ensure the header is self-contained, as there's no span.cpp
* in libcamera.
*/
#include <libcamera/span.h>
#include <array>
#include <iostream>
#include <vector>
#include "test.h"
using namespace std;
using namespace libcamera;
class SpanTest : public Test
{
protected:
int run()
{
int i[4]{ 1, 2, 3, 4 };
std::array<int, 4> a{ 1, 2, 3, 4 };
const std::array<int, 4> ca{ 1, 2, 3, 4 };
std::vector<int> v{ 1, 2, 3, 4 };
const std::vector<int> cv{ 1, 2, 3, 4 };
/*
* Compile-test construction and usage of spans with static
* extent. Commented-out tests are expected not to compile, or
* to generate undefined behaviour.
*/
Span<int, 0>{};
/* Span<int, 4>{}; */
Span<int, 4>{ &i[0], 4 };
Span<int, 4>{ &i[0], &i[3] };
Span<int, 4>{ i };
/* Span<float, 4>{ i }; */
/* Span<int, 2>{ i }; */
Span<int, 4>{ a };
Span<const int, 4>{ a };
/* Span<float, 4>{ a }; */
/* Span<int, 2>{ a }; */
Span<const int, 4>{ ca };
/* Span<const int, 2>{ ca }; */
/* Span<const float, 4>{ ca }; */
/* Span<int, 4>{ ca }; */
Span<int, 4>{ v };
Span<const int, 4>{ v };
/* Span<float, 4>{ v }; */
Span<const int, 4>{ v };
/* Span<int, 4>{ v }; */
/* Span<const float, 4>{ v }; */
Span<int, 4> staticSpan{ i };
Span<int, 4>{ staticSpan };
Span<const int, 4>{ staticSpan };
/* Span<const int, 2>{ staticSpan }; */
staticSpan = Span<int, 4>{ v };
staticSpan.begin();
staticSpan.cbegin();
staticSpan.end();
staticSpan.cend();
staticSpan.rbegin();
staticSpan.crbegin();
staticSpan.rend();
staticSpan.crend();
staticSpan.front();
staticSpan.back();
staticSpan[0];
staticSpan.data();
staticSpan.size();
staticSpan.size_bytes();
staticSpan.empty();
staticSpan.first<2>();
staticSpan.first(2);
/* staticSpan.first<6>(); */
/* staticSpan.first(6); */
staticSpan.last<2>();
staticSpan.last(2);
/* staticSpan.last<6>(); */
/* staticSpan.last(6); */
staticSpan.subspan<1>();
staticSpan.subspan<1, 2>();
staticSpan.subspan(1);
staticSpan.subspan(1, 2);
/* staticSpan.subspan(2, 4); */
/*
* Compile-test construction and usage of spans with static
* extent. Commented-out tests are expected not to compile, or
* to generate undefined behaviour.
*/
Span<int>{};
Span<int>{ &i[0], 4 };
Span<int>{ &i[0], &i[3] };
Span<int>{ i };
/* Span<float>{ i }; */
Span<int>{ a };
Span<const int>{ a };
/* Span<float>{ a }; */
Span<const int>{ ca };
/* Span<const float>{ca}; */
/* Span<int>{ca}; */
Span<int>{ v };
Span<const int>{ v };
/* Span<float>{ v }; */
Span<const int>{ v };
/* Span<int>{ v }; */
/* Span<const float>{ v }; */
Span<int> dynamicSpan{ i };
Span<int>{ dynamicSpan };
Span<const int>{ dynamicSpan };
dynamicSpan = Span<int>{ a };
dynamicSpan.begin();
dynamicSpan.cbegin();
dynamicSpan.end();
dynamicSpan.cend();
dynamicSpan.rbegin();
dynamicSpan.crbegin();
dynamicSpan.rend();
dynamicSpan.crend();
dynamicSpan.front();
dynamicSpan.back();
dynamicSpan[0];
dynamicSpan.data();
dynamicSpan.size();
dynamicSpan.size_bytes();
dynamicSpan.empty();
dynamicSpan.first<2>();
dynamicSpan.first(2);
/* dynamicSpan.first<6>(); */
/* dynamicSpan.first(6); */
dynamicSpan.last<2>();
dynamicSpan.last(2);
/* dynamicSpan.last<6>(); */
/* dynamicSpan.last(6); */
dynamicSpan.subspan<1>();
dynamicSpan.subspan<1, 2>();
dynamicSpan.subspan(1);
dynamicSpan.subspan(1, 2);
/* dynamicSpan.subspan(2, 4); */
return TestPass;
}
};
TEST_REGISTER(SpanTest)