Age | Commit message (Collapse) | Author |
|
The IPU3 IPA interface does not define a return value from configure().
This prevents errors from being reported back to the pipeline handler
when they occur in the IPA.
Update the IPU3 IPA interface and add return values to the checks in
IPAIPU3::configure() accordingly
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The ipu3_agc.h forward-declares the IPACameraSensorInfo structure, but
incorrectly declares it as a class. This causes a compilation error with
clang:
include/libcamera/ipa/core_ipa_interface.h:24:1: error: 'IPACameraSensorInfo' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct IPACameraSensorInfo
^
../../src/ipa/ipu3/ipu3_agc.h:21:1: note: did you mean struct here?
class IPACameraSensorInfo;
^~~~~
struct
Fix it.
Fixes: 384a53d3cdf7 ("ipa: ipu3: Calculate line duration from IPACameraSensorInfo")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Tested-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
Convert the core AGC and Lux controller code to use
utils::Duration for all exposure time related variables and
calculations.
Convert the exposure/shutter time fields in AgcStatus and DeviceStatus
to use utils::Duration.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Switch the AgcAlgorithm API functions to use utils::Duration for all
time based variables.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Switch the ipa and cam_helper code to use libcamera::utils::Duration for
all time based variables. This improves code readability and avoids
possible errors when converting between time bases.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
A new utils::Duration class is defined to represent a std::chrono::duration type
with double precision nanosecond timebase. Using a double minimises the loss of
precision when converting timebases. This helper class may be used by IPAs to
represent variables such as frame durations and exposure times.
An operator << overload is defined to help with displaying utils::Duration value
in stream objects. Currently, this will display the duration value in
microseconds.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Frame duration is hard-coded for CTS as per [1]. Ideally, to accurately
calculate the frame duration, it needs the VBLANK value from every
frame's exposure. However, this particular bit is yet to be implemented
in IPAIPU3.
Meanwhile, we can at least head in the right direction by not hard
coding the value, instead using the default VBLANK value as reported
by the sensor. Update the existing \todo, to use the derived VBLANK
value as and when it's available from each frame exposure.
[1] 6c5f3fe6ced7 ("ipa: ipu3: Set output frame duration metadata")
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-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>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
IPACameraSensorInfo members will be needed at various places in the
IPAIPU3 class, in subsequent commits. Hence, it seems trivial to copy
this structure for wider availability throughout the class.
This commit does not introduce any functional changes.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
Squash \todo by calculating line duration from IPACameraSensorInfo,
now passed in, to IPU3Agc::initialise().
Since line duration is now calculated from real values, store it as a
private member in IPU3Agc class. As a further step, replace the
associated global constant, kMaxExposureTime, with a private IPU3Agc
class member as well, and assign its value correspondingly in
IPU3Agc::initialise(), similar to previous precedence.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
The return value from generateConfiguration() was not checked. Only assert
was added as a guard which checked if the size of the generated camera
config was equal to size of roles passed to it.
If the roles variable has an invalid/unsupported role, it will return
a nullptr and then trying to access a member on a nullptr for size comparison
will result in a segmentation fault. So, if the function returns a nullptr,
simply push an error message on GstBus and gracefully exit.
Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
The original updateControls() has the assumption that ctrls and
v4l2Ctrls lists are in the same order. It is dependent on the
caller implementation though. This changes updateControls()
implementation so that it works without the assumption.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Some external components such as the unit tests include headers
generated for the IPA's. This is not fully described in meson for each
external component which results in one or more races in the build
system. Instead of playing whack-a-mole add the generated IPA headers to
libcamera_dep.
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Brief specifications available at
https://www.sony-semicon.co.jp/products/common/pdf/ProductBrief_IMX258_20151015.pdf
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
Add libatomic dependency due to std::shared_ptr which is used by qcam
since its addition in commit 97e8b3a2eb321884fe1e15fb584f41a38cc33d51:
https://en.cppreference.com/w/cpp/memory/shared_ptr.
This will avoid the following build failure:
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: src/qcam/qcam.p/main_window.cpp.o: undefined reference to symbol '__atomic_fetch_add_4@@LIBATOMIC_1.0'
Fixes:
- http://autobuild.buildroot.org/results/d0726b2253f1f3d006e057f3b32c646c4b9b5f7a
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Report ANDROID_SENSOR_FRAME_DURATION as an available result key for CTS
to read out the value of frame duration we set in
CameraDevice::getResultMetadata(). Failing to do so might fail the CTS
test:
- android.hardware.camera2.cts.CaptureRequestTest#testNoiseReductionModeControl
Fixes: 3beb1accac1d ("android: camera_device: Fix sensor frame duration")
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The mojo parser is fine if there are types that are used in array/map
members that it does not know about. These are usually caught by the C++
compiler, because the generated code refers to unknown types. This
feature is necessary for us for supporting FrameBuffer::Plane as an
array/map member, since as long as the type has an IPADataSerializer and
the struct defined in C++, the generated code will run fine
(FrameBuffer::Plane is not defined anywhere in mojom but is used as an
array member in IPABuffer).
The types that are defined in controls.h (or any header included in
ipa_interface.h) will all be compiled by the C++ compiler fine, since
the generated files all include controls.h. The types that are there
that are not ControlInfoMap or ControlList (like ControlValue) will
still fail at the linker stage. For example:
struct A {
array<ControlValue> a;
};
will compile fine, but will fail to link, since
IPADataSerializer<ControlValue> doesn't exist. This behavior, although
not the best, is acceptable.
The issue is that if ControlInfoMap or ControlList are used as array/map
members without the libcamera prefix, the compiler will not complain, as
the types are valid, and the linker will also not complain, as
IPADataSerializer<ControlList> and IPADataSerializer<ControlInfoMap>
both exist. However, the code generator will not recognize them as
types that require a ControlSerializer (since mojo doesn't recognize
them, so they are different from the ones that it does recognize with
the libcamera namespace), and so the ControlSerializer will not be
passed to the serializer in the generated code. This is the cause of the
FATAL breakage:
FATAL IPADataSerializer ipa_data_serializer.cpp:437 ControlSerializer
not provided for serialization of ControlInfoMap
Since ControlInfoMap and ControlList are the only types that will run
into this issue, we solve this by simply detecting if they are used
without the prefix, and produce an error at that point in the code
generator. As the code generator stage no longer has information on the
source code file and line, we output the struct name in which the error
was found (ninja will output the file name).
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The Chrome OS-specific code has multiple function parameters that are
not used. This results in compilation warnings. Fix them with
[[maybe_unused]].
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
A custom gamma LUT is used, but the table is not calculated at startup,
resulting in an all 0's frame.
Use the drfault LUT specified in the Linux kernel as a first estimation.
Reported-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
When compiling with optimization, gcc 9 and newer throw an unitialized
variable warning:
../../src/libcamera/pipeline/ipu3/imgu.cpp: In function ‘void libcamera::{anonymous}::calculateBDSHeight(libcamera::ImgUDevice::Pipe*, const libcamera::Size&, const libcamera::Size&, unsigned int, float)’:
../../src/libcamera/pipeline/ipu3/imgu.cpp:172:17: error: ‘bdsHeight’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
172 | unsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);
Neither clang not gcc versions older than 9 complain. This seems to be
a false positive.
However, there's an obvious error in the code. The second while () loop
in the first part of calculateBDSHeight() modifies the bdsHeight
variable set by the first loop even if the second loop doesn't find a
suitable height. This can result in an incorrect bdsHeight value. Fix
this, which also gets rid of the compiler warning.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
|
|
GLib 2.62 has deprecated g_memdup(), which is used inline in GStreamer's
gstbytereader.h header. This results in a compilation warning:
In file included from /usr/include/gstreamer-1.0/gst/base/base.h:35,
from ../../src/gstreamer/gstlibcamerasrc.cpp:39:
/usr/include/gstreamer-1.0/gst/base/gstbytereader.h: In function ‘guint8* gst_byte_reader_dup_data_unchecked(GstByteReader*, guint)’:
/usr/include/gstreamer-1.0/gst/base/gstbytereader.h:365:41: error: ‘void* g_memdup(gconstpointer, guint)’ is deprecated: Use 'g_memdup2' instead [-Werror=deprecated-declarations]
365 | return (guint8 *) g_memdup (data, size);
GLib has a mechanism to silence warnings introduced in newer versions,
to allow compilation without warnings on multiple versions of the
library. This is done by setting the GLIB_VERSION_MIN_REQUIRED macro to
the minimum GLib version required.
As we depend on GStreamer >= 1.14, set the minimum GLib version to 2.40.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
|
Import the latest version of the Android headers from Chrome OS (commit
a30340e77ec8 ("camera: Uprev Android camera headers")). This brings in
the Camera HAL v3.5 support.
The headers are imported verbatim, except for the addition of the SPDX
headers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
The standard C library close() and lseek() functions require inclusion
of the unistd.h header. Include it explicitly where needed instead of
relying on indirect inclusion.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
Take the SPDX header from the mojom file. Error out if the mojom file
has no SPDX header.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
As reported by lwn.net in https://lwn.net/Articles/856543/ and
https://lwn.net/Articles/857140/, freenode, the largest IRC network and
the home of our IRC channel, is embroiled in a messy dispute. After
careful consideration, we have decided that it is not a suitable place
to host our community anymore.
Effective immediately, the #libcamera IRC channel is transferred to the
OFTC IRC network. We will continue our effort to make the channel a
welcoming place for everybody.
Usage of OFTC is governed by its network [1] and privacy [2] policies.
While we don't expect these to cause issues for anyone, please feel free
to contact OFTC or libcamera should you have any question or concern.
[1] https://www.oftc.net/Network_Policy/
[2] https://www.oftc.net/Privacy_Policy/
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
This reverts commit 5b015e96ccdbcd87b4ba6484199652fec5cdb38a.
The ImgU pipe configuration debug is useful to test the correctness
of the parameters computation against the Intel Python script.
However, the number of debug messages which is printed out by the
configuration procedure is so high it floods the logs, up to the point
that starting the Android camera3 HAL, which tests several configurations
at startup, becomes so slow it is barely usable.
Revert the patch that adds the excessive debug statements, which are mostly
useful only when testing the configuration procedure.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Plumb meson to build the cpp files from the mojom files for the purpose
of containing the documentation for the IPA interfaces.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
We don't want to generate the same functional files for core.mojom as
the other mojom files, but we do want to generate the documentation cpp
files. Add core.mojom to the mojom files list after the main generation
is complete, so that the documentation generator can pick it up.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
Move the documentation back to the mojom file from the cpp file. While
at it, move the documentation for IPAInterface::init() and
IPAInterface::stop() to the IPA guide.
While at it, update the todo comment in all of the mojom files
accordingly.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
[umang.jain@ideasonboard.com: Update todos]
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
Use meson's files() to list the mojom files instead of the file names
directly. This is so that we can still access the files from
src/libcamera/ipa/meson.build later for building documentation cpp
files from the mojom files.
While at it, fix some redundant string manipulation in building the
mojom modules.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
Add a script to extract doxygen documentation comments from mojom files.
It matches based on ^\/\*\*$ for start of block and ^ \*\/$ for end of
block, and simply copies the comments to the output file along with a
header and the libcamera namespace.
Also add it to the meson file so it is usable by other meson files.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The sensor frame duration should be set by the IPA. Hardcode it for now.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
The sensor frame duration should be set by IPA. Get the information for
the result metadata from libcamera.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
We need a separate control to report the nominal frame duration, but
it's also useful to report the min/max frame duration values that will
be used. Split the FrameDurations control into FrameDuration and
FrameDurationLimits respectively to support both of these.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Boolean options in the summary are printed as 'True' or 'False' by
default. Enable the bool_yn option, which prints them as 'YES' or 'NO',
in green and red respectively. This makes the summary more readable.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
Originally CameraHalManager is created in the libcamera start up
and destroyed in the libcamera termination. However,
CameraHalManager destructor can access other static objects that
has been destroyed.
Avoid this issue by destroying CameraHalManager when tear_down() is
called in ChromeOS or leaking it in other platforms.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The recent merge (and revert) of commit 34bee5e84ecb ("libcamera:
V4L2Device: Remove the controls order assumption in updateControls()")
showed that 64-bit controls were missing from unit tests.
Fix this by testing the VIVID_CID_INTEGER64 control in the V4L2 video
device controls test.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
Pass in frame timestamps from IPU3 pipeline handler to IPU3 IPA via
IPU3Event. Frame timestamps are helpful to IPA algorithms to
convergence, by setting them via IPA stats.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Fixes: 2fac95b400b7 ("libcamera: pipeline: ipu3: Ensure that IPU3Frames::info is not used after delete")
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The ControlInfoMap of entityControls member in IPAConfigInfo struct,
was not able to correctly match to the ControlInfoMap defined in
core.mojom. This resulted in a FATAL breakage when IPU3 IPA is meant to
run:
FATAL IPADataSerializer ipa_data_serializer.cpp:437 ControlSerializer
not provided for serialization of ControlInfoMap
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
On gcc versions older than 9, the file system library, used by the
Android camera HAL configuration file parser, is implemented in a
separate static library. Furthermore, on gcc 7, it's provided in the
std::experimental namespace. This breaks compilation of the HAL on gcc
7, and linking on gcc 8.
Fix the compilation issue by conditionally including
<experimental/filesystem> and creating a namespace alias in std, and the
link issue by linking to libstdc++fs on gcc versions older than 9.
The inclusion of <experimental/filesystem> is a bit of a hack, and when
we'll start using the file system library in another compilation unit,
we should then move all this to an internal helper to abstract the
compiler version.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
The <filesystem> header isn't needed in camera_hal_config.h, move its
inclusion to camera_hal_config.cpp.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
Fix compiler warning about variable use before being initialized that
appears with gcc 11.1.0.
test/byte-stream-buffer.cpp:31:63: error: ‘data’ may be used uninitialized [-Werror=maybe-uninitialized]
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Update mojo from the Chromium repository. The commit from which this was
taken is:
9c138d992bfc1fb8f4f7bcf58d00bf19c219e4e2 "Updating trunk VERSION from
4523.0 to 4524.0"
The update-mojo.sh script was used for this update.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=34
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Add a script to ease updating mojo from a chromium source tree.
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>
|
|
Add utility functions to CameraMetadata to check if it has been resized,
and for outputting the actual entry and data count. This is meant to be
used to output information on resizing, to assist developers in
choosing proper initial sizes to avoid resizing. Also make CameraDevice
use these functions for static and result metadata.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
Add camera HAL configuration file for IPU3 Soraka.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
Open the HAL configuration file in the Camera HAL manager and get
the camera properties for each created CameraDevice and initialize it
with them.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
Add a CameraHalConfig class to the Android Camera3 HAL layer.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
Add to the README.rst file the list of depdendencies for the
Android Camera3 HAL.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
The HAL layer was getting the min and max frame durations from the
camera, then rounding it to fps to report as available fps ranges. The
same min and max frame durations were then being reported as min and max
frame durations. Since the fps are integer values while the frame
durations are in ns, this caused a rounding error making it seem like we
were reporting an available max fps that was higher than what was
allowed by the minimum frame duration.
An example is if the minimum frame duration is reported as 33366700ns.
The HAL layer would then convert it to fps, which is 29.97, but it would
be rounded and reported as 30 fps. When 30 fps is converted to a frame
duration it is 33333333ns, which is less than the minimum frame duration
that we report. Thus the minimum frame duration that we report
contradicts the fps range that we report.
Fix this by recalculating the frame durations based on the rounded fps
values.
This allows the following CTS test to pass:
- android.hardware.camera2.cts.SurfaceViewPreviewTest#testPreviewFpsRange
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|