ipa: ipc: Rename CameraSensorInfo to IPACameraSensorInfo

This matches the naming convention for IPA IPC.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Acked-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Umang Jain 2021-05-24 14:50:20 +05:30 committed by Laurent Pinchart
parent 6449590b63
commit 378f572e7f
13 changed files with 34 additions and 34 deletions

View file

@ -39,7 +39,7 @@ static constexpr uint32_t kMaxGain = kMaxISO / 100;
static constexpr uint32_t kMinExposure = 1;
static constexpr uint32_t kMaxExposure = 1976;
/* \todo those should be get from CameraSensorInfo ! */
/* \todo those should be got from IPACameraSensorInfo ! */
/* line duration in microseconds */
static constexpr double kLineDuration = 16.8;
static constexpr double kMaxExposureTime = kMaxExposure * kLineDuration;

View file

@ -89,7 +89,7 @@ public:
void start(const ControlList &controls, ipa::RPi::StartConfig *startConfig) override;
void stop() override {}
int configure(const CameraSensorInfo &sensorInfo,
int configure(const IPACameraSensorInfo &sensorInfo,
const std::map<unsigned int, IPAStream> &streamConfig,
const std::map<unsigned int, ControlInfoMap> &entityControls,
const ipa::RPi::IPAConfig &data,
@ -101,7 +101,7 @@ public:
void signalIspPrepare(const ipa::RPi::ISPConfig &data) override;
private:
void setMode(const CameraSensorInfo &sensorInfo);
void setMode(const IPACameraSensorInfo &sensorInfo);
bool validateSensorControls();
bool validateIspControls();
void queueRequest(const ControlList &controls);
@ -278,7 +278,7 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf
lastRunTimestamp_ = 0;
}
void IPARPi::setMode(const CameraSensorInfo &sensorInfo)
void IPARPi::setMode(const IPACameraSensorInfo &sensorInfo)
{
mode_.bitdepth = sensorInfo.bitsPerPixel;
mode_.width = sensorInfo.outputSize.width;
@ -323,7 +323,7 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo)
mode_.max_frame_length = sensorInfo.maxFrameLength;
}
int IPARPi::configure(const CameraSensorInfo &sensorInfo,
int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,
[[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,
const std::map<unsigned int, ControlInfoMap> &entityControls,
const ipa::RPi::IPAConfig &ipaConfig,

View file

@ -37,7 +37,7 @@ public:
int start() override;
void stop() override {}
int configure(const CameraSensorInfo &info,
int configure(const IPACameraSensorInfo &info,
const std::map<uint32_t, IPAStream> &streamConfig,
const std::map<uint32_t, ControlInfoMap> &entityControls) override;
void mapBuffers(const std::vector<IPABuffer> &buffers) override;
@ -90,12 +90,12 @@ int IPARkISP1::start()
}
/**
* \todo The RkISP1 pipeline currently provides an empty CameraSensorInfo
* \todo The RkISP1 pipeline currently provides an empty IPACameraSensorInfo
* if the connected sensor does not provide enough information to properly
* assemble one. Make sure the reported sensor information are relevant
* before accessing them.
*/
int IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,
int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info,
[[maybe_unused]] const std::map<uint32_t, IPAStream> &streamConfig,
const std::map<uint32_t, ControlInfoMap> &entityControls)
{

View file

@ -205,7 +205,7 @@ int CameraSensor::validateSensorDriver()
*
* Failures in reading any of the targets are not deemed to be fatal,
* but some properties and features, like constructing a
* CameraSensorInfo for the IPA module, won't be supported.
* IPACameraSensorInfo for the IPA module, won't be supported.
*
* \todo Make support for selection targets mandatory as soon as all
* test platforms have been updated.
@ -674,7 +674,7 @@ int CameraSensor::setControls(ControlList *ctrls)
*
* \return 0 on success, a negative error code otherwise
*/
int CameraSensor::sensorInfo(CameraSensorInfo *info) const
int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const
{
if (!bayerFormat_)
return -EINVAL;
@ -701,7 +701,7 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const
}
/*
* CameraSensorInfo::analogCrop::x and CameraSensorInfo::analogCrop::y
* IPACameraSensorInfo::analogCrop::x and IPACameraSensorInfo::analogCrop::y
* are defined relatively to the active pixel area, while V4L2's
* TGT_CROP target is defined in respect to the full pixel array.
*

View file

@ -87,7 +87,7 @@ namespace libcamera {
*/
/**
* \struct CameraSensorInfo
* \struct IPACameraSensorInfo
* \brief Report the image sensor characteristics
*
* The structure reports image sensor characteristics used by IPA modules to
@ -105,7 +105,7 @@ namespace libcamera {
*/
/**
* \var CameraSensorInfo::model
* \var IPACameraSensorInfo::model
* \brief The image sensor model name
*
* The sensor model name is a free-formed string that uniquely identifies the
@ -113,18 +113,18 @@ namespace libcamera {
*/
/**
* \var CameraSensorInfo::bitsPerPixel
* \var IPACameraSensorInfo::bitsPerPixel
* \brief The number of bits per pixel of the image format produced by the
* image sensor
*/
/**
* \var CameraSensorInfo::activeAreaSize
* \var IPACameraSensorInfo::activeAreaSize
* \brief The size of the pixel array active area of the sensor
*/
/**
* \var CameraSensorInfo::analogCrop
* \var IPACameraSensorInfo::analogCrop
* \brief The portion of the pixel array active area which is read-out and
* processed
*
@ -137,7 +137,7 @@ namespace libcamera {
*/
/**
* \var CameraSensorInfo::outputSize
* \var IPACameraSensorInfo::outputSize
* \brief The size of the images produced by the camera sensor
*
* The output image size defines the horizontal and vertical sizes of the images
@ -150,7 +150,7 @@ namespace libcamera {
*/
/**
* \var CameraSensorInfo::pixelRate
* \var IPACameraSensorInfo::pixelRate
* \brief The number of pixels produced in a second
*
* To obtain the read-out time in seconds of a full line:
@ -161,14 +161,14 @@ namespace libcamera {
*/
/**
* \var CameraSensorInfo::lineLength
* \var IPACameraSensorInfo::lineLength
* \brief Total line length in pixels
*
* The total line length in pixel clock periods, including blanking.
*/
/**
* \var CameraSensorInfo::minFrameLength
* \var IPACameraSensorInfo::minFrameLength
* \brief The minimum allowable frame length in units of lines
*
* The sensor frame length comprises of active output lines and blanking lines
@ -183,7 +183,7 @@ namespace libcamera {
*/
/**
* \var CameraSensorInfo::maxFrameLength
* \var IPACameraSensorInfo::maxFrameLength
* \brief The maximum allowable frame length in units of lines
*
* The sensor frame length comprises of active output lines and blanking lines

View file

@ -547,7 +547,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
if (ret)
return ret;
CameraSensorInfo sensorInfo;
IPACameraSensorInfo sensorInfo;
cio2->sensor()->sensorInfo(&sensorInfo);
data->cropRegion_ = sensorInfo.analogCrop;
@ -924,7 +924,7 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data)
if (ret)
return ret;
CameraSensorInfo sensorInfo{};
IPACameraSensorInfo sensorInfo{};
ret = sensor->sensorInfo(&sensorInfo);
if (ret)
return ret;

View file

@ -210,7 +210,7 @@ public:
BayerFormat::Order nativeBayerOrder_;
/* For handling digital zoom. */
CameraSensorInfo sensorInfo_;
IPACameraSensorInfo sensorInfo_;
Rectangle ispCrop_; /* crop in ISP (camera mode) pixels */
Rectangle scalerCrop_; /* crop in sensor native pixels */
Size ispMinCropSize_;
@ -1275,7 +1275,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
ipaConfig.lsTableHandle = lsTable_;
}
/* We store the CameraSensorInfo for digital zoom calculations. */
/* We store the IPACameraSensorInfo for digital zoom calculations. */
int ret = sensor_->sensorInfo(&sensorInfo_);
if (ret) {
LOG(RPI, Error) << "Failed to retrieve camera sensor info";

View file

@ -648,7 +648,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
return ret;
/* Inform IPA of stream configuration and sensor controls. */
CameraSensorInfo sensorInfo = {};
IPACameraSensorInfo sensorInfo = {};
ret = data->sensor_->sensorInfo(&sensorInfo);
if (ret) {
/* \todo Turn this into a hard failure. */