| Message ID | 20260616120828.375547-3-stefan.klug@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Stefan Klug (2026-06-16 21:08:15) > Rename IPACameraSensorInfo::activeAreaSize to > IPACameraSensorInfo::pixelArraySize to better describe the content. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Looks good to me. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > --- > include/libcamera/ipa/core.mojom | 4 ++-- > src/ipa/rkisp1/algorithms/lsc.cpp | 6 +----- > src/ipa/rpi/common/ipa_base.cpp | 4 ++-- > src/libcamera/sensor/camera_sensor_legacy.cpp | 2 +- > src/libcamera/sensor/camera_sensor_raw.cpp | 2 +- > 5 files changed, 7 insertions(+), 11 deletions(-) > > diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom > index 5da780f5d256..f2e9b0997819 100644 > --- a/include/libcamera/ipa/core.mojom > +++ b/include/libcamera/ipa/core.mojom > @@ -153,7 +153,7 @@ module libcamera; > */ > > /** > - * \var IPACameraSensorInfo::activeAreaSize > + * \var IPACameraSensorInfo::pixelArraySize > * \brief The size of the physical pixel array of the sensor in pixels > */ > > @@ -243,7 +243,7 @@ struct IPACameraSensorInfo { > uint32 bitsPerPixel; > uint32 cfaPattern; > > - Size activeAreaSize; > + Size pixelArraySize; > Rectangle analogCrop; > Size outputSize; > > diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp > index 25f7c512b35c..a3029414ed6e 100644 > --- a/src/ipa/rkisp1/algorithms/lsc.cpp > +++ b/src/ipa/rkisp1/algorithms/lsc.cpp > @@ -401,11 +401,7 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context, > ret = loader.parseLscData(yamlSets, lscData); > } else if (type == "polynomial") { > LOG(RkISP1Lsc, Debug) << "Loading polynomial LSC data."; > - /* > - * \todo: Most likely the reference frame should be native_size. > - * Let's wait how the internal discussions progress. > - */ > - auto loader = LscPolynomialLoader(context.sensorInfo.activeAreaSize); > + auto loader = LscPolynomialLoader(context.sensorInfo.pixelArraySize); > ret = loader.parseLscData(yamlSets, lscData); > } else { > LOG(RkISP1Lsc, Error) << "Unsupported LSC data type '" > diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp > index dacafa578c98..fc0eb3bf4b5c 100644 > --- a/src/ipa/rpi/common/ipa_base.cpp > +++ b/src/ipa/rpi/common/ipa_base.cpp > @@ -567,8 +567,8 @@ void IpaBase::setMode(const IPACameraSensorInfo &sensorInfo) > mode_.bitdepth = sensorInfo.bitsPerPixel; > mode_.width = sensorInfo.outputSize.width; > mode_.height = sensorInfo.outputSize.height; > - mode_.sensorWidth = sensorInfo.activeAreaSize.width; > - mode_.sensorHeight = sensorInfo.activeAreaSize.height; > + mode_.sensorWidth = sensorInfo.pixelArraySize.width; > + mode_.sensorHeight = sensorInfo.pixelArraySize.height; > mode_.cropX = sensorInfo.analogCrop.x; > mode_.cropY = sensorInfo.analogCrop.y; > mode_.pixelRate = sensorInfo.pixelRate; > diff --git a/src/libcamera/sensor/camera_sensor_legacy.cpp b/src/libcamera/sensor/camera_sensor_legacy.cpp > index 482e387d3b24..e3e97b5b9ef3 100644 > --- a/src/libcamera/sensor/camera_sensor_legacy.cpp > +++ b/src/libcamera/sensor/camera_sensor_legacy.cpp > @@ -880,7 +880,7 @@ int CameraSensorLegacy::sensorInfo(IPACameraSensorInfo *info) const > * rectangle needs to be re-read as it depends on the sensor > * configuration. > */ > - info->activeAreaSize = { activeArea_.width, activeArea_.height }; > + info->pixelArraySize = { pixelArraySize_.width, pixelArraySize_.height }; > > /* > * \todo Support for retreiving the crop rectangle is scheduled to > diff --git a/src/libcamera/sensor/camera_sensor_raw.cpp b/src/libcamera/sensor/camera_sensor_raw.cpp > index 410edeb68983..62da78acc513 100644 > --- a/src/libcamera/sensor/camera_sensor_raw.cpp > +++ b/src/libcamera/sensor/camera_sensor_raw.cpp > @@ -998,7 +998,7 @@ int CameraSensorRaw::sensorInfo(IPACameraSensorInfo *info) const > * rectangle needs to be re-read as it depends on the sensor > * configuration. > */ > - info->activeAreaSize = { activeArea_.width, activeArea_.height }; > + info->pixelArraySize = { activeArea_.width, activeArea_.height }; > > int ret = subdev_->getSelection(streams_.image.sink, V4L2_SEL_TGT_CROP, > &info->analogCrop); > -- > 2.53.0 >
diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom index 5da780f5d256..f2e9b0997819 100644 --- a/include/libcamera/ipa/core.mojom +++ b/include/libcamera/ipa/core.mojom @@ -153,7 +153,7 @@ module libcamera; */ /** - * \var IPACameraSensorInfo::activeAreaSize + * \var IPACameraSensorInfo::pixelArraySize * \brief The size of the physical pixel array of the sensor in pixels */ @@ -243,7 +243,7 @@ struct IPACameraSensorInfo { uint32 bitsPerPixel; uint32 cfaPattern; - Size activeAreaSize; + Size pixelArraySize; Rectangle analogCrop; Size outputSize; diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp index 25f7c512b35c..a3029414ed6e 100644 --- a/src/ipa/rkisp1/algorithms/lsc.cpp +++ b/src/ipa/rkisp1/algorithms/lsc.cpp @@ -401,11 +401,7 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context, ret = loader.parseLscData(yamlSets, lscData); } else if (type == "polynomial") { LOG(RkISP1Lsc, Debug) << "Loading polynomial LSC data."; - /* - * \todo: Most likely the reference frame should be native_size. - * Let's wait how the internal discussions progress. - */ - auto loader = LscPolynomialLoader(context.sensorInfo.activeAreaSize); + auto loader = LscPolynomialLoader(context.sensorInfo.pixelArraySize); ret = loader.parseLscData(yamlSets, lscData); } else { LOG(RkISP1Lsc, Error) << "Unsupported LSC data type '" diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index dacafa578c98..fc0eb3bf4b5c 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -567,8 +567,8 @@ void IpaBase::setMode(const IPACameraSensorInfo &sensorInfo) mode_.bitdepth = sensorInfo.bitsPerPixel; mode_.width = sensorInfo.outputSize.width; mode_.height = sensorInfo.outputSize.height; - mode_.sensorWidth = sensorInfo.activeAreaSize.width; - mode_.sensorHeight = sensorInfo.activeAreaSize.height; + mode_.sensorWidth = sensorInfo.pixelArraySize.width; + mode_.sensorHeight = sensorInfo.pixelArraySize.height; mode_.cropX = sensorInfo.analogCrop.x; mode_.cropY = sensorInfo.analogCrop.y; mode_.pixelRate = sensorInfo.pixelRate; diff --git a/src/libcamera/sensor/camera_sensor_legacy.cpp b/src/libcamera/sensor/camera_sensor_legacy.cpp index 482e387d3b24..e3e97b5b9ef3 100644 --- a/src/libcamera/sensor/camera_sensor_legacy.cpp +++ b/src/libcamera/sensor/camera_sensor_legacy.cpp @@ -880,7 +880,7 @@ int CameraSensorLegacy::sensorInfo(IPACameraSensorInfo *info) const * rectangle needs to be re-read as it depends on the sensor * configuration. */ - info->activeAreaSize = { activeArea_.width, activeArea_.height }; + info->pixelArraySize = { pixelArraySize_.width, pixelArraySize_.height }; /* * \todo Support for retreiving the crop rectangle is scheduled to diff --git a/src/libcamera/sensor/camera_sensor_raw.cpp b/src/libcamera/sensor/camera_sensor_raw.cpp index 410edeb68983..62da78acc513 100644 --- a/src/libcamera/sensor/camera_sensor_raw.cpp +++ b/src/libcamera/sensor/camera_sensor_raw.cpp @@ -998,7 +998,7 @@ int CameraSensorRaw::sensorInfo(IPACameraSensorInfo *info) const * rectangle needs to be re-read as it depends on the sensor * configuration. */ - info->activeAreaSize = { activeArea_.width, activeArea_.height }; + info->pixelArraySize = { activeArea_.width, activeArea_.height }; int ret = subdev_->getSelection(streams_.image.sink, V4L2_SEL_TGT_CROP, &info->analogCrop);
Rename IPACameraSensorInfo::activeAreaSize to IPACameraSensorInfo::pixelArraySize to better describe the content. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- include/libcamera/ipa/core.mojom | 4 ++-- src/ipa/rkisp1/algorithms/lsc.cpp | 6 +----- src/ipa/rpi/common/ipa_base.cpp | 4 ++-- src/libcamera/sensor/camera_sensor_legacy.cpp | 2 +- src/libcamera/sensor/camera_sensor_raw.cpp | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-)