[libcamera-devel,00/20] Raspberry Pi: Preliminary PiSP support
mbox series

Message ID 20231006132000.23504-1-naush@raspberrypi.com
Headers show
Series
  • Raspberry Pi: Preliminary PiSP support
Related show

Message

Naushir Patuck Oct. 6, 2023, 1:19 p.m. UTC
Hi,

This (rather large) series introduces infrastructure needed for adding Raspberry
Pi 5 support into libcamera.  As some of you may be aware, Raspberry Pi 5 has
new in-house designed ISP (named PiSP) and Camera Front End (CFE) hardware
pipelines to handle camera and imaging tasks.

The patches in this series add some necessary functionality and algorithms
needed for the new PISP pipeline handler and IPA to function correctly.  The
actual pipeline handler and IPA code is not included in this series.  We are
waiting for the associated kernel drivers to be upstreamed before sending them
to this mailing list.  However, the code is available to inspect (particularly
to understand the context of some of these changes) at
https://github.com/raspberrypi/libcamera.

Finally, even though my name is listed as the author on most of the commits, the
following people also share authorship for this work:

David Plowman
Nick Hollinghurst
William Vinnicombe

Thanks,
Naush

David Plowman (4):
  ipa: rpi: agc: Add an AGC stable region
  ipa: rpi: contrast: Allow adaptive contrast enhancement to be disabled
  ipa: rpi: denoise: Support different denoise configurations
  ipa: rpi: agc: Avoid overwriting caller's statistics pointer

Naushir Patuck (16):
  pipeline: rpi: Add RequiresMmap flag to RPi::Stream
  pipeline: rpi: Add Recurrent and Needs32bitConv flags to RPi::Stream
  pipeline: rpi: Add SharedMemObject class
  ipa: rpi: Add IpaBase::platformStart() member function
  mojom: pipeline: ipa: rpi: Add fields for PiSP objects
  ipa: rpi: Add try_lock() to RPiController::Metadata
  ipa: rpi: Add statsInline to the Controller hardware description
  ipa: rpi: Add PiSP definitions to the Controller hardware description
  ipa: rpi: Prepare ALSC for PiSP support
  ipa: rpi: Prepare AWB for PiSP support
  ipa: rpi: Add new algorithms for PiSP
  pipeline: rpi: Add SW downscale status to RPi::Stream
  build: ipa: Fix bug in building multiple IPA interfaces with the same
    mojom file
  pipeline: rpi: Move flip handling validation code
  pipeline: rpi: Make color space members in RPiCameraConfiguration
    public
  ipa: rpi: agc: When AGC channels are changed, start with the 1st
    channel

 include/libcamera/ipa/meson.build             |  19 +-
 include/libcamera/ipa/raspberrypi.mojom       |   6 +-
 src/ipa/rpi/common/ipa_base.cpp               |  23 +-
 src/ipa/rpi/common/ipa_base.h                 |   1 +
 src/ipa/rpi/controller/agc_status.h           |   3 +
 src/ipa/rpi/controller/cac_status.h           |  16 ++
 src/ipa/rpi/controller/contrast_algorithm.h   |   2 +
 src/ipa/rpi/controller/controller.cpp         |  18 +-
 src/ipa/rpi/controller/controller.h           |   2 +
 src/ipa/rpi/controller/denoise_algorithm.h    |   4 +
 src/ipa/rpi/controller/denoise_status.h       |  19 ++
 src/ipa/rpi/controller/hdr_algorithm.h        |  25 ++
 src/ipa/rpi/controller/hdr_status.h           |  19 ++
 src/ipa/rpi/controller/meson.build            |   5 +
 src/ipa/rpi/controller/metadata.h             |   1 +
 src/ipa/rpi/controller/rpi/agc.cpp            |   6 +-
 src/ipa/rpi/controller/rpi/agc_channel.cpp    |   7 +
 src/ipa/rpi/controller/rpi/agc_channel.h      |   1 +
 src/ipa/rpi/controller/rpi/alsc.cpp           |  16 +-
 src/ipa/rpi/controller/rpi/awb.cpp            |  29 +-
 src/ipa/rpi/controller/rpi/cac.cpp            |  81 ++++++
 src/ipa/rpi/controller/rpi/cac.h              |  38 +++
 src/ipa/rpi/controller/rpi/contrast.cpp       |  13 +-
 src/ipa/rpi/controller/rpi/contrast.h         |   3 +
 src/ipa/rpi/controller/rpi/denoise.cpp        | 198 +++++++++++++
 src/ipa/rpi/controller/rpi/denoise.h          |  59 ++++
 src/ipa/rpi/controller/rpi/hdr.cpp            | 270 ++++++++++++++++++
 src/ipa/rpi/controller/rpi/hdr.h              |  72 +++++
 src/ipa/rpi/controller/rpi/saturation.cpp     |  57 ++++
 src/ipa/rpi/controller/rpi/saturation.h       |  32 +++
 src/ipa/rpi/controller/rpi/sdn.cpp            |   2 +
 src/ipa/rpi/controller/rpi/tonemap.cpp        |  61 ++++
 src/ipa/rpi/controller/rpi/tonemap.h          |  35 +++
 src/ipa/rpi/controller/saturation_status.h    |  13 +
 src/ipa/rpi/controller/stitch_status.h        |  17 ++
 src/ipa/rpi/controller/tonemap_status.h       |  17 ++
 src/ipa/rpi/vc4/vc4.cpp                       |   7 +
 .../pipeline/rpi/common/pipeline_base.cpp     |  16 +-
 .../pipeline/rpi/common/pipeline_base.h       |   6 +-
 .../pipeline/rpi/common/rpi_stream.cpp        |  64 ++++-
 .../pipeline/rpi/common/rpi_stream.h          |  54 +++-
 .../pipeline/rpi/common/shared_mem_object.h   | 118 ++++++++
 src/libcamera/pipeline/rpi/vc4/vc4.cpp        |  23 +-
 43 files changed, 1413 insertions(+), 65 deletions(-)
 create mode 100644 src/ipa/rpi/controller/cac_status.h
 create mode 100644 src/ipa/rpi/controller/hdr_algorithm.h
 create mode 100644 src/ipa/rpi/controller/hdr_status.h
 create mode 100644 src/ipa/rpi/controller/rpi/cac.cpp
 create mode 100644 src/ipa/rpi/controller/rpi/cac.h
 create mode 100644 src/ipa/rpi/controller/rpi/denoise.cpp
 create mode 100644 src/ipa/rpi/controller/rpi/denoise.h
 create mode 100644 src/ipa/rpi/controller/rpi/hdr.cpp
 create mode 100644 src/ipa/rpi/controller/rpi/hdr.h
 create mode 100644 src/ipa/rpi/controller/rpi/saturation.cpp
 create mode 100644 src/ipa/rpi/controller/rpi/saturation.h
 create mode 100644 src/ipa/rpi/controller/rpi/tonemap.cpp
 create mode 100644 src/ipa/rpi/controller/rpi/tonemap.h
 create mode 100644 src/ipa/rpi/controller/saturation_status.h
 create mode 100644 src/ipa/rpi/controller/stitch_status.h
 create mode 100644 src/ipa/rpi/controller/tonemap_status.h
 create mode 100644 src/libcamera/pipeline/rpi/common/shared_mem_object.h