libcamera v0.7.2+rpt20260817
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
lsc_table.h
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2026, Ideas On Board
4 *
5 * Table-based Lsc implementation
6 */
7#pragma once
8
9#include <vector>
10
11#include <libcamera/base/log.h>
12#include <libcamera/base/span.h>
13
14#include <libcamera/geometry.h>
15
17
18#include "lsc_base.h"
19
20namespace libcamera {
21
23
24namespace ipa {
25
27{
28public:
29 int parseLscData(const ValueNode &sets,
30 const LscDescriptor &descriptor) override;
31
33 sampleForCrop([[maybe_unused]] const Rectangle &cropRectangle,
34 [[maybe_unused]] std::vector<double> xPos,
35 [[maybe_unused]] std::vector<double> yPos) override
36 {
37 LOG(LscTable, Warning)
38 << "Tabular LSC data doesn't support resampling";
39 return lscData_;
40 }
41
42private:
43 int parseLscComponent(const ValueNode &yamlSet,
44 unsigned int ct, const LscDescriptor &descriptor);
45 std::vector<float> parseTable(const ValueNode &tuningData,
46 const char *prop,
47 unsigned int numHSamples,
48 unsigned int numVSamples);
49
51};
52
53} /* namespace ipa */
54
55} /* namespace libcamera */
Describe a rectangle's position and dimensions.
Definition geometry.h:247
A class representing a tree structure of values.
Definition value_node.h:27
Pure virtual base class for LSC algorithm implementations.
Definition lsc_base.h:35
std::map< unsigned int, Components > ComponentsMap
Associate a colour temperature to a LSC table.
Definition lsc_base.h:38
Table based LSC algorithm implementation.
Definition lsc_table.h:27
int parseLscData(const ValueNode &sets, const LscDescriptor &descriptor) override
Parse tabular LSC data.
Definition lsc_table.cpp:40
LscImplementation::ComponentsMap sampleForCrop(const Rectangle &cropRectangle, std::vector< double > xPos, std::vector< double > yPos) override
Re-sample the LSC components for cropRectangle.
Definition lsc_table.h:33
Data structures related to geometric objects.
Logging infrastructure.
#define LOG_DECLARE_CATEGORY(name)
Declare a category of log messages.
Definition log.h:51
#define LOG(category, severity)
Log a message.
Definition log.h:155
Base types and definitions for LscImplementation class hierarchy.
Top-level libcamera namespace.
Definition backtrace.h:17
Describe the ISP LSC engine.
Definition lsc_base.h:27
Data structure to manage tree of values.