Commit graph

2025 commits

Author SHA1 Message Date
Jacopo Mondi
0b5fecc746 android: camera_device: Handle NOISE_REDUCTION_MODES
Register the ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
static metadata property inspecting the values retuned by the pipeline
handler.

Reserve in the static metadata pack enough space to support all the 5
available noise reduction modes Android defines.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:56 +01:00
Jacopo Mondi
5d91c8da5c android: camera_device: Report PIPELINE_MAX_DEPTH
Register the ANDROID_REQUEST_PIPELINE_MAX_DEPTH static property
inspecting the value reported by the pipeline handler.

If the Camera does not report any suitable value, default the
static property to 2.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
4ddaddfc83 libcamera: ipu3: Register camera controls
Register controls for the IPU3 pipeline handler. The only supported
Camera control is currently the pipeline depth control.

Report the minimum and maximum values the pipeline handler supports for
the pipeline processing stages and report for each request the pipeline
depth describing the number of processing steps the frames went through.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
25a870dbd3 libcamera: control_ids: Remove max values in enumerations
The libcamera control definition schema includes a placeholder
maximum value for each enumeration of supported values.

As it is now possible to create ControlInfo from the list of enumerated
values, it is not necessary to generate the placeholder value anymore.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
4692ef1a10 ipa: raspberry: Initialize ControlInfo with values list
Initialize the ControlInfoMap of controls supported by the Raspberry Pi
pipeline handler and IPA using the list of the enumerated values instead
of specifying them manually.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
634fd30b39 libcamera: controls: Fix rogue whitespace
Remove an extra whitespace in the declaration of a dictionary entry in
gen-controls.py script.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
ef7a07dd8a libcamera: controls: Generate an array of valid values
For each Control that supports enumerated values generate an array
of ControlValue which contains the full list of valid values.

At the expense of a slight increase in memory occupation this change
allows the construction of the ControlInfo associated with a Control
from the values list, defaulting the minimum and maximum values
reported by the ControlInfo.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
7a307fa647 libcamera: controls: Rename enumerate values
Rename the enumeration of supported values with the suffix "Enum"
in place of "Values" to prepare to re-use the suffix "Values"
for the vector of Control's value introduced by the next patch.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:55 +01:00
Jacopo Mondi
6377817f9f libcamera: controls: Construct from valid values
Add a new constructor to the ControlInfo class that allows creating
a class instance from the list of the control valid values with
an optional default one.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:54 +01:00
Jacopo Mondi
84e79bd8b5 libcamera: control_ids: Define draft controls
libcamera is in the process of defining its own set of controls
to enable applications to control the image capture process and
return information on the captured frames.

To temporarily close the gap in the Android camera HAL and support all
controls required in the LIMITED hardware level, define a set of Draft
controls whose values are taken from their Android definition, in order
to allow pipeline handlers to support Android.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:54 +01:00
Kieran Bingham
89916a486c libcamera: Support draft controls and properties
Extend the control and property framework to support exposing draft
controls and properties in a scoped namespace.

The controls/properties themselves will retain the same ordering in the
relevant enum/id maps - but the access to any draft control will require
explicitly referencing through its' draft:: namespace prefix.

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>
[Added missing hunk in control_ids.cpp.in and changed subject]
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-26 17:51:54 +01:00
Laurent Pinchart
581bb27495 libcamera: controls: Disable ControlValue<T> construction from unsupported T
The ControlValue<T> constructor for non-array values is a template
function that participates in overload resolution for all T types that
are not Span or std::string. Other T types that are not supported then
result in a compilation error.

This causes issues when calling an overloaded function that can accept
both a ControlValue and a Span with an std::array<U> parameter. The
first overload will be resolved using implicit construction of a
ControlValue from the std::array<U>, while the second overload will be
resolved using implicit construction of a Span<U> from the
std::array<U>. This results in a compilation error due to an ambiguous
function call.

The first overload is invalid, selecting it would result in a
compilation error in the ControlValue constructor, as the
ControlValue<T> constructor doesn't support std::array<U> for type T.
The compiler can't know about that, as overload resolution happens
earlier.

