- Nov 08, 2021
-
-
Umang Jain authored
Provide a constructor for StreamBuffer and use that while populating Camera3RequestDescriptor::buffers_ vector. Also provide the default move-constructor (required as StreamBuffer is stored in a vector in Camera3RequestDescriptor) and destructor for the StreamBuffer struct. Also declare a default move assignment operator and disable the copy constructor and move operator explicitly with LIBCAMERA_DISABLE_COPY(). While at it, initialize pointers members in the StreamBuffer struct to nullptr, with StreamBuffer::status set to Status::Success by default. Signed-off-by:
Umang Jain <umang.jain@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Hirokazu Honda <hiroh@chromium.org> Reviewed-by:
Jacopo Mondi <jacopo@jmondi.org>
-
Umang Jain authored
cros::CameraBufferManager can be nullptr if there is an error in its creation. Place a null-check guard to check it. Signed-off-by:
Umang Jain <umang.jain@ideasonboard.com> Reviewed-by:
Hirokazu Honda <hiroh@chromium.org> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-
- Nov 06, 2021
-
-
Jean-Michel Hautbois authored
The IPU3 IPA has three events which are handled from the pipeline handler. The events are received in the sequence, EventProcessControls, EventFillParams, and finally EventStatReady, while the code lists these in a different order. Update the flow of IPAIPU3::processEvent() to match the expected sequence of events, to help support the reader in interpreting the flow of events through the IPA. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Jacopo Mondi <jacopo@jmondi.org>
-
- Nov 04, 2021
-
-
Kieran Bingham authored
The isContiguous debug message is inverted. Correct the logic. Reported-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com> Reviewed-by:
Jacopo Mondi <jacopo@jmondi.org> Reviewed-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
- Nov 02, 2021
-
-
Naushir Patuck authored
The aspect ratio calculation divides two integer values then casts to a double. This might reduce precision when scoring for aspect rato differences. Fix this by casting the integer to a double before the division. Reported-by: Coverity CID=361652 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>
-
Arducam info authored
The necessary tuning file and CamHelper is added for the imx519 sensor. The imx519 is a 16MP rolling shutter sensor. To enable it, please add dtoverlay=imx519 to the /boot/config.txt file and reboot the Pi. Signed-off-by:
Lee Jackson <info@arducam.com> Reviewed-by:
David Plowman <david.plowman@raspberrypi.com> Reviewed-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Naushir Patuck authored
The unicam driver no longer registers an embedded data node if the sensor does not provide this stream. Account for this in the pipeline handler match routine by not assuming it is always present. Add a warning if Unicam and the CamHelper do not agree on the presense of sensor embedded data, and disable its usage in these cases. Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
David Plowman <david.plowman@raspberrypi.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Naushir Patuck authored
With the recent change to switch to programming the sensor device directly, the notion of packed vs unpacked modes are not relevent, since that is a Unicam format construct. Remove any scoring based on packed/unpacked modes. Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
David Plowman <david.plowman@raspberrypi.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Naushir Patuck authored
Switch the pipeline handler to use the new Unicam media controller based driver. With this change, we directly talk to the sensor device driver to set controls and set/get formats in the pipeline handler. This change requires the accompanying Raspberry Pi linux kernel change at https://github.com/raspberrypi/linux/pull/4645 . If this kernel change is not present, the pipeline handler will fail to run with an error message informing the user to update the kernel build. Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Jacopo Mondi <jacopo@jmondi.org> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Naushir Patuck authored
Sensor flips might change the Bayer order of the requested format. The existing code would set a sensor format along with the appropriate Unicam and ISP input formats, but reset the latter two on start() once the flips had been requested. We can now set the sensor flips just before we set the sensor mode in configure(), thereby not needing the second pair of format sets in start(). Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
David Plowman <david.plowman@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Naushir Patuck authored
Add BayerFormat::toPixelFormat() and BayerFormat::fromPixelFormat() helper functions to convert between BayerFormat and PixelFormat types. Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
David Plowman <david.plowman@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> [Kieran: Minor checkstyle fix] Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Naushir Patuck authored
Add BayerFormat conversions for formats::R10 (10-bit unpacked) format. Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Naushir Patuck authored
Rename the bayerToV4l2 conversion table to bayerToFormat. Update the table to hold both the PixelFormat and V4L2PixelFormat conversions for a given BayerFormat. This will allow converting between BayerFormat and PixelFormat types in a subsequent change. Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Laurent Pinchart authored
The unscoped enum BayerFormat::Packing leads to usage of the ambiguous BayerFormat::None enumerator. Turn the enumeration into a scoped enum to force usage of BayerFormat::Packing::None, and drop the now redundant "Packed" suffix for the CSI2 and IPU3 packing. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Naushir Patuck authored
This new formats corresponds to the V4L2 V4L2_PIX_FMT_Y10P format, and is a CSI2-packed version of the DRM_FORMAT_R10 format. Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Laurent Pinchart authored
These new formats corresponds to the V4L2 V4L2_PIX_FMT_Y10 and V4L2_PIX_FMT_Y12 formats, and are the little-endian version of the DRM_FORMAT_R10 and DRM_FORMAT_R12 formats. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Laurent Pinchart authored
Add FourCCs for 10- and 12-bit red format with padding to 16 bits. This is merged in the upstream kernel as 31fa8cbce466 ("drm: Add R10 and R12 FourCC") Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Naushir Patuck <naush@raspberrypi.com> Acked-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
- Oct 30, 2021
-
-
Laurent Pinchart authored
Following a conversation on the mailing list about the use of assertions, document the error handling strategy in libcamera. This is an initial set of rules that are expected be extended and detailed in the future. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Laurent Pinchart authored
When the IPU3 pipeline handler is disabled, the corresponding IPA module isn't compiled, which results in the meson ipu3_ipa_sources variable to be undefined. The variable is used unconditionally as part of the Doxygen inputs, so Meson complains at configuration time that it is undefined. Fix it by including the IPU3 IPA documentation in the Doxygen build only when the IPU3 pipeline handler is enabled. Fixes: 45dd5198 ("Documentation: Include IPU3 in Doxygen build") Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
- Oct 27, 2021
-
-
Kieran Bingham authored
The PixelFormat::toString() has two \return statements in its doxygen documentation. Remove the redundant one. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-
Kieran Bingham authored
The V4L2Capability has helpers to interogate the capabilities of a device. V4L2VideoDevice::enumPixelformats accesses the raw capabilites to check if the device is supported by a MediaController device. Provide a helper, and update the usage. Reviewed-by:
Naushir Patuck <naush@raspberrypi.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
- Oct 26, 2021
-
-
Jean-Michel Hautbois authored
In case the maximum exposure received from the sensor is very high, we can have a very high shutter speed with a small analogue gain, and it may result in very slow framerate. We are not really supporting it for the moment, so clamp the shutter speed to an arbitrary value of 60ms. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Tested-by:
Umang Jain <umang.jain@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Kieran Bingham authored
The IPAFrameContext uses unnamed structures to group items. Doxygen doesn't seem to support this properly, documentation isn't properly generated and warnings are output during compilation. Suppress the warning with a workaround that still results in incorrect generated documentation until Doxygen gets fixed. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> [JMH: Fix doxygen variable usage] Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Kieran Bingham authored
The IPU3 is documented using Doxygen within the code. Include the IPU3 IPA as part of the doxygen build sources. This will ideally be split to its own 'section' of the doxygen output. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-
Jean-Michel Hautbois authored
While the stop() function does not currently perform any action, it forms part of the IPA interface and is a public function in the class. Promote it to a full (but basic) function implementation and begin the documentation accordingly so that there is an appropriate stub to perform stop operations if they come up. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com>
-
Jean-Michel Hautbois authored
Doxygen warns us because the structures are referenced as \struct while they should be \var. Fix it. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Kieran Bingham authored
The IPU3 IPA core is growing with additional documentation. The ipa_context documentation is stored here, but it pushes the IPU3 documentation and implementation further from the head of the file. Furthermore, the ipa_context documentation is outside of the ipa::ipu3 namespace and isn't identified correctly by Doxygen. Move the ipa_context to its own compilation object even though there isn't any code, but to maintain consistency with our documentation model. Correctly re-introduce the documentation into the libcamera::ipa::ipu3 namespace during the move. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
-
Kieran Bingham authored
The struct RGB and struct AwbStatus are used only by the internal implementation of the AWB algorithm module. Move them into the private class declaration. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
-
Kieran Bingham authored
The AWB AwbStatus structure is contained within the Awb class. Fix the Doxygen reference so that it can be found. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
-
Kieran Bingham authored
The ipa_context.h entry incorrectly referenced its file name. Fix it. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
-
Kieran Bingham authored
The IPU3 IPA implements the basic 3A using the ImgU ISP. Provide an overview document to describe its operations, and provide a block diagram to help visualise how the components are put together to assist any new developers exploring the code. Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
-
Jean-Michel Hautbois authored
The tone mapping algorithm is currently undocumented. Provide an introduction and overview to the implementation as the class definition and document how the algorithm operates in the process and prepare methods. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Jean-Michel Hautbois authored
Let the algorithm perform its initial configuration. Implement configure() to set a default gamma value and let process do the updates needed. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Jean-Michel Hautbois authored
The tone mapping algorithm calculates the gamma curve for every frame, regardless of whether the gamma value has changed or not. This issue is exasperated as we currently hardcode the gamma to a single value. Optimise the implementation to only recalculate the look up table when the gamma setting is changed, and store the gamma setting of the LUT curve as part of the IPA context. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Jean-Michel Hautbois authored
The AGC class was not documented while developing. Extend that to reference the origins of the implementation, and improve the descriptions on how the algorithm operates internally. While at it, rename the functions which have bad names. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Jean-Michel Hautbois authored
Now that we moved the diagram into the AWB class documentation, reword the accumulator documentation to make it clear it is not meant to be used only in AWB. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com>
-
Jean-Michel Hautbois authored
The AWB algorithm is based on the Grey world algorithm and uses the statistics generated by the ImgU for that. Explain how it uses those, and reference the original algorithm at the same time. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-
Jean-Michel Hautbois authored
The stats pointer is marked as [[maybe_unused]]. This is a leftover from a previous commit which was here to keep the compatibility while transitioning to the new iterative algorithms. Remove this attribute to make it explicit that stats are really used to feed the algorithms. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com>
-
Jean-Michel Hautbois authored
Clarify the roles and interactions between the pipeline handler events and the algorithm calls by documenting all the remaining functions of the class. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com>
-
Jean-Michel Hautbois authored
Further extend the documentation for the IPAIPU3::configure operation. Signed-off-by:
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Signed-off-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by:
Umang Jain <umang.jain@ideasonboard.com>
-