mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-15 16:35:06 +03:00
libcamera: pipeline: Move IPA from pipeline to camera data
The IPA acts on a camera and not on a pipeline which can expose more then one camera. Move the IPA reference to the CameraData. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
3a924ee250
commit
8eec5712c0
3 changed files with 15 additions and 7 deletions
|
@ -14,6 +14,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <ipa/ipa_interface.h>
|
||||||
#include <libcamera/controls.h>
|
#include <libcamera/controls.h>
|
||||||
#include <libcamera/stream.h>
|
#include <libcamera/stream.h>
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@ public:
|
||||||
PipelineHandler *pipe_;
|
PipelineHandler *pipe_;
|
||||||
std::list<Request *> queuedRequests_;
|
std::list<Request *> queuedRequests_;
|
||||||
ControlInfoMap controlInfo_;
|
ControlInfoMap controlInfo_;
|
||||||
|
std::unique_ptr<IPAInterface> ipa_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CameraData(const CameraData &) = delete;
|
CameraData(const CameraData &) = delete;
|
||||||
|
|
|
@ -101,8 +101,6 @@ private:
|
||||||
return static_cast<VimcCameraData *>(
|
return static_cast<VimcCameraData *>(
|
||||||
PipelineHandler::cameraData(camera));
|
PipelineHandler::cameraData(camera));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<IPAInterface> ipa_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
VimcCameraConfiguration::VimcCameraConfiguration()
|
VimcCameraConfiguration::VimcCameraConfiguration()
|
||||||
|
@ -353,13 +351,13 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
|
||||||
if (!media)
|
if (!media)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ipa_ = IPAManager::instance()->createIPA(this, 0, 0);
|
std::unique_ptr<VimcCameraData> data = utils::make_unique<VimcCameraData>(this);
|
||||||
if (ipa_ == nullptr)
|
|
||||||
|
data->ipa_ = IPAManager::instance()->createIPA(this, 0, 0);
|
||||||
|
if (data->ipa_ == nullptr)
|
||||||
LOG(VIMC, Warning) << "no matching IPA found";
|
LOG(VIMC, Warning) << "no matching IPA found";
|
||||||
else
|
else
|
||||||
ipa_->init();
|
data->ipa_->init();
|
||||||
|
|
||||||
std::unique_ptr<VimcCameraData> data = utils::make_unique<VimcCameraData>(this);
|
|
||||||
|
|
||||||
/* Locate and open the capture video node. */
|
/* Locate and open the capture video node. */
|
||||||
if (data->init(media))
|
if (data->init(media))
|
||||||
|
|
|
@ -96,6 +96,14 @@ LOG_DEFINE_CATEGORY(Pipeline)
|
||||||
* creating the camera, and shall not be modified afterwards.
|
* creating the camera, and shall not be modified afterwards.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \var CameraData::ipa_
|
||||||
|
* \brief The IPA module used by the camera
|
||||||
|
*
|
||||||
|
* Reference to the Image Processing Algorithms (IPA) operating on the camera's
|
||||||
|
* stream(s). If no IPA exists for the camera, this field is set to nullptr.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class PipelineHandler
|
* \class PipelineHandler
|
||||||
* \brief Create and manage cameras based on a set of media devices
|
* \brief Create and manage cameras based on a set of media devices
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue