summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2024-06-25libcamera: camera_sensor: Sort factories by priorityLaurent Pinchart
In order to support a default implementation for camera sensors when no better implementation matches, libcamera needs to try "specialized" implementations first and pick the default last. Make this possible by adding a priority value for factories. Newly registered factories are inserted in the factories list sorted by descending priority, and the default factory uses a negative priority to be inserted as the last element. This mechanism may be a bit overkill in the sense that there is no expected use cases for priorities other than trying the default last, but the implementation is simple and easy to understand. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> --- Changes since combined RFC: - Make the factory priority mandatory
2024-06-25libcamera: camera_sensor: Create abstract base classLaurent Pinchart
With a camera sensor factory in place, the next step is to create an abstract base class that all camera sensors implement, providing a uniform API to pipeline handler. Turn all public functions of the CameraSensor class into pure virtual functions, and move the implementation to the CameraSensorLegacy class. Part of the code is likely worth keeping as common helpers in a base class. However, to follow the principle of not designing helpers with a single user, this commit moves the whole implementation. Common helpers will be introduced later, along with other CameraSensor subclasses. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-06-25libcamera: camera_sensor: Introduce CameraSensorFactoryJacopo Mondi
Introduce a factory to create CameraSensor derived classes instances by inspecting the sensor media entity name and provide a convenience macro to register specialized sensor handlers. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> --- Changes since combined RFC: - Fix indentation in REGISTER_CAMERA_SENSOR() macro
2024-06-25libcamera: v4l2_videodevice: Update to the new kernel metadata APILaurent Pinchart
With support for metadata in the streams API, the v4l2_meta_format structure has been extended with width, height and bytesperline fields. Support them in the V4L2VideoDevice getFormat() and setFormat() functions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-25libcamera: v4l2_subdevice: Add new metadata formatsLaurent Pinchart
Support the newly introduced V4L2 media bus formats for metadata. This includes generic metadata formats, and two sensor-specific embedded data formats. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-25v4l2: v4l2_compat: Move `open*()` flag check into functionBarnabás Pőcze
This commit moves the check that determines whether the mode argument of `open*()` exists into a separate function. With that, the check is fixed because previously it failed to account for the fact that `O_TMPFILE` is not a power of two. Furthermore, add `assert()`s in the fortified variants that ensure that no mode is required by the specified flags. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-25v4l2: v4l2_compat: Fix redirect from `__open(at)64_2()`Barnabás Pőcze
To avoid confusion, have `__open64_2()` and `__openat64_2()` delegate to `open64()` and `openat64()`, respectively, instead of `open()` and `openat()`. This does not change the behaviour because `V4L2CompatManager::instance()->openat()` calls `openat64()` internally, and that adds the `O_LARGEFILE` flag unconditionally. Fixes: 1023107b6405 ("v4l2: v4l2_compat: Intercept open64, openat64, and mmap64") Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-24ipa: libipa: matrix: Fix incorrect symbol namespaceLaurent Pinchart
The matrixVlidateYaml() function is declared in the libcamera::ipa:: namespace, but defined in the libcamera:: namespace. This causes a dynamic linking error at runtime. Fix it by moving the function definition. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-24libcamera: yaml_parser: Add support for float typesLaurent Pinchart
The YamlObject::get<T>() function template has a specialization for double but not for float. When used in an IPA module, the issue is caught at module load time only, when dynamic links are resolved, causing errors such as Failed to open IPA module shared object: /usr/lib/libcamera/ipa_rkisp1.so: undefined symbol: _ZNK9libcamera10YamlObject6GetterIfE3getERK_ Fix it by adding a float specialization. The alternative would be to use double only in IPA modules, but the lack of enforcement at compile time makes this dangerous. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-06-24ipa: rkisp1: agc: Rename frame context update variable to updateMeteringLaurent Pinchart
The frame context agc.update variable is used to indicate if the ISP histogram metering parameters need to be updated. Rename it to updateMetering to make usage more explicit. Suggested-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-19libcamera: debayer_cpu: Add 32bits/aligned output formatsRobert Mader
In order to be more compatible with modern hardware and APIs. This notably allows GL implementations to directly import the buffers more often and seems to be required for Wayland. Further more, as we already enforce a 8 byte stride, these formats work better for clients that don't support padding - such as libwebrtc at the time of writing. Tested devices: - Librem5 - PinePhone - Thinkpad X13s Signed-off-by: Robert Mader <robert.mader@collabora.com> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-18ipa: libipa: pwl: Drop readYaml() functionLaurent Pinchart
All users of the Pwl::readYaml() function have been removed. The function is not used, and is deprecated in favour of YamlObject::get(). Drop it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-18ipa: rpi: controller: Replace Pwl::readYaml() with YamlObject::get()Laurent Pinchart
Now that deserializing a Pwl object from YAML data is possible using the YamlObject::get() function, replace all usage of Pwl::readYaml() to prepare for its removal. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # On Raspberry Pi 4
2024-06-17ipa: rkisp1: agc: Move AeEnable control to the AGC algorithmLaurent Pinchart
The AGC algorithm implements the AeEnable control at runtime. Move the declaration of the control from the IPA module to the algorithm. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-17ipa: rkisp1: agc: Correctly clamp maximum shutter speedLaurent Pinchart
The sensor's maximum shutter speed is clamped by the maximum frame duration specified in requests. If the requested maximum frame duration is lower than the sensor's minimum shutter speed, the Agc::process() function will pass a minimum value higher than the maximum to the setLimits() function, resulting in an assertion failure. Fix it by clamping the value to both the lower and the upper bounds. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-17ipa: rkisp1: agc: Rename maxShutterSpeed to maxFrameDurationLaurent Pinchart
The AGC active state and frame context both contain a variable named maxShutterSpeed. The variable is used to limit the maximum shutter speed when computing the exposure time and gains, but stores the maximum frame duration, not clamped by the sensor's maximum shutter speed. Rename it to maxFrameDuration. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-17ipa: rkisp1: agc: Use mode from frame context to calculate new EVLaurent Pinchart
The effective exposure value for each frame is split into shutter time, analog gain and digital gain based on the AGC constraint mode and exposure mode. The algorithm uses the modes from the active state, which tracks the latest queued request, instead of the frame context, which tracks the value of the controls requested for that frame. Fix it by using the correct modes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-17ipa: rkisp1: agc: Simplify predivider calculationLaurent Pinchart
The condition if (std::pow(std::floor(root), 2) < factor) predivider = static_cast<uint8_t>(std::ceil(root)); else predivider = static_cast<uint8_t>(std::floor(root)); can only be false when the factor's root is an integer. In that case, std::ceil(root) and std::floor(root) will be equal. The computation can thus be simplified by always rounding up. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-17ipa: rkisp1: agc: Don't update histogram parameters unnecessarilyLaurent Pinchart
The ISP histogram parameters depends on the AE metering mode, but not on the other AE algorithm controls. The exposure mode, constraints mode and frame duration limits influence the behaviour of the algorithm, but not the histogram computation parameters. Update the histogram parameters only when AE metering mode changes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-17ipa: rkisp1: agc: Make size argument to computeHistogramPredivider constLaurent Pinchart
The Agc::computeHistogramPredivider() function doesn't need to modify its size parameter. Make it const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-17ipa: rkisp1: Document all AGC parameters in IPAFrameContextLaurent Pinchart
The IPAFrameContext AGC documentation is lagging behind the implementation and misses many variables. Document them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-17ipa: rkisp1: Document all AGC parameters in IPAActiveStateLaurent Pinchart
The IPAActiveState AGC documentation is lagging behind the implementation and misses many variables. Document them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-17ipa: libipa: agc_mean_luminance: Include missing headerLaurent Pinchart
agc_mean_luminance.h uses utils::Duration, include the corresponding header. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
2024-06-17ipa: libipa: agc_mean_luminance: Fix enumerator namesLaurent Pinchart
Enumerators in libcamera start with an upper case letter. Fix the AgcConstraint::Bound enumerators. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
2024-06-17ipa: rkisp1: agc: Fix initialization without metering modesLaurent Pinchart
When no metering modes are specified in the tuning file, the AGC initialzation fails with [0:00:46.148508875] [209] ERROR RkISP1Agc agc.cpp:46 'AeMeteringMode' parameter not found in tuning file which results in a camera initialization failure. Fix it by downgrading the error into a warning, and continuing the AGC initialization with the default metering mode. Fixes: 35233938ee5d ("ipa: rkisp1: agc: Read histogram weights from tuning file") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-17ipa: libipa: vector: Add matrix-vector multiplicationPaul Elder
Add an operation for multiplying a matrix with a vector. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-17ipa: rkisp1: algorithms: Add crosstalk algorithmPaul Elder
Add an algorithm module to the rkisp1 IPA for crosstalk correction. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-17ipa: libipa: Add MatrixInterpolator classPaul Elder
Add a class to encapsulate the functionality of fetching a matrix based on an integer key, and interpolating if there is no exact match. This is expected to be used by both color correction matrices / crosstalk correction as well as lens shading correction. A cache is included only for exact matches of the key. The caller is expected to decide the tolererance for rounding. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-17ipa: libipa: Add Matrix classPaul Elder
Add a class to represent a Matrix object and operations for adding matrices, multipling a matrix by a scalar, and multiplying two matrices. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-16ipa: libipa: pwl: Specialize YamlObject getterLaurent Pinchart
Implement a specialization of the YamlObject::Getter structure to support deserializing ipa::Pwl objects from YAML data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-16ipa: libipa: pwl: Add a constructor that moves a Point vectorLaurent Pinchart
The Pwl::Pwl(const std::vector<Point> &) constructor is inefficient as it makes a copy of the given points vector. Add a second constructor that takes an rvalue reference to a points vector to provide move semantics. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-16ipa: libipa: pwl: Add a size() functionLaurent Pinchart
Add a size() function to the Pwl class to return the number of points in the piecewise linear function. This is useful, for instance, to validate that all points added with append() or prepend() have been taken into account. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-16ipa: libipa: pwl: Make the empty() function inlineLaurent Pinchart
The Pwl::empty() function is a one-liner that can be easily optimized by the compiler given the chance. Make it inline. While at it, move the function documentation block to match the class declaration order. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-16ipa: libipa: pwl: Suffix \param with directionLaurent Pinchart
Suffix the Doxygen \param commands with the direction for all parameters. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-16ipa: libipa: vector: Drop readYaml() functionLaurent Pinchart
Now that YAML deserialization of Vector instances is supported through YamlObject::get(), remove the Vector::readYaml() function. It turns out not to be used. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-16ipa: libipa: vector: Specialize YamlObject getterLaurent Pinchart
Implement a specialization of the YamlObject::Getter structure to support deserializing ipa::Vector objects from YAML data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-06-16libcamera: yaml_parser: Delegate YamlObject::get() to helper structureLaurent Pinchart
The YamlObject::get() function is a function template that gets fully specialized for various types. This works fine for non-template types, but specializing it for template types (e.g. a std::vector<U>) would require partial template specialization, which C++ allows for classes and variables but not functions. To work around this problem, delegate the implementation to a new YamlObject::Getter structure template, which will support partial specialization. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-14ipa: rkisp1: agc: Plumb mode-selection and frame duration controlsPaul Elder
Plumb controls for setting metering mode, exposure mode, constraint mode, and frame duration limits. Also report them as available controls, as well as in metadata. While at it, add the missing #include for tuple, as a std::tie is used. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-14ipa: rkisp1: agc: Read histogram weights from tuning filePaul Elder
Add support to the rkisp1 AGC to read histogram weights from the tuning file. As controls for selecting the metering mode are not yet supported, for now hardcode the matrix metering mode, which is the same as what the AGC previously hardcoded. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
2024-06-13ipa: rkisp1: cproc: Drop incorrect [[maybe_unused]]Stefan Klug
A few function parameters are marked with [[maybe_unused]] but are actually used. Drop the attribute. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-13ipa: rkisp1: cproc: Merge identical functionsStefan Klug
convertContrast() and convertSaturation() are equal. Merge them into one. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-13ipa: rkisp1: cproc: Use anonymous namespace to limit symbol visibilityStefan Klug
Use a anonymous namespace instead of the static keyword to limity symbol visibility. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-13pipeline: rpi: Don't validate configuration in generateConfiguration()Naushir Patuck
generateConfiguration() called validate() as a final step, causing the stride and frameSize fields in StreamConfiguration to be filled in based on the pixel format and width/height. If a user application did not clear the stride field when setting up a custom pixel format and width/height, the pipeline handler would respect this stride and possibly overallocate buffers with a larger stride than needed. Fix this by removing the call to validate() completely, leaving the stride and frameSize fields defaulting to 0. Removal of this call is inconsequential as we hard-code a valid configuration for Raspberry Pi platforms in generateConfiguration(). Bug: https://github.com/raspberrypi/libcamera/issues/138 Bug: https://github.com/raspberrypi/libcamera/issues/141 Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-13libcamera: yaml_parser: Make default value templated in `get()`Barnabás Pőcze
This way the construction of the default value of type `T` can be delayed until it is really needed, which is useful, for example when `T == std::string` and the default value comes from a string literal, as the default value string would always be constructed otherwise, even if not needed. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-06-13libcamera: libipa: camera_sensor: Define AR0521 helper functions inlineLaurent Pinchart
All CameraSensorHelper subclasses define their member functions inline, except for the CameraSensorHelperAr0521 class. Inline the gainCode() and gain() functions to match the other classes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-12libcamera: controls: Add missing period at end of Gamma descriptionLaurent Pinchart
The last sentence of the Gamma control description misses the final period. Add it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-12ipa: rkisp1: goc: Avoid use of auto for short typeLaurent Pinchart
Replace one occurrence of the auto type qualifier with the explicit type it represents to increase readability. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-12ipa: rkisp1: goc: Mark default gamma table as static constexprLaurent Pinchart
The values for the default gamma table are stored in an array that is never modified. Mark it as static constexpr to facilitate optimizations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-12ipa: rkisp1: goc: Use copydocLaurent Pinchart
Use the Doygen \copydoc command instead of duplicating documentation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-12ipa: rkisp1: goc: Drop incorrect [[maybe_unused]]Laurent Pinchart
A few function parameters are marked with [[maybe_unused]] but are actually used. Drop the attribute. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>