ipa: rkisp1: Add debug metadata support to the rkisp1
Add a DebugMetadata helper to the context and add the corresponding plumbing. This is all that is needed to support debug metadata in an IPA. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -17,8 +17,11 @@
|
||||
#include <libcamera/control_ids.h>
|
||||
#include <libcamera/controls.h>
|
||||
#include <libcamera/geometry.h>
|
||||
|
||||
#include <libcamera/ipa/core_ipa_interface.h>
|
||||
|
||||
#include "libcamera/internal/debug_controls.h"
|
||||
|
||||
#include <libipa/camera_sensor_helper.h>
|
||||
#include <libipa/fc_queue.h>
|
||||
#include <libipa/matrix.h>
|
||||
@@ -194,6 +197,8 @@ struct IPAContext {
|
||||
|
||||
ControlInfoMap::Map ctrlMap;
|
||||
|
||||
DebugMetadata debugMetadata;
|
||||
|
||||
/* Interface to the Camera Helper */
|
||||
std::unique_ptr<CameraSensorHelper> camHelper;
|
||||
};
|
||||
|
||||
@@ -117,6 +117,7 @@ const IPAHwSettings ipaHwSettingsV12{
|
||||
const ControlInfoMap::Map rkisp1Controls{
|
||||
{ &controls::AwbEnable, ControlInfo(false, true) },
|
||||
{ &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) },
|
||||
{ &controls::DebugMetadataEnable, ControlInfo(false, true, false) },
|
||||
{ &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },
|
||||
{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },
|
||||
};
|
||||
@@ -326,6 +327,7 @@ void IPARkISP1::unmapBuffers(const std::vector<unsigned int> &ids)
|
||||
void IPARkISP1::queueRequest(const uint32_t frame, const ControlList &controls)
|
||||
{
|
||||
IPAFrameContext &frameContext = context_.frameContexts.alloc(frame);
|
||||
context_.debugMetadata.enableByControl(controls);
|
||||
|
||||
for (auto const &a : algorithms()) {
|
||||
Algorithm *algo = static_cast<Algorithm *>(a.get());
|
||||
@@ -378,6 +380,7 @@ void IPARkISP1::processStats(const uint32_t frame, const uint32_t bufferId,
|
||||
|
||||
setControls(frame);
|
||||
|
||||
context_.debugMetadata.moveEntries(metadata);
|
||||
metadataReady.emit(frame, metadata);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user