libcamera
v0.8.0
Supporting cameras in Linux since 2019
Toggle main menu visibility
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
13
#include <
libcamera/geometry.h
>
14
15
#include "
libcamera/internal/value_node.h
"
16
17
#include "
lsc_base.h
"
18
19
namespace
libcamera
{
20
21
LOG_DECLARE_CATEGORY
(LscTable)
22
23
namespace
ipa
{
24
25
class
LscTable
:
public
LscImplementation
26
{
27
public
:
28
int
parseLscData
(
const
ValueNode
&sets,
29
const
LscDescriptor
&descriptor)
override
;
30
31
LscImplementation::ComponentsMap
32
sampleForCrop
([[maybe_unused]]
const
Rectangle
&cropRectangle,
33
[[maybe_unused]] std::span<const double> xPos,
34
[[maybe_unused]] std::span<const double> yPos)
override
35
{
36
LOG
(
LscTable
, Warning)
37
<<
"Tabular LSC data doesn't support resampling"
;
38
return
lscData_;
39
}
40
41
private
:
42
int
parseLscComponent(
const
ValueNode
&yamlSet,
43
unsigned
int
ct,
const
LscDescriptor
&descriptor);
44
std::vector<float> parseTable(
const
ValueNode
&tuningData,
45
const
char
*prop,
46
unsigned
int
numHSamples,
47
unsigned
int
numVSamples);
48
49
LscImplementation::ComponentsMap
lscData_;
50
};
51
52
}
/* namespace ipa */
53
54
}
/* namespace libcamera */
libcamera::Rectangle
Describe a rectangle's position and dimensions.
Definition
geometry.h:247
libcamera::ValueNode
A class representing a tree structure of values.
Definition
value_node.h:27
libcamera::ipa::LscImplementation
Pure virtual base class for LSC algorithm implementations.
Definition
lsc_base.h:34
libcamera::ipa::LscImplementation::ComponentsMap
std::map< unsigned int, Components > ComponentsMap
Associate a colour temperature to a LSC table.
Definition
lsc_base.h:37
libcamera::ipa::LscTable
Table based LSC algorithm implementation.
Definition
lsc_table.h:26
libcamera::ipa::LscTable::parseLscData
int parseLscData(const ValueNode &sets, const LscDescriptor &descriptor) override
Parse tabular LSC data.
Definition
lsc_table.cpp:40
libcamera::ipa::LscTable::sampleForCrop
LscImplementation::ComponentsMap sampleForCrop(const Rectangle &cropRectangle, std::span< const double > xPos, std::span< const double > yPos) override
Re-sample the LSC components for cropRectangle.
Definition
lsc_table.h:32
geometry.h
Data structures related to geometric objects.
log.h
Logging infrastructure.
LOG_DECLARE_CATEGORY
#define LOG_DECLARE_CATEGORY(name)
Declare a category of log messages.
Definition
log.h:51
LOG
#define LOG(category, severity)
Log a message.
Definition
log.h:155
lsc_base.h
Base types and definitions for LscImplementation class hierarchy.
libcamera::ipa
The IPA (Image Processing Algorithm) namespace.
Definition
af.cpp:58
libcamera
Top-level libcamera namespace.
Definition
backtrace.h:17
libcamera::ipa::LscDescriptor
Describe the ISP LSC engine.
Definition
lsc_base.h:26
value_node.h
Data structure to manage tree of values.
src
ipa
libipa
lsc_table.h
Generated by
1.17.0