[PATCH v3 4/6] ipa: simple: Report black levels in metadata
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Jan 27 08:07:43 CET 2025
Hi Milan,
Thank you for the patch.
On Mon, Jan 13, 2025 at 02:34:03PM +0100, Milan Zamazal wrote:
> From: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> Provide the determined black level values in the metadata
> to add to the completed requests.
Reflow to 72 columns.
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> Signed-off-by: Milan Zamazal <mzamazal at redhat.com>
> ---
> src/ipa/simple/algorithms/blc.cpp | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/ipa/simple/algorithms/blc.cpp b/src/ipa/simple/algorithms/blc.cpp
> index 1d7d370b..d5759f92 100644
> --- a/src/ipa/simple/algorithms/blc.cpp
> +++ b/src/ipa/simple/algorithms/blc.cpp
> @@ -11,6 +11,8 @@
>
> #include <libcamera/base/log.h>
>
> +#include "control_ids.h"
> +
> namespace libcamera {
>
> namespace ipa::soft::algorithms {
> @@ -49,8 +51,13 @@ void BlackLevel::process(IPAContext &context,
> [[maybe_unused]] const uint32_t frame,
> IPAFrameContext &frameContext,
> const SwIspStats *stats,
> - [[maybe_unused]] ControlList &metadata)
> + ControlList &metadata)
> {
> + /* Assign each of the R G G B channels as the same black level. */
> + const int32_t blackLevel = context.activeState.blc.level * 256;
> + const int32_t blackLevels[] = { blackLevel, blackLevel, blackLevel, blackLevel };
> + metadata.set(controls::SensorBlackLevels, blackLevels);
> +
> if (context.configuration.black.level.has_value())
> return;
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list