To fix it, we can disable the ControlValue<T> constructor for
unsupported types T, moving the type check from compilation of the
function to overload resolution. The constructor will not participate in
overload resolution, and the call won't be ambiguous. The end result is
the same for unsupported types, compilation will fail.

Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-26 17:51:32 +01:00
Umang Jain
c430d39d20 android: jpeg: encoder: Use pass-by-value for Exif parameter
Following the reasoning of pass-by-value for libcamera::Span
parameters from 90c193f2a700("android: Modify Encoder interface") i.e.
they are easy to copy/move/construct, align the Exif parameter passing
to the encoder interface in this consistent way.

Signed-off-by: Umang Jain <email@uajain.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>
2020-10-23 22:53:17 +03:00
Umang Jain
f9e7f55f3b android: jpeg: Drop "libcamera::" namespace from functions' arguments
Drop "libcamera::" from functions' arguments for *.cpp files as they
have

	using namespace libcamera;

directive in the beginning.

Signed-off-by: Umang Jain <email@uajain.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>
2020-10-23 22:53:17 +03:00
Laurent Pinchart
c77d894a8b libcamera: Declare empty virtual destructors as defaulted
The base class of polymorphic classes is required to declare a
destructor. Several of these are empty, and can thus be declared as
defaulted.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-10-23 22:53:13 +03:00
Laurent Pinchart
0c1f7da15e libcamera: Drop unneeded empty default constructors and destructors
A few default constructors and destructors are needlessly defined as
empty. Drop them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-10-23 22:48:17 +03:00
Laurent Pinchart
ef10997b4a libcamera: media_object: Remove unneeded destructors
The MediaEntity, MediaLink and MediaPad classes don't need custom
destructors. For MediaEntity and MediaPad, the destructors clear a
vector embedded in the classes, which will be done by the default
destructor. For MediaLink, the destructor is already empty. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-10-23 22:48:08 +03:00
Laurent Pinchart
d0e665c3ed libcamera: pipeline: simple: Set camera properties
Initialize the CameraData properties with the properties exposed by the
sensor.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Tested-by: Andrey Konovalov <andrey.konovalov@linaro.org>
2020-10-21 22:09:50 +03:00
Laurent Pinchart
8ddaa824ab libcamera: pipeline: Fail match() when no camera is registered
The rkisp1 and simple pipeline handlers can fail to register any camera,
if initialization of all the detected cameras fail. In that case, they
still return success from their match function. As no camera gets
registered, the pipeline handler is immediately destroyed, releasing the
acquired media devices, and the camera manager immediately tries to
match the same pipeline handler with the same media device, causing an
endless loop.

Fix it by returning false from the match function if no camera gets
registered.

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: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Tested-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-21 22:09:50 +03:00
Kieran Bingham
9f567cc140 meson: Enable shadowed variable warning
Shadowing variables can lead to unexpected bugs where a code path
utilises a variable that may not have been intended by the developer,
leading to hard to find bugs.

Enable warnings for shadowed variables as defined at:
  https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wshadow

As an effect of utilising -Werror, this will cause variable or type
shadowing to become a build-time error.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 17:18:49 +01:00
Kieran Bingham
e6278e0571 test: v4l2_videodevice: Prevent variable shadowing of format
Rename the scoped usage of the variable format while iterating the formats
as it shadows the outer scoped format which is used for specific testing.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 17:18:48 +01:00
Kieran Bingham
2babedf2b3 qcam: main_window: Explicitly name raw buffer
The buffer obtained for queuing to a raw stream shadows the buffer
passed in for the main view finder stream.

Prevent shadowing, and explicitly name the buffer as a separate variable.

Suggested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 17:18:48 +01:00
Kieran Bingham
732ea045f5 cam: options: Rename optional arg to prevent shadowing
The parseValue function is given the optarg directly from the getopt
library, but the function retains the same name.

This causes an shadowed variable of the global optarg variable to be
present in the parseValue function. While this is not harmful, rename it
to work towards disabling shadowed variables.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-21 17:18:48 +01:00
Kieran Bingham
32d78a7bba v4l2: camera: Prevent shadowing within V4L2Camera::Buffer
Rename the internal member variables to use the post-fixed '_' member
variable naming style. This in turn ensures variable shadowing does not
occur in the member initializer list of the constructor.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 17:18:48 +01:00
Kieran Bingham
a3ed067996 android: metadata: Disable -Wshadow
Do not warn on shadowed variables inside the metadata library,
which is directly imported without modifications.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 17:18:48 +01:00
Kieran Bingham
e1f9fdb8a5 android: camera_device: Remove shadowing FrameBuffer usage
A FrameBuffer *buffer is used to obtain the 'first' buffer from a
request which is used purely to identify the timestamp from the
metadata in two locations.

