libcamera v0.7.2+1-aebe4861-nvm
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
agc.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2021, Ideas On Board
4 *
5 * IPU3 AGC/AEC mean-based control algorithm
6 */
7
8#pragma once
9
10#include <linux/intel-ipu3.h>
11
13
14#include <libcamera/geometry.h>
15
16#include "libipa/agc.h"
17#include "libipa/histogram.h"
18
19#include "algorithm.h"
20
21namespace libcamera {
22
23struct IPACameraSensorInfo;
24
25namespace ipa::ipu3::algorithms {
26
27class Agc : public Algorithm
28{
29public:
30 Agc();
31 ~Agc() = default;
32
33 int init(IPAContext &context, const ValueNode &tuningData) override;
34 int configure(IPAContext &context, const IPAConfigInfo &configInfo) override;
35 void queueRequest(IPAContext &context, const uint32_t frame,
36 IPAFrameContext &frameContext, const ControlList &controls) override;
37 void prepare(IPAContext &context, const uint32_t frame,
38 IPAFrameContext &frameContext,
39 ipu3_uapi_params *params) override;
40 void process(IPAContext &context, const uint32_t frame,
41 IPAFrameContext &frameContext,
42 const ipu3_uapi_stats_3a *stats,
43 ControlList &metadata) override;
44
45private:
46 Histogram parseStatistics(const ipu3_uapi_stats_3a *stats,
47 const ipu3_uapi_grid_config &grid);
48
49 uint32_t stride_;
50 ipu3_uapi_grid_config bdsGrid_;
51 std::vector<std::tuple<uint8_t, uint8_t, uint8_t>> rgbTriples_;
52
53 AgcAlgorithm agc_;
54};
55
56} /* namespace ipa::ipu3::algorithms */
57
58} /* 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
libIPA LSC algorithm algorithm
Definition agc.h:122
The base class for all IPA algorithms.
Definition algorithm.h:23
The base class for creating histograms.
Definition histogram.h:23
A mean-based auto-exposure algorithm.
Definition agc.h:28
void queueRequest(IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, const ControlList &controls) override
Provide control values to the algorithm.
Definition agc.cpp:100
void process(IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, const ipu3_uapi_stats_3a *stats, ControlList &metadata) override
Process IPU3 statistics, and run AGC operations.
Definition agc.cpp:215
int configure(IPAContext &context, const IPAConfigInfo &configInfo) override
Configure the AGC given a configInfo.
Definition agc.cpp:84
int init(IPAContext &context, const ValueNode &tuningData) override
Initialise the AGC algorithm from tuning files.
Definition agc.cpp:68
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 agc.cpp:110
Data structures related to geometric objects.
Class to represent Histograms and manipulate them.
libipa AGC algorithm
Algorithm common interface.
Top-level libcamera namespace.
Definition backtrace.h:17
Global IPA context data shared between all algorithms.
Definition ipa_context.h:76
IPU3-specific FrameContext.
Definition ipa_context.h:67
Miscellaneous utility functions.