The Lut algorithm is not really an algorithm. Moreover, algorithms may be enabled or disabled but with Lut disabled, nothing will work. Let's move the construction of lookup tables to CPU debayering, where it is used. The implied and related changes are: - DebayerParams is changed to contain the real params rather than lookup tables. - contrastExp parameter introduced by GPU ISP is used for CPU ISP too. - The params must be initialised so that debayering gets meaningful parameter values even when some algorithms are disabled. - combinedMatrix must be put to params everywhere where it is modified. - Matrix changes needn't be tracked in the algorithms any more. - CPU debayering must watch for changes of the corresponding parameters to update the lookup tables when and only when needed. - Swapping red and blue is integrated into lookup table constructions. - gpuIspEnabled flags are removed as they are not needed any more. Reviewed-by: Robert Mader <robert.mader@collabora.com> Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
29 lines
484 B
C++
29 lines
484 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2023-2026 Red Hat Inc.
|
|
*
|
|
* Authors:
|
|
* Hans de Goede <hdegoede@redhat.com>
|
|
*
|
|
* DebayerParams header
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "libcamera/internal/matrix.h"
|
|
#include "libcamera/internal/vector.h"
|
|
|
|
namespace libcamera {
|
|
|
|
struct DebayerParams {
|
|
Matrix<float, 3, 3> combinedMatrix;
|
|
RGB<float> blackLevel;
|
|
float gamma;
|
|
float contrastExp;
|
|
RGB<float> gains;
|
|
};
|
|
|
|
} /* namespace libcamera */
|