Rather than keep the FrameBuffer instance around, which then causes
further usages of FrameBuffers to be shadowed, store the timestamp
locally.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 17:18:36 +01:00
Kieran Bingham
37c18c2eec android: camera_device: use member style on Camera3RequestDescriptor
Use the postfixed '_' member variable naming style for the
Camera3RequestDescriptor structure, which in turn ensures that variable
shadowing does not occur in the member initializer list of the
constructor.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 17:01:40 +01:00
Kieran Bingham
c7bcae02a0 android: camera_device: Use existing variable definitions
Prevent variable shadowing by removing the redeclaration of variables
with the same name (and type) where the existing variable can be reused.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 17:01:28 +01:00
Kieran Bingham
bf104042f9 ipa: raspberrypi: Re-use iterator variable
The function gauss_seidel2_SOR() makes use of a function scoped iterator
'i', for several loops, and has a precedence of re-using the function
scoped iterator declaration in the majority of cases, except the first
where it is declared in the loop scope before the function scope, and
later which aliases a new declaration.

Re-use the existing iterator variable for consistency, and to prevent
variable aliasing.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-21 16:15:41 +01:00
Kieran Bingham
1021b42823 libcamera: v4l2_videodevice: Prevent shadowing of V4L2BufferCache members
The members free, and lastUsed were not following the libcamera coding
style, and were producing a shadowed parameter on the construction.

Rename them to be marked as member variables with the _ postfix
accordingly.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 16:15:41 +01:00
Kieran Bingham
d55f6a8037 libcamera: pipeline: rpi_stream: Explicitly name requestBuffer
The FrameBuffer used to track any addition to the request in an
under-run event was shadowed against the returned buffer, being placed
back on the availableBuffers_ queue.

Rename the shadowed variable to be more explicit that it is a separate
Buffer.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-21 16:15:41 +01:00
Kieran Bingham
4bd8d15f96 libcamera: pipeline: Use existing variable definitions
Prevent variable shadowing by removing the redeclaration of variables
with the same name (and type) where the existing variable can be reused.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 16:15:40 +01:00
Kieran Bingham
d3f60c8458 libcamera: pipeline: Prevent variable shadowing
Remove variable shadowing within the pipeline handler implementations.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-21 16:15:40 +01:00
Kieran Bingham
f4c234579b libcamera: thread: Prevent shadowing of signal name
The Thread::wait() function creates a boolean flag 'finished' which
shadows the internal member signal of the same name.

Rename the boolean flag to prevent confusion and shadowing of the signal.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-21 16:15:40 +01:00
Hirokazu Honda
bb27fbf253 android: camera_stream: Make some member variables constant
CameraStream initializes several member variables in the
initializer list. Some of them are unchanged after. This makes
them constant. Especially, doing to |cameraDevice_| represents
CameraStream doesn't have the ownership of it.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <email@uajain.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>
2020-10-21 11:18:12 +01:00
Hirokazu Honda
79bca4300b android: post_processor_jpeg: Make |cameraDevice_| constant
PostProcessorJpeg doesn't have the ownership of CameraDevice given
in the constructor. To clarify it, this makes the member variable
constant.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <email@uajain.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>
2020-10-21 11:18:12 +01:00
Hirokazu Honda
90c193f2a7 android: Modify Encoder interface
In Encoder::encode(), the |source| argument doesn't have to be a
pointer. This replaces its type, const pointer, with const
reference as the latter is preferred to the former.
libcamera::Span is cheap to construct/copy/move. We should deal
with the type as pass-by-value parameter. Therefore this also
drops the const reference in the |destination| argument.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <email@uajain.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>
2020-10-21 11:18:12 +01:00
Hirokazu Honda
b8dd5ce944 android: Modify PostProcessor interface
In PostProcessor::process(), the |source| argument doesn't have
to be a pointer. This replaces its type, const pointer, with
const reference as the latter is preferred to the former.
libcamera::Span is cheap to construct/copy/move. We should deal
with the type as pass-by-value parameter. Therefore this also
drops the const reference in the |destination| argument.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <email@uajain.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>
2020-10-21 11:18:12 +01:00
Laurent Pinchart
88919c1e17 libcamera: Document the libcamera namespace
The libcamera namespace has been left undefined from the start. While
the documentation doesn't bring much added value, leaving it out
confuses the most recent doxygen master branch:

