8b291bce82
Currently we have a single structure of IPAFrameContext but subsequently, we shall have a ring buffer (or similar) container to keep IPAFrameContext structures for each frame. It would be a hassle to query out the frame context required for process() (since they will reside in a ring buffer) by the IPA for each process. Hence, prepare the process() libipa template to accept a particular IPAFrameContext early on. As for this patch, we shall pass in the pointer as nullptr, so that the changes compile and keep working as-is. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
33 lines
675 B
C++
33 lines
675 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2021, Google inc.
|
|
*
|
|
* tone_mapping.h - IPU3 ToneMapping and Gamma control
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "algorithm.h"
|
|
|
|
namespace libcamera {
|
|
|
|
namespace ipa::ipu3::algorithms {
|
|
|
|
class ToneMapping : public Algorithm
|
|
{
|
|
public:
|
|
ToneMapping();
|
|
|
|
int configure(IPAContext &context, const IPAConfigInfo &configInfo) override;
|
|
void prepare(IPAContext &context, ipu3_uapi_params *params) override;
|
|
void process(IPAContext &context, IPAFrameContext *frameContext,
|
|
const ipu3_uapi_stats_3a *stats) override;
|
|
|
|
private:
|
|
double gamma_;
|
|
};
|
|
|
|
} /* namespace ipa::ipu3::algorithms */
|
|
|
|
} /* namespace libcamera */
|