[v3,0/6] ipa: simple: Introduce metadata reporting
mbox series

Message ID 20250113133405.12167-1-mzamazal@redhat.com
Headers show
Series
  • ipa: simple: Introduce metadata reporting
Related show

Message

Milan Zamazal Jan. 13, 2025, 1:33 p.m. UTC
Provide metadata reporting for the software ISP. Initially the Black
Levels, ColourGains and Contrast are reported, but also serve as a
direction to add further metadata or internal reporting of the software
ISP.

Running cam -c1 -C10 --metadata now produces the following:

1668.359684 (14.95 fps) cam0-stream0 seq: 000004 bytesused: 15069888
	SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
        AnalogueGain = 10.240000
        ColourGains = [ 0.001509, 0.001380 ]
        ExposureTime = 2127
	SensorTimestamp = 1668359684000

Changes in v3:
- Don't use dynamic allocation for SimpleFrames entries.
- A tentative patch to add exposure/gain to metadata.

Changes in v2:
- Taken over from Kieran.
- Updated for master.
- Black level is reported as uint16_t, according to the control
  documentation.
- Contrast value is reported in metadata.
- The metadata used to proces the image is reported rather than the
  metadata determined from the image.
- Metadata is reported using a new signal rather than (ab)using
  setIspParams; this change is less or more needed due to changed simple
  IPA structure since v1.
- Frame -> request mapping is introduced to make sure the metadata is
  assigned to the right request.

Kieran Bingham (3):
  ipa: simple: softisp: Extend to pass metadata
  ipa: simple: Report the ColourGains in metadata
  ipa: simple: Report black levels in metadata

Milan Zamazal (3):
  libcamera: software_isp: Track frames and requests
  ipa: simple: Report contrast in metadata
  ipa: simple: Report exposure in metadata

 .../internal/software_isp/software_isp.h      |   2 +
 include/libcamera/ipa/soft.mojom              |   1 +
 src/ipa/simple/algorithms/agc.cpp             |   7 +-
 src/ipa/simple/algorithms/awb.cpp             |  11 +-
 src/ipa/simple/algorithms/blc.cpp             |   9 +-
 src/ipa/simple/algorithms/lut.cpp             |  11 ++
 src/ipa/simple/algorithms/lut.h               |   5 +
 src/ipa/simple/soft_simple.cpp                |   7 +-
 src/libcamera/pipeline/simple/simple.cpp      | 102 +++++++++++++++++-
 src/libcamera/software_isp/software_isp.cpp   |  11 ++
 10 files changed, 151 insertions(+), 15 deletions(-)