[v4,0/5] Software ISP levels cleanup
mbox series

Message ID 20240528161126.35119-1-mzamazal@redhat.com
Headers show
Series
  • Software ISP levels cleanup
Related show

Message

Milan Zamazal May 28, 2024, 4:11 p.m. UTC
This is a cleanup of black level and color gain handling in software
ISP.  It fixes omission of black level subtraction in white balance
computation and moves color lookup tables computations out of
debayering.  The latter also serves as a preparation for bringing
software ISP algorithms closer to common libcamera algorithm handling,
in future patches.

Changes in v4:
- Removed no longer used private members of DebayerCpu.
- Added initialization of SoftwareIsp::debayerParams_ (should fix the
  initial color artifacts observed by Kieran).

Changes in v3:
- Casting an uint8_t value to unsigned int when logging it. 

Changes in v2:
- stdint.h include moved from black_level.cpp to black_level.h.
- Removed meaningless multiplication in black level subtraction.
- Removed local variable scoping block.
- Added a comment about subtracting black level for auto white balance.
- A code snippet related to black level subtraction moved to the right
  patch.
- Dropped the patch moving TODO #13 to a source code comment.
- Added a patch to use float rather than uint8_t gains in color lookup
  tables passed to debayering.

Milan Zamazal (5):
  libcamera: software_isp: Use a specific integer type for black level
  libcamera: software_isp: Honor black level in AWB
  libcamera: software_isp: Move color mappings out of debayering
  libcamera: software_isp: Remove DebayerParams::kGain10
  libcamera: software_isp: Pass color lookup tables as floats

 .../internal/software_isp/debayer_params.h    | 20 ++---
 src/ipa/simple/black_level.cpp                |  2 +-
 src/ipa/simple/black_level.h                  |  5 +-
 src/ipa/simple/soft_simple.cpp                | 74 ++++++++++++++-----
 src/libcamera/software_isp/TODO               | 13 ----
 src/libcamera/software_isp/debayer.cpp        | 33 ++++-----
 src/libcamera/software_isp/debayer_cpu.cpp    | 55 +++++---------
 src/libcamera/software_isp/debayer_cpu.h      | 15 ++--
 src/libcamera/software_isp/software_isp.cpp   | 15 +++-
 9 files changed, 125 insertions(+), 107 deletions(-)

Comments

Kieran Bingham May 28, 2024, 11:11 p.m. UTC | #1
Quoting Milan Zamazal (2024-05-28 17:11:21)
> This is a cleanup of black level and color gain handling in software
> ISP.  It fixes omission of black level subtraction in white balance
> computation and moves color lookup tables computations out of
> debayering.  The latter also serves as a preparation for bringing
> software ISP algorithms closer to common libcamera algorithm handling,
> in future patches.
> 
> Changes in v4:
> - Removed no longer used private members of DebayerCpu.
> - Added initialization of SoftwareIsp::debayerParams_ (should fix the
>   initial color artifacts observed by Kieran).

Confirmed, 

Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

And all green on CI:
 - https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1188426

--
Kieran



> Changes in v3:
> - Casting an uint8_t value to unsigned int when logging it. 
> 
> Changes in v2:
> - stdint.h include moved from black_level.cpp to black_level.h.
> - Removed meaningless multiplication in black level subtraction.
> - Removed local variable scoping block.
> - Added a comment about subtracting black level for auto white balance.
> - A code snippet related to black level subtraction moved to the right
>   patch.
> - Dropped the patch moving TODO #13 to a source code comment.
> - Added a patch to use float rather than uint8_t gains in color lookup
>   tables passed to debayering.
> 
> Milan Zamazal (5):
>   libcamera: software_isp: Use a specific integer type for black level
>   libcamera: software_isp: Honor black level in AWB
>   libcamera: software_isp: Move color mappings out of debayering
>   libcamera: software_isp: Remove DebayerParams::kGain10
>   libcamera: software_isp: Pass color lookup tables as floats
> 
>  .../internal/software_isp/debayer_params.h    | 20 ++---
>  src/ipa/simple/black_level.cpp                |  2 +-
>  src/ipa/simple/black_level.h                  |  5 +-
>  src/ipa/simple/soft_simple.cpp                | 74 ++++++++++++++-----
>  src/libcamera/software_isp/TODO               | 13 ----
>  src/libcamera/software_isp/debayer.cpp        | 33 ++++-----
>  src/libcamera/software_isp/debayer_cpu.cpp    | 55 +++++---------
>  src/libcamera/software_isp/debayer_cpu.h      | 15 ++--
>  src/libcamera/software_isp/software_isp.cpp   | 15 +++-
>  9 files changed, 125 insertions(+), 107 deletions(-)
> 
> -- 
> 2.42.0
>