@@ -71,14 +71,6 @@ mbusCodeToPixelFormat(unsigned int code, BayerFormat::Packing packingReq)
return pix;
}
-bool isMonoSensor(std::unique_ptr<CameraSensor> &sensor)
-{
- unsigned int mbusCode = sensor->mbusCodes()[0];
- const BayerFormat &bayer = BayerFormat::fromMbusCode(mbusCode);
-
- return bayer.cfa.order == ColorFilterArray::Order::MONO;
-}
-
const std::vector<ColorSpace> validColorSpaces = {
ColorSpace::Sycc,
ColorSpace::Smpte170m,
@@ -1190,7 +1182,7 @@ int CameraData::loadIPA(ipa::RPi::InitResult *result)
/* The configuration (tuning file) is made from the sensor name. */
std::string model = sensor_->model();
- if (isMonoSensor(sensor_))
+ if (sensor_->isMono())
model += "_mono";
std::string configurationFile = ipa_->configurationFile(model + ".json");
With the raw sensor model in place, the media bus codes may no longer indicate the bayer order or if the pixel data is monochrome. Rely on the newly introduced CameraSensor::isMono() helper instead. Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> --- src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)