Age | Commit message (Collapse) | Author |
|
Source files in libcamera start by a comment block header, which
includes the file name and a one-line description of the file contents.
While the latter is useful to get a quick overview of the file contents
at a glance, the former is mostly a source of inconvenience. The name in
the comments can easily get out of sync with the file name when files
are renamed, and copy & paste during development have often lead to
incorrect names being used to start with.
Readers of the source code are expected to know which file they're
looking it. Drop the file name from the header comment block.
The change was generated with the following script:
----------------------------------------
dirs="include/libcamera src test utils"
declare -rA patterns=(
['c']=' \* '
['cpp']=' \* '
['h']=' \* '
['py']='# '
['sh']='# '
)
for ext in ${!patterns[@]} ; do
files=$(for dir in $dirs ; do find $dir -name "*.${ext}" ; done)
pattern=${patterns[${ext}]}
for file in $files ; do
name=$(basename ${file})
sed -i "s/^\(${pattern}\)${name} - /\1/" "$file"
done
done
----------------------------------------
This misses several files that are out of sync with the comment block
header. Those will be addressed separately and manually.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
|
|
musl does not implement GNU basename extention and with latest musl
the prototype from string.h is also removed [1] which now results in
compile errors e.g.
../git/utils/ipu3/ipu3-pack.c:21:47: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
These utilities are using this function in usage() which is used just
before program exit. Always use the basename APIs from libgen.h which is
posix implementation
[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The data parsed by ipu3-unpack is written out using the write() c
library call, but the error code is incorrectly checked which misses the
single erroroneous return value returned by the function.
Fix it to explicitly check against the error code.
Fixes: 23ac77dc4a09 ("utils: ipu3: Add IPU3 raw capture unpack utility")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Recent media-ctl versions include the framerate in the fmt property output:
- entity 37: ov5693 4-0036 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev6
pad0: Source
[fmt:SBGGR10_1X10/2592x1944@1/30
crop.bounds:(16,6)/2592x1944
crop:(16,6)/2592x1944]
-> "ipu3-csi2 1":0 [ENABLED]
This resulted in $sensor_size getting set to: "2592x1944@1 30", which
causes the script to fail.
Fix this by:
1. Replacing the gsub() to remove the '/' between e.g. SBGGR10_1X10
and 2592x1944 with a sub() so that only that first '/' gets replaced
(resulting in a $sensor_size of "2592x1944@1/30" instead).
2. Adding a new sub() to remove the @1/30 suffix.
Signed-off-by: Hans de Goede <hdegoede@redhat.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>
|
|
Provide a 10-bit bayer packing utility for the unpacked data produced
by ipu3-unpack.
Usage: ipu3-unpack input-file output-file
The output-file can be "-" to pack the data to stdout.
The output file generated by ipu3-pack can be directly fed to IMGU
for streaming.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
In an attempt to clarify the license terms of all files in the libcamera
project, the build system files deserve particular attention. While they
describe how the binaries are created, they are not themselves
transformed into any part of binary distributions of the software, and
thus don't influence the copyright on the binary packages. They are
however subject to copyright, and thus influence the distribution terms
of the source packages.
Most of the meson.build files would not meet the threshold of
originality criteria required for copyright protection. Some of the more
complex meson.build files may be eligible for copyright protection. To
avoid any ambiguity and uncertainty, state our intent to not assert
copyrights on the build system files by putting them in the public
domain with the CC0-1.0 license.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Naushir Patuck <naush@raspberrypi.com>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Show Liu <show.liu@linaro.org>
|
|
Set format and selection rectangles on the ImgU subdev as required by
the driver.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
A typo in the output files path causes the script to attempt to write
all captured frames to /. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Calling exit from a function only exits from the function, it doesn't
abort the whole script. Propagate the errors to stop operation when the
sensor or media device can't be found.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The script processes raw frames through the Intel IPU3 IMGU.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The script captures raw frames from cameras based on the Intel IPU3. It
takes the sensor name as an argument and isn't meant to depend on a
particular platform.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The IPU3 captures Bayer data in a 25-pixels-in-32-bytes packed format,
which no standard tool can process. Add a quick implementation of data
unpacking to turn raw binary files into 16 bits per pixel unpacked Bayer
data.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|