[libcamera-devel] [PATCH v4 0/5] libcamera: Initialize controls in the IPA
Jacopo Mondi
jacopo at jmondi.org
Tue Aug 10 17:12:06 CEST 2021
During the review of v1 it has been pointed out by Umang that:
# LIBCAMERA_IPA_FORCE_ISOLATION=1 cam -c1 --list-controls
[0:10:59.880617099] [11495] ERROR IPU3 ipu3.cpp:1201 Exposure control not initializaed by the IPA
Camera 1 not found
The issue boils down to the fact the control deserialization procedure
re-creates ControlId to populate the deserialized ControlIdMap.
As we have globally available ControlIdMap, the ControlId * should be taken from
there when possible, in order to allow lookup by id.
With the new patches:
# LIBCAMERA_IPA_FORCE_ISOLATION=1 cam -c1 --list-controls
Using camera \_SB_.PCI0.I2C2.CAM0 as cam0
Control: ScalerCrop: [(0x0)/1344x736..(0x0)/4224x3136]
Control: PipelineDepth: [2..3]
Control: TestPatternMode: [0..2]
Control: FrameDurationLimits: [31425..320388]
Control: ExposureTime: [41..33306]
Next, when addressing the update of ControlInfoMap due to a camera configuration
the de-serializer caching mechanism will probably play a role. But that's for
later.
Thanks
j
v4->v4:
- Minor style and grammar fixes
- [1/5]: Expand ControlInfoMap::validate() and ASSERT in the caller
- Tested with CTS
v2->v3:
- Fix spelling in commit messages as suggested by Paul and collect tags
- [1/5]:
- ControlInfoMap::validate()
- Rework ControlInfoMap documentation as suggested by Laurent
- [2/5]:
- Moved test earlier and simplified code
- [3/5]
- Drop 'enum class' and use Laurent's suggested naming
- Simplify de-serializer code that uses a localIdMap as suggested by Laurent
- [4/5]
- Change IPAIPU3::init() prototype
init(libcamera.IPASettings settings,
libcamera.IPACameraSensorInfo sensorInfo,
libcamera.ControlInfoMap sensorControls)
- Move exposureTime_ initialization in PH back to initControls()
v1->v2:
- [1/5]. [2/5], [3/5]: new patches
- [4/5]
- Do not remove IPASettings but include it it IPAInitInfo
- Rework a todo item as suggested by Laurent
- Remove an non necessay initialization
- [5/5]
- Collect tags
Jacopo Mondi (5):
libcamera: controls: Create ControlInfoMap with ControlIdMap
test: control serialization: Test lookup by ControlId
libcamera: controls: Use ControlIdMap in deserialization
libcamera: ipu3: Initialize controls in the IPA
ipa: ipu3: Tidy-up includes
include/libcamera/controls.h | 13 +-
.../libcamera/internal/control_serializer.h | 1 +
include/libcamera/internal/v4l2_device.h | 1 +
include/libcamera/ipa/ipa_controls.h | 9 +-
include/libcamera/ipa/ipu3.mojom | 5 +-
include/libcamera/ipa/raspberrypi.h | 40 +++---
src/ipa/ipu3/ipu3.cpp | 78 ++++++++++-
src/ipa/ipu3/ipu3_agc.cpp | 2 +-
src/ipa/ipu3/ipu3_agc.h | 3 -
src/ipa/ipu3/ipu3_awb.cpp | 3 +-
src/libcamera/control_serializer.cpp | 66 ++++++++--
src/libcamera/controls.cpp | 121 ++++++++----------
src/libcamera/ipa_controls.cpp | 29 +++++
src/libcamera/pipeline/ipu3/ipu3.cpp | 98 +++++++-------
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 3 +-
src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 2 +-
src/libcamera/pipeline/vimc/vimc.cpp | 2 +-
src/libcamera/v4l2_device.cpp | 3 +-
test/serialization/control_serialization.cpp | 9 ++
.../ipa_data_serializer_test.cpp | 14 +-
20 files changed, 320 insertions(+), 182 deletions(-)
--
2.32.0
More information about the libcamera-devel
mailing list