libcamera  v0.4.0+30-4dad8ece
Supporting cameras in Linux since 2019
tone_mapping.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 /*
3  * Copyright (C) 2021, Google inc.
4  *
5  * IPU3 ToneMapping and Gamma control
6  */
7 
8 #pragma once
9 
10 #include "algorithm.h"
11 
12 namespace libcamera {
13 
14 namespace ipa::ipu3::algorithms {
15 
16 class ToneMapping : public Algorithm
17 {
18 public:
19  ToneMapping();
20 
21  int configure(IPAContext &context, const IPAConfigInfo &configInfo) override;
22  void prepare(IPAContext &context, const uint32_t frame,
23  IPAFrameContext &frameContext, ipu3_uapi_params *params) override;
24  void process(IPAContext &context, const uint32_t frame,
25  IPAFrameContext &frameContext,
26  const ipu3_uapi_stats_3a *stats,
27  ControlList &metadata) override;
28 
29 private:
30  double gamma_;
31 };
32 
33 } /* namespace ipa::ipu3::algorithms */
34 
35 } /* namespace libcamera */
Global IPA context data shared between all algorithms.
Definition: ipa_context.h:86
Top-level libcamera namespace.
Definition: backtrace.h:17
void prepare(IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, ipu3_uapi_params *params) override
Fill in the parameter structure, and enable gamma control.
Definition: tone_mapping.cpp:60
int configure(IPAContext &context, const IPAConfigInfo &configInfo) override
Configure the tone mapping given a configInfo.
Definition: tone_mapping.cpp:41
A class to handle tone mapping based on gamma.
Definition: tone_mapping.h:16
void process(IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, const ipu3_uapi_stats_3a *stats, ControlList &metadata) override
Calculate the tone mapping look up table.
Definition: tone_mapping.cpp:87
IPU3-specific FrameContext.
Definition: ipa_context.h:79
Associate a list of ControlId with their values for an object.
Definition: controls.h:410
The base class for all IPA algorithms.
Definition: algorithm.h:22