From a6c41759fcdd90f395ea90040e55d1b881ea04f6 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 18 Feb 2021 12:48:23 +0000 Subject: pipeline: ipa: raspberrypi: Rename IPA Interface namespace to ipa::RPi Rename the IPA interface namespace to ipa::RPi for consistency with the libcamera::RPi namespace label. There is no functional change in this commit. Signed-off-by: Naushir Patuck Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 30 +++++++++++----------- src/libcamera/pipeline/raspberrypi/rpi_stream.cpp | 4 +-- src/libcamera/pipeline/raspberrypi/rpi_stream.h | 4 +-- 3 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src/libcamera/pipeline/raspberrypi') diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index aac285b4..acf2d56c 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -166,7 +166,7 @@ public: void handleState(); void applyScalerCrop(const ControlList &controls); - std::unique_ptr ipa_; + std::unique_ptr ipa_; std::unique_ptr sensor_; /* Array of Unicam and ISP device streams and associated buffers/streams. */ @@ -778,8 +778,8 @@ int PipelineHandlerRPi::start(Camera *camera, ControlList *controls) data->applyScalerCrop(*controls); /* Start the IPA. */ - ipa::rpi::StartControls ipaData; - ipa::rpi::StartControls result; + ipa::RPi::StartControls ipaData; + ipa::RPi::StartControls result; if (controls) ipaData.controls = *controls; data->ipa_->start(ipaData, &result); @@ -1114,8 +1114,8 @@ int PipelineHandlerRPi::prepareBuffers(Camera *camera) * Pass the stats and embedded data buffers to the IPA. No other * buffers need to be passed. */ - mapBuffers(camera, data->isp_[Isp::Stats].getBuffers(), ipa::rpi::MaskStats); - mapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(), ipa::rpi::MaskEmbeddedData); + mapBuffers(camera, data->isp_[Isp::Stats].getBuffers(), ipa::RPi::MaskStats); + mapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(), ipa::RPi::MaskEmbeddedData); return 0; } @@ -1164,7 +1164,7 @@ void RPiCameraData::frameStarted(uint32_t sequence) int RPiCameraData::loadIPA() { - ipa_ = IPAManager::createIPA(pipe_, 1, 1); + ipa_ = IPAManager::createIPA(pipe_, 1, 1); if (!ipa_) return -ENOENT; @@ -1188,7 +1188,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) std::map streamConfig; std::map entityControls; - ipa::rpi::ConfigInput ipaConfig; + ipa::RPi::ConfigInput ipaConfig; /* Get the device format to pass to the IPA. */ V4L2DeviceFormat sensorFormat; @@ -1211,7 +1211,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) /* Allocate the lens shading table via dmaHeap and pass to the IPA. */ if (!lsTable_.isValid()) { - lsTable_ = dmaHeap_.alloc("ls_grid", ipa::rpi::MaxLsGridSize); + lsTable_ = dmaHeap_.alloc("ls_grid", ipa::RPi::MaxLsGridSize); if (!lsTable_.isValid()) return -ENOMEM; @@ -1231,7 +1231,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) } /* Ready the IPA - it must know about the sensor resolution. */ - ipa::rpi::ConfigOutput result; + ipa::RPi::ConfigOutput result; ipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig, &result, &ret); @@ -1241,7 +1241,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) return -EPIPE; } - if (result.params & ipa::rpi::ConfigSensorParams) { + if (result.params & ipa::RPi::ConfigSensorParams) { /* * Setup our delayed control writer with the sensor default * gain and exposure delays. @@ -1455,7 +1455,7 @@ void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer) * application until after the IPA signals so. */ if (stream == &isp_[Isp::Stats]) { - ipa_->signalStatReady(ipa::rpi::MaskStats | static_cast(index)); + ipa_->signalStatReady(ipa::RPi::MaskStats | static_cast(index)); } else { /* Any other ISP output can be handed back to the application now. */ handleStreamBuffer(buffer, stream); @@ -1559,7 +1559,7 @@ void RPiCameraData::handleExternalBuffer(FrameBuffer *buffer, RPi::Stream *strea { unsigned int id = stream->getBufferId(buffer); - if (!(id & ipa::rpi::MaskExternalBuffer)) + if (!(id & ipa::RPi::MaskExternalBuffer)) return; /* Stop the Stream object from tracking the buffer. */ @@ -1691,9 +1691,9 @@ void RPiCameraData::tryRunPipeline() << " Bayer buffer id: " << bayerId << " Embedded buffer id: " << embeddedId; - ipa::rpi::ISPConfig ispPrepare; - ispPrepare.embeddedBufferId = ipa::rpi::MaskEmbeddedData | embeddedId; - ispPrepare.bayerBufferId = ipa::rpi::MaskBayerData | bayerId; + ipa::RPi::ISPConfig ispPrepare; + ispPrepare.embeddedBufferId = ipa::RPi::MaskEmbeddedData | embeddedId; + ispPrepare.bayerBufferId = ipa::RPi::MaskBayerData | bayerId; ipa_->signalIspPrepare(ispPrepare); } diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp index 496dd36f..f2430415 100644 --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp @@ -72,7 +72,7 @@ int Stream::getBufferId(FrameBuffer *buffer) const void Stream::setExternalBuffer(FrameBuffer *buffer) { - bufferMap_.emplace(ipa::rpi::MaskExternalBuffer | id_.get(), buffer); + bufferMap_.emplace(ipa::RPi::MaskExternalBuffer | id_.get(), buffer); } void Stream::removeExternalBuffer(FrameBuffer *buffer) @@ -80,7 +80,7 @@ void Stream::removeExternalBuffer(FrameBuffer *buffer) int id = getBufferId(buffer); /* Ensure we have this buffer in the stream, and it is marked external. */ - ASSERT(id != -1 && (id & ipa::rpi::MaskExternalBuffer)); + ASSERT(id != -1 && (id & ipa::RPi::MaskExternalBuffer)); bufferMap_.erase(id); } diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h index 701110d0..f1ac715f 100644 --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h @@ -32,13 +32,13 @@ class Stream : public libcamera::Stream { public: Stream() - : id_(ipa::rpi::MaskID) + : id_(ipa::RPi::MaskID) { } Stream(const char *name, MediaEntity *dev, bool importOnly = false) : external_(false), importOnly_(importOnly), name_(name), - dev_(std::make_unique(dev)), id_(ipa::rpi::MaskID) + dev_(std::make_unique(dev)), id_(ipa::RPi::MaskID) { } -- cgit v1.2.1