Skip to content

Commit

Permalink
libcamera: software_isp: Remove DebayerParams::kGain10
Browse files Browse the repository at this point in the history
The constant is used in a single place internally and doesn't belong to
DebayerParams anymore.  Let's use 256 directly.

Signed-off-by: Milan Zamazal <[email protected]>
Reviewed-by: Andrei Konovalov <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
  • Loading branch information
mz-pdm authored and pinchartl committed Jun 1, 2024
1 parent 539c62f commit f5b7921
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion include/libcamera/internal/software_isp/debayer_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
namespace libcamera {

struct DebayerParams {
static constexpr unsigned int kGain10 = 256;
static constexpr unsigned int kRGBLookupSize = 256;

using ColorLookupTable = std::array<uint8_t, kRGBLookupSize>;
Expand Down
3 changes: 1 addition & 2 deletions src/ipa/simple/soft_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ void IPASoftSimple::processStats(const ControlList &sensorControls)

for (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {
constexpr unsigned int div =
DebayerParams::kRGBLookupSize * DebayerParams::kGain10 /
kGammaLookupSize;
DebayerParams::kRGBLookupSize * 256 / kGammaLookupSize;
unsigned int idx;

/* Apply gamma after gain! */
Expand Down
5 changes: 0 additions & 5 deletions src/libcamera/software_isp/debayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ namespace libcamera {
* \brief Struct to hold the debayer parameters.
*/

/**
* \var DebayerParams::kGain10
* \brief const value for 1.0 gain
*/

/**
* \var DebayerParams::kRGBLookupSize
* \brief Size of a color lookup table
Expand Down

0 comments on commit f5b7921

Please sign in to comment.