ipa: rpi: Fix printing of utils::Duration
`utils::Duration` derives from `std::chrono::duration<...>`, but multiplying it yields an `std::chrono::duration<...>`, not `Duration`. chrono duration types only have `operator<<` in C++20 or later, so this usage should not compile. It only did so because the `operator<<` for `Duration` was in the `libcamera` namespace and `Duration` has an implicit constructor from any chrono duration type. This will cease to work when that operator is moved into the `utils` namespace for ADL purposes. So fix it by making the cast to `Duration` explicit. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
This commit is contained in:
@@ -604,7 +604,7 @@ void IpaBase::setMode(const IPACameraSensorInfo &sensorInfo)
|
||||
mode_.minLineLength = adjustedLineLength;
|
||||
} else {
|
||||
LOG(IPARPI, Error)
|
||||
<< "Sensor minimum line length of " << pixelTime * mode_.width
|
||||
<< "Sensor minimum line length of " << Duration(pixelTime * mode_.width)
|
||||
<< " (" << 1us / pixelTime << " MPix/s)"
|
||||
<< " is below the minimum allowable ISP limit of "
|
||||
<< adjustedLineLength
|
||||
|
||||
Reference in New Issue
Block a user