include/libcamera/transform.h:16: warning: Internal inconsistency: member Identity does not belong to any container!
include/libcamera/transform.h:17: warning: Internal inconsistency: member Rot0 does not belong to any container!
include/libcamera/transform.h:18: warning: Internal inconsistency: member HFlip does not belong to any container!
include/libcamera/transform.h:19: warning: Internal inconsistency: member VFlip does not belong to any container!
include/libcamera/transform.h:20: warning: Internal inconsistency: member HVFlip does not belong to any container!
include/libcamera/transform.h:21: warning: Internal inconsistency: member Rot180 does not belong to any container!
include/libcamera/transform.h:22: warning: Internal inconsistency: member Transpose does not belong to any container!
include/libcamera/transform.h:23: warning: Internal inconsistency: member Rot270 does not belong to any container!
include/libcamera/transform.h:24: warning: Internal inconsistency: member Rot90 does not belong to any container!
include/libcamera/transform.h:26: warning: Internal inconsistency: member Rot180Transpose does not belong to any container!

Document it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-10-20 13:41:37 +03:00
Laurent Pinchart
7a671fb40b libcamera: Place doxygen \file block above namespace
Make the whole code base consistent by placing the doxygen \file block
above the libcamera namespace opening. There's a single offender, and
two locations in which a white line is missing.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-10-20 13:41:33 +03:00
Laurent Pinchart
3fe0edc989 ipa: Skip doxygen parsing for pipeline-specific IPA headers
The pipeline-specific IPA headers are not part of the libcamera API,
they should thus be skipped when generating documentation. doxygen
doesn't complain currently due to the fact that types defined in those
headers are part of undocumented namespaces. In preparation for
documenting the libcamera namespace, make sure the headers don't get
parsed by doxygen.

Only vimc.h needs a header guard, as rkisp1.h uses the global namespace
and raspberrypi.h uses the undocumented libcamera::RPi namespace,
neither of which cause issues. Still, for consistency, add header guards
to all headers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-10-20 13:19:45 +03:00
Laurent Pinchart
00aa3ac82e ipa: Rename ipa_vimc.h to vimc.h
To be consistent with the other pipeline handlers that don't prefix
their IPA protocol header with ipa_, rename ipa_vimc.h to vimc.h.

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>
2020-10-20 13:19:15 +03:00
Hirokazu Honda
c3a5467f7d meson: Enable -Wextra-semi for clang
The option, -Wextra-semi, helps developers to find unnecessary
semicolons. This option is available with clang.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-20 13:15:56 +03:00
Hirokazu Honda
766eae4532 ipa: Omit extra semicolon
There is the unnecessary semicolon after ipaCreate() in
raspberrypi.cpp. This removes it.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-20 13:15:55 +03:00
Hirokazu Honda
e04bd18589 libcamera: Omit extra semicolons
The end semicolons with LOG_DEFINE_CATEGORY,
LOG_DECLARE_CATEGORY and REGISTER_PIPELINE_HANDLER are
unnecessary.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-20 13:15:52 +03:00
Hirokazu Honda
4ba2a33809 include: libcamera: Omit extra semicolons
This removes the unnecessary semicolon in span.h.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-20 13:15:50 +03:00
Hirokazu Honda
6c5792f7a8 android: Omit extra semicolons
The end semicolons with LOG_DECLARE_CATEGORY and
LOG_DEFINE_CATEGORY are unnecessary.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-20 13:15:49 +03:00
Hirokazu Honda
da0dd36149 gstreamer: Omit extra semicolons
Macros used in gstreamer (e.g. G_DEFINE_TYPE) are functions. The
end semicolons with the macros are unnecessary.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-20 13:15:47 +03:00
Hirokazu Honda
6219257562 v4l2: Omit extra semicolons
LOG_DECLARE_CATEGORY macro contains the semicolon. The end
semicolon with the macro is unnecessary.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-20 13:15:46 +03:00
Hirokazu Honda
e0fd0169ad test: Omit extra semicolons
TEST_REGISTER macro is main function. The end semicolon with the
macro is unnecessary.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-20 13:15:43 +03:00