diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-02-26 13:15:18 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-03-15 12:55:00 +0200 |
commit | 4c82481fc4622c2e78ec9f426bcad27728bb7079 (patch) | |
tree | e8afb009894534e24b870c3652362eb0a38c6189 /src/libcamera/camera_sensor.cpp | |
parent | 7941903d628a4511fc1cd63ab0df291d70c99bbd (diff) |
libcamera: v4l2_subdevice: Drop V4L2SubdeviceFormat::bitsPerPixel()
The V4L2SubdeviceFormat::bitsPerPixel() function is just a wrapper
around a MediaBusFormatInfo lookup. It made sense when the
MediaBusFormatInfo class was not exposed outside of the compilation
unit, but is now redundant. Drop it and use MediaBusFormatInfo in the
only caller.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/camera_sensor.cpp')
-rw-r--r-- | src/libcamera/camera_sensor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 0ef78d9c..55c9c74b 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -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); |