libcamera v0.7.2+rpt20261009
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
ccm.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2026, Ideas On Board
4 *
5 * IPU3 Colour correction matrix algorithm
6 */
7
8#pragma once
9
10#include <linux/intel-ipu3.h>
11
12#include <libcamera/controls.h>
13
15
16#include <libipa/ccm.h>
17#include <libipa/fixedpoint.h>
18
19#include "algorithm.h"
20#include "ipa_context.h"
21
22namespace libcamera {
23
24namespace ipa::ipu3::algorithms {
25
26class Ccm : public Algorithm
27{
28public:
29 int init(IPAContext &context, const ValueNode &tuningData) override;
30 int configure(IPAContext &context, const IPAConfigInfo &configInfo) override;
31 void queueRequest(IPAContext &context, const uint32_t frame,
32 IPAFrameContext &frameContext,
33 const ControlList &controls) override;
34 void prepare(IPAContext &context, const uint32_t frame,
35 IPAFrameContext &frameContext,
36 ipu3_uapi_params *params) override;
37 void process(IPAContext &context, const uint32_t frame,
38 IPAFrameContext &frameContext,
39 const ipu3_uapi_stats_3a *stats,
40 ControlList &metadata) override;
41
42private:
43 void setParameters(ipu3_uapi_params *params, IPAFrameContext &context);
44 CcmAlgorithm<Q<3, 13>> ccmAlgo_;
45};
46
47} /* namespace ipa::ipu3::algorithms */
48} /* namespace libcamera */
Associate a list of ControlId with their values for an object.
Definition controls.h:453
A class representing a tree structure of values.
Definition value_node.h:27
The base class for all IPA algorithms.
Definition algorithm.h:23
The libipa CCM algorithm.
Definition ccm.h:58
The IPU3 color correction matrix algorithm.
Definition ccm.h:27
void process(IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, const ipu3_uapi_stats_3a *stats, ControlList &metadata) override
Process ISP statistics, and run algorithm operations.
Definition ccm.cpp:103
void queueRequest(IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, const ControlList &controls) override
Provide control values to the algorithm.
Definition ccm.cpp:46
int configure(IPAContext &context, const IPAConfigInfo &configInfo) override
Configure the Algorithm given an IPAConfigInfo.
Definition ccm.cpp:36
void prepare(IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, ipu3_uapi_params *params) override
Fill the params buffer with ISP processing parameters for a frame.
Definition ccm.cpp:86
int init(IPAContext &context, const ValueNode &tuningData) override
Initialize the Algorithm with tuning data.
Definition ccm.cpp:28
Framework to manage controls related to an object.
Context and state information shared between the algorithms.
Algorithm common interface.
libipa CCM (Colour Correction Matrix) algorithm
Top-level libcamera namespace.
Definition backtrace.h:17
Global IPA context data shared between all algorithms.
Definition ipa_context.h:73
IPU3-specific FrameContext.
Definition ipa_context.h:60
Data structure to manage tree of values.