@@ -66,7 +66,6 @@ struct V4L2SubdeviceFormat {
std::optional<ColorSpace> colorSpace;
const std::string toString() const;
- uint8_t bitsPerPixel() const;
};
std::ostream &operator<<(std::ostream &out, const V4L2SubdeviceFormat &f);
@@ -1060,7 +1060,8 @@ int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const
ret = subdev_->getFormat(pad_, &format);
if (ret)
return ret;
- info->bitsPerPixel = format.bitsPerPixel();
+
+ info->bitsPerPixel = MediaBusFormatInfo::info(format.mbus_code).bitsPerPixel;
info->outputSize = format.size;
std::optional<int32_t> cfa = properties_.get(properties::draft::ColorFilterArrangement);
@@ -765,16 +765,6 @@ const std::string V4L2SubdeviceFormat::toString() const
return ss.str();
}
-/**
- * \brief Retrieve the number of bits per pixel for the V4L2 subdevice format
- * \return The number of bits per pixel for the format, or 0 if the format is
- * not supported
- */
-uint8_t V4L2SubdeviceFormat::bitsPerPixel() const
-{
- return MediaBusFormatInfo::info(mbus_code).bitsPerPixel;
-}
-
/**
* \brief Insert a text representation of a V4L2SubdeviceFormat into an output
* stream