[libcamera-devel] [PATCH v2 0/5] libcamera: Initialize controls in the IPA

Jacopo Mondi jacopo at jmondi.org
Wed Jul 28 18:11:11 CEST 2021


Hello,
   this v2 re-proses "libcamera: Initialize controls in the IPA"
with a few patches before that aims to support lookup by ControlId *
in de-serialized ControlInfoMap.

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.

I get a weird warning from Doxygen 1.9.2
src/libcamera/ipa_controls.cpp:138: warning: Documentation for undefined enum 'IdMapType' found.
include/libcamera/ipa/ipa_controls.h:18: warning: Member IdMapType (enumeration) of file ipa_controls.h is not documented.

Although the field is documented. Maybe a doxygen bug ? I checked and scoped
enums seems to be documented as regular enums with \enum...

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

Thanks
  j


Jacopo Mondi (5):
  libcamera: controls: Create ControlInfoMap with ControlIdMap
  libcamera: controls: Use ControlIdMap in deserialization
  test: control serialization: Test lookup by ControlId
  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              |   9 +-
 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          |  76 +++++++++++--
 src/libcamera/controls.cpp                    |  82 +++-----------
 src/libcamera/ipa_controls.cpp                |  31 ++++++
 src/libcamera/pipeline/ipu3/ipu3.cpp          | 103 ++++++++----------
 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  |  22 ++++
 .../ipa_data_serializer_test.cpp              |   4 +-
 20 files changed, 307 insertions(+), 180 deletions(-)

--
2.32.0



More information about the libcamera-devel mailing list