Age | Commit message (Collapse) | Author |
|
The CameraSensor::validateSensorDriver() function prints a Warning
message when the camera sensor doesn't support flips. We don't mandate
flip support and can run without it without any problem, so a warning is
too harsh. Demote it to a Debug message.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
The VC4 ISP uses a pipeline bit-depth of 13-bits. The AGC algorithm needs to
know this bit-depth when computing the Y value for the image.
Instead of hardcoding the VC4 bit-depth in the AGC source code, normalise all
region sums to 16-bits when filling the Statistics structure. AWB and ALSC are
agnostic about pipeline depth, so do not need changing.
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>
|
|
Repurpose the StatisticsPtr type from being a shared_ptr<bcm2835_isp_stats> to
shared_ptr<RPiController::Statistics>. This removes any hardware specific header
files and structures from the algorithms source code.
Add a new function in the Raspberry Pi IPA to populate the generic statistics
structure from the values provided by the hardware in the bcm2835_isp_stats
structure.
Update the Lux, AWB, AGC, ALSC, Contrast, and Focus algorithms to use the
generic statistics structure appropriately in their calculations. Additionally,
remove references to any hardware specific headers and defines in these source
files.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Tested-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Release the statistics buffer after running the through the AWB calculations.
Only the "counted" statistics are copied out to a local structure, so keeping
the statistics buffer allows the algorithm to see the "uncounted" statistics as
well.
This is currently handled by hard-coding the total number of statistics regions
regions based on the structure definition in the bcm2835_isp_stats structure.
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>
|
|
Add a default constructor to the RPiController::Histogram class that creates
an empty histogram. Since this is a cumulative histogram, push a value of 0 into
the first (and only) bin to signify this.
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>
|
|
At present, the controller algorithms access the bcm2835_isp_stats structure,
which is hardware specific. It would be desirable to abstract out the statistics
structure to remove hardware specific headers from the algorithms source files.
Define a new templated RegionStats class that encompasses region based
statistics generated by the ISP. For the VC4 ISP, this can be used to hold
RGB sums and focus FoM values.
Define a new Statistics structure that holds all the VC4 ISP statistics output.
This includes AGC histograms, AGC/AWB region sums and focus FoM regions.
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>
|
|
Add a new pipeline config parameter "disable_startup_frame_drops" to
disable any startup drop frames, overriding the IPA request.
When this parameter is set, it allows the pipeline handler to run with
no internally allocated Unicam buffers ("min_unicam_buffers").
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>
|
|
Add the ability to read the platform configuration parameters from a
config file provided by the user through the LIBCAMERA_RPI_CONFIG_FILE
environment variable. Use the PipelineHandler::configurationFile()
helper to determine the full path of the file.
Provide an example configuration file named example.yaml. Currently two
parameters are available through the json file:
"min_unicam_buffers" The minimum number of internal Unicam buffers to
allocate.
"min_total_unicam_buffers" The minimum number of internal + external
Unicam buffers that must be allocated.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Reorder the code such that the IPA requested startup drop frames count is
available before the pipeline handler allocates any stream buffers.
This will be used in a subsequent change to stop Unicam buffer allocations if
there are no startup drop frames required and the application has configured a
raw stream and always provides buffers for it.
Signed-off-by: Naushir Patuck <naush@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>
|
|
Add a configuration structure to store platform specific parameters used by
the pipeline handler. Currently, these only store Unicam buffer counts,
replacing the hardcoded static values in the source code.
In subsequent commits, more parameters will be added to the configuration
structure, and parameters will be read in through a config file.
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>
|
|
Add a new helper function PipelineHandler::configurationFile() that returns
the full path of a named configuration file. This configuration file may be read
by pipeline handlers for platform specific configuration parameters on
initialisation.
The mechanism for searching for the configuration file is similar to the IPA
configuration file:
- In the source tree if libcamera is not installed
- Otherwise in standard system locations (etc and share directories).
When stored in the source tree, configuration files shall be located in a 'data'
subdirectory of their respective pipeline handler directory.
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>
|
|
Add a pipeline_data_dir variable to the meson build files. This variable
points to the location of pipeline handler specific configuration files
on the filesystem.
Signed-off-by: Naushir Patuck <naush@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>
|
|
We implement a custom validateColorSpaces method that forces all
(non-raw) streams to same colour space, whilst distinguishing RGB
streams from YUV ones, as the former must have the YCbCr encoding and
range over-written.
When we apply the colour space, we always send the full YUV version as
that gets converted correctly to what our hardware drivers expect. It
is also careful to check what comes back as the YCbCr information gets
overwritten again on the way back.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
Add support for Raspberry Pi Camera 3 modules (Sony IMX708 camera sensor) to the
Raspberry Pi IPA. These modules are available in either normal or wide angle
lens, both with IR or no IR cut options, giving a total for 4 variants. Provide
IQ tuning files for all four variants.
The IMX708 camera helper additionally parses PDAF and HDR histogram data that
is provided in the embedded data stream from Unicam.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add CameraSensorProperties for the Sony IMX708 sensor.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-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>
|
|
Add the current frame's lens position (in dioptres) to the DeviceStatus
structure. This value is obtained from the AfAlgorithm::getLensPosition()
member function. Return this lens position back to the pipeline handler to
store in the metadata field of the request.
As a drive-by, fixup some inaccurate comments in the DeviceStatus structure.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Nick Hollinghurst nick.hollinghurst@raspberrypi.com
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Provide the first version of the Raspberry Pi autofocus algorithm. This
implementation uses a hybrid of contrast detect autofocus (CDAF) and phase
detect autofocus (PDAF) statistics. PDAF is always preferred over CDAF due to
having less "hunting" behavior.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Handle the results returned from the autofocus algorithm by updating lens
actuator position to the desired value. Update the Request metadata with the
algorithm status to provide back to the application.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add handlers for all autofocus related libcamera controls. Translate these
controls to the RPiController autofocus algorithm API.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add all the autofocus controls handled by the IPA into the ControlInfoMap if
a controllable lens actuator is present.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Reorder the libcamera/request header file inclusion to match the libcamera
guidelines.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a new AfAlgorithm class that defines the interface for the Raspberry Pi
autofocus algorithm.
Add an AfStatus structure that returns the results of the autofocus algorithm
back to the IPA.
Add a structure for PDAF statistics provided by supported sensors for use with
an autofocus algorithm. This structure is currently based on the IMX708's PDAF
"Type 1" statistics.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a setLensControls() function to the IPA/pipeline handler interface. This
will be used in a future commit to control the lens actuator position from an
autofocus algorithm.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Pass the available lens controls to the IPA through the configure() function.
Validate that the V4L2_CID_FOCUS_ABSOLUTE does exist. If it doesn't, log a
warning message, and do not advertise focus related controls from the IPA.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Replace the legacy entityControls map passed into ipa::configure() with explicit
fields for sensor and ISP controls. This removes any ambiguity over which set of
controls corresponds with specific integer keys.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Remove the streamConfig parameter from the ipa::configure() call, it is never
used.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Check if a lens actuator is available by the presense of the lens driver entity
in the pipeline handler. Pass this result to the IPA on init.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Previously the x,y offsets in the min/max ScalerCrop control values
were zero. Here we make them the same as the sensor's analogue crop
offset which is I think less misleading.
With this change, it also seems reasonable to advertise the default
scaler crop value to be the true default that you will get. This makes
it possible for applications to see what that value will be without
having to start the camera and wait for frames.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add support for Transform to the RkISP1 pipeline handler.
The pipeline rotates using the sensor's V/H flips, hence use the
CameraSensor helpers to handle transformation requests from
applications.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Augment the CameraSensor::setFormat() function to configure horizontal
and vertical flips before applying the image format on the sensor.
Applying flips before format is crucial as they might change the Bayer
pattern ordering.
To allow users of the CameraSensor class to specify a Transform,
add to the V4L2SubdeviceFormat class a 'transform' member, by
default initialized to Transform::Identity.
Moving the handling of H/V flips to the CameraSensor class allows to
remove quite some boilerplate code from the IPU3 and RaspberryPi
pipeline handlers.
No functional changes intended.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
|
|
The two pipeline handlers that currently support Transform (IPU3 and
RaspberryPi) implement it by operating H/V flips on the image sensor.
Centralize the code that validates a Transform request against the
sensor rotation capabilities in the CameraSensor class.
The implementation in the IPU3 pipeline handler was copied from the
RaspberryPi implementation, and is now centralized in CameraSensor to
make it easier for other platforms.
The CameraSensor::validateTransform() implementation comes directly from
the RaspberryPi pipeline handler, no functional changes intended.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
|
|
During the camera sensor driver validation, verify if the sensor
supports horizontal and vertical flips and store a flag as
CameraSensor::supportFlips_ class member.
The flag will be later inspected when applying flips.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
|
|
Support for the OmniVision OV8858 sensor is scheduled for inclusion in
the Linux kernel in version v6.3.
Add support for the sensor in libcamera by providing static properties
and a camera sensor helper in libipa.
The camera sensor helper expresses analogue gain increments in 1/128
step which differs from what is reported in the sensor documentation in
section "5.8 manual exposure compensation/ manual gain compensation" [0]
A more detailed analysis of the sensor gain model is reported at:
https://patchwork.linuxtv.org/project/linux-media/patch/20221106171129.166892-2-nicholas@rothemail.net/#142267
Record with a \todo note a reference to discussion on the gain model
implementation.
Signed-off-by: Nicholas Roth <nicholas@rothemail.net>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Omnivision OV4689 sensor driver exposes maximum analogue gain of
16x. Raise kMaxAnalogueGain to 16.0, so that the full gain range can
be used.
Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
|
Add a minimal tuning file for Omnivision OV4689, specifying black
level subtraction level.
Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
|
Add an entry to the sensor properties for Omnivision OV4689.
Kernel supports two more types of color bars patterns, which we do not
expose now.
Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
|
Add support for Omnivision OV4689 image sensor to libipa.
The sensor implements a linear gain equation with analogue gain
control values 0-2047 corresponding to 0x-16x physical gain range.
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
|
The intention is that the "main" colour space is the colour space of
the largest non-raw stream. Unfortunately the use of "config_[i].size"
is clearly incorrect, and has been copied from prior versions of the
code. This patch corrects the error.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
When an IPA module is loaded, the loadIPAModuleInfo() function validates
the ipaModuleInfo structure. As part of that process, it checks that the
ipaModuleInfo symbol size matches the expected structure size. This
check breaks with clang and ASan, as the LLVM's address sanitizer
implementation includes the redzone after the structure in the symbol
size, currently growing it by 156 bytes (on x86-64). This causes all IPA
modules to fail to load.
Fix the problem by relaxing the size check to only ensure that the
symbol is large enough to contain the structure.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Currently, if there are multiple streams, the --metadata flag will print
the metadata for each request multiple times.
Moving the metadata print logic outside the stream for loop this will no
longer occur.
Signed-off-by: Daniel Oakley <daniel.oakley@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Comply with a checkstyle suggestion and separate inclusion directives.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The current documentation of the BayerFormat::transform() function
reports examples on the Bayer components ordering transformation for
horizontal flip (mirroring) but not for vertical flip or for the
combination of the two.
It is useful to complete the documentation to ease understanding of the
transform() function on a sensor's Bayer pattern.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Not all C libraries include support for locale objects (locale_t) and
the strto*_l() family of functions. A notable example is uClibc that can
be compiled with a hardcoded "C" locale. Compilation then fails as the
newlocale(), freelocale() and strtod_l() functions are not defined.
Fix the compilation breakage by checking for the availability of the
locale_t type, and fall back to strtod() when the type isn't available.
This may not lead to the correct result if support for locale objects
isn't available and the locale isn't hardcoded to "C", but that is such
a corner case that we will likely never encounter it.
Fixes: e8ae254970cf ("libcamera: yaml_parser: Use C locale")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
|
The strtod() function is locale-dependent, and thus ill-suited to parse
numbers coming from, for instance, YAML files. The YamlObject class uses
strtod_l() to fix that issue, but that function is not available with
all libc implementations. Correctly handling this problem is becoming
out of scope for the YamlObject class.
As a first step, add a strtod() helper function in the utils namespace
that copies the implementation from YamlObject, and use it in
YamlObject. The core issue will then be fixed in utils::strtod().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Fixes build failure on some build environments.
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
When parsing configuration files on systems with differing locales, the
use of strtod can produce different results, or in the worst case - fail
to parse expected values.
Fix this by using strtod_l() instead. To avoid constructing and
destructing a locale_t instance for every use of strtod_l(), create an
RAII class that wraps the locale_t and use it to provide a global "C"
locale.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=174
Bug: https://github.com/raspberrypi/libcamera/issues/29
Reported-by: https://github.com/kralo
Reported-by: Hannes Winkler <hanneswinkler2000@web.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The raw pixel format in form of the fourcc integer is not easily readable.
Use the string representation instead for easier debugging.
Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>
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>
|
|
Bayer8 support is useful on hardware such as Librem 5, as GStreamer
provides easy solution for debayering and display of the camera
data. Add necessary glue to libcamerasrc element.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Fix various typos in the code base.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The imx477_scientific.json file was added to the source tree with
incorrect executable permission. Fix it.
Fixes: bf66a1d25162 ("ipa: raspberrypi: Add a "scientific" tuning for the IMX477")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|