libcamera: Replace toString with operator<<() for format classes

Now that format classes implement the stream formatting operator<<(),
use it instead of the toString() function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Laurent Pinchart 2022-04-29 03:59:45 +03:00
parent d5d6dbe85c
commit 8a845ab078
22 changed files with 59 additions and 63 deletions

View file

@ -554,7 +554,7 @@ int CameraCapabilities::initializeStreamConfigurations()
formatsMap_[androidFormat] = formats::MJPEG; formatsMap_[androidFormat] = formats::MJPEG;
LOG(HAL, Debug) << "Mapped Android format " LOG(HAL, Debug) << "Mapped Android format "
<< camera3Format.name << " to " << camera3Format.name << " to "
<< formats::MJPEG.toString() << formats::MJPEG
<< " (fixed mapping)"; << " (fixed mapping)";
continue; continue;
} }
@ -566,7 +566,7 @@ int CameraCapabilities::initializeStreamConfigurations()
PixelFormat mappedFormat; PixelFormat mappedFormat;
for (const PixelFormat &pixelFormat : libcameraFormats) { for (const PixelFormat &pixelFormat : libcameraFormats) {
LOG(HAL, Debug) << "Testing " << pixelFormat.toString(); LOG(HAL, Debug) << "Testing " << pixelFormat;
/* /*
* The stream configuration size can be adjusted, * The stream configuration size can be adjusted,
@ -605,7 +605,7 @@ int CameraCapabilities::initializeStreamConfigurations()
formatsMap_[androidFormat] = mappedFormat; formatsMap_[androidFormat] = mappedFormat;
LOG(HAL, Debug) << "Mapped Android format " LOG(HAL, Debug) << "Mapped Android format "
<< camera3Format.name << " to " << camera3Format.name << " to "
<< mappedFormat.toString(); << mappedFormat;
std::vector<Size> resolutions; std::vector<Size> resolutions;
const PixelFormatInfo &info = PixelFormatInfo::info(mappedFormat); const PixelFormatInfo &info = PixelFormatInfo::info(mappedFormat);

View file

@ -575,7 +575,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
<< ", crop_rotate_scale_degrees: " << ", crop_rotate_scale_degrees: "
<< rotationToString(stream->crop_rotate_scale_degrees) << rotationToString(stream->crop_rotate_scale_degrees)
#endif #endif
<< " (" << format.toString() << ")"; << " (" << format << ")";
if (!format.isValid()) if (!format.isValid())
return -EINVAL; return -EINVAL;
@ -926,7 +926,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques
<< camera3Stream->height << ")" << camera3Stream->height << ")"
<< "[" << utils::hex(camera3Stream->format) << "] -> " << "[" << utils::hex(camera3Stream->format) << "] -> "
<< "(" << cameraStream->configuration().size << ")[" << "(" << cameraStream->configuration().size << ")["
<< cameraStream->configuration().pixelFormat.toString() << "]"; << cameraStream->configuration().pixelFormat << "]";
/* /*
* Inspect the camera stream type, create buffers opportunely * Inspect the camera stream type, create buffers opportunely

View file

@ -59,7 +59,7 @@ const struct JPEGPixelFormatInfo &findPixelInfo(const PixelFormat &format)
const auto iter = pixelInfo.find(format); const auto iter = pixelInfo.find(format);
if (iter == pixelInfo.end()) { if (iter == pixelInfo.end()) {
LOG(JPEG, Error) << "Unsupported pixel format for JPEG encoder: " LOG(JPEG, Error) << "Unsupported pixel format for JPEG encoder: "
<< format.toString(); << format;
return invalidPixelFormat; return invalidPixelFormat;
} }

View file

@ -30,7 +30,7 @@ void Thumbnailer::configure(const Size &sourceSize, PixelFormat pixelFormat)
if (pixelFormat_ != formats::NV12) { if (pixelFormat_ != formats::NV12) {
LOG(Thumbnailer, Error) LOG(Thumbnailer, Error)
<< "Failed to configure: Pixel Format " << "Failed to configure: Pixel Format "
<< pixelFormat_.toString() << " unsupported."; << pixelFormat_ << " unsupported.";
return; return;
} }

View file

@ -66,8 +66,7 @@ CameraBuffer::Private::Private([[maybe_unused]] CameraBuffer *cameraBuffer,
const auto &info = PixelFormatInfo::info(pixelFormat); const auto &info = PixelFormatInfo::info(pixelFormat);
if (!info.isValid()) { if (!info.isValid()) {
error_ = -EINVAL; error_ = -EINVAL;
LOG(HAL, Error) << "Invalid pixel format: " LOG(HAL, Error) << "Invalid pixel format: " << pixelFormat;
<< pixelFormat.toString();
return; return;
} }

View file

@ -27,8 +27,8 @@ int PostProcessorYuv::configure(const StreamConfiguration &inCfg,
{ {
if (inCfg.pixelFormat != outCfg.pixelFormat) { if (inCfg.pixelFormat != outCfg.pixelFormat) {
LOG(YUV, Error) << "Pixel format conversion is not supported" LOG(YUV, Error) << "Pixel format conversion is not supported"
<< " (from " << inCfg.pixelFormat.toString() << " (from " << inCfg.pixelFormat
<< " to " << outCfg.pixelFormat.toString() << ")"; << " to " << outCfg.pixelFormat << ")";
return -EINVAL; return -EINVAL;
} }

View file

@ -145,7 +145,7 @@ void CameraSession::infoConfiguration() const
const StreamFormats &formats = cfg.formats(); const StreamFormats &formats = cfg.formats();
for (PixelFormat pixelformat : formats.pixelformats()) { for (PixelFormat pixelformat : formats.pixelformats()) {
std::cout << " * Pixelformat: " std::cout << " * Pixelformat: "
<< pixelformat.toString() << " " << pixelformat << " "
<< formats.range(pixelformat).toString() << formats.range(pixelformat).toString()
<< std::endl; << std::endl;

View file

@ -194,7 +194,7 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
if (ret) { if (ret) {
std::cerr std::cerr
<< "Unable to find display pipeline for format " << "Unable to find display pipeline for format "
<< format.toString() << std::endl; << format << std::endl;
return ret; return ret;
} }

View file

@ -211,7 +211,7 @@ int CIO2Device::configure(const Size &size, V4L2DeviceFormat *outputFormat)
if (ret) if (ret)
return ret; return ret;
LOG(IPU3, Debug) << "CIO2 output format " << outputFormat->toString(); LOG(IPU3, Debug) << "CIO2 output format " << outputFormat;
return 0; return 0;
} }

View file

@ -479,7 +479,7 @@ int ImgUDevice::configure(const PipeConfig &pipeConfig, V4L2DeviceFormat *inputF
if (ret) if (ret)
return ret; return ret;
LOG(IPU3, Debug) << "ImgU input format = " << inputFormat->toString(); LOG(IPU3, Debug) << "ImgU input format = " << inputFormat;
/* /*
* \todo The IPU3 driver implementation shall be changed to use the * \todo The IPU3 driver implementation shall be changed to use the
@ -511,7 +511,7 @@ int ImgUDevice::configure(const PipeConfig &pipeConfig, V4L2DeviceFormat *inputF
if (ret) if (ret)
return ret; return ret;
LOG(IPU3, Debug) << "ImgU GDC format = " << gdcFormat.toString(); LOG(IPU3, Debug) << "ImgU GDC format = " << gdcFormat;
StreamConfiguration paramCfg = {}; StreamConfiguration paramCfg = {};
paramCfg.size = inputFormat->size; paramCfg.size = inputFormat->size;
@ -568,7 +568,7 @@ int ImgUDevice::configureVideoDevice(V4L2VideoDevice *dev, unsigned int pad,
const char *name = dev == output_.get() ? "output" : "viewfinder"; const char *name = dev == output_.get() ? "output" : "viewfinder";
LOG(IPU3, Debug) << "ImgU " << name << " format = " LOG(IPU3, Debug) << "ImgU " << name << " format = "
<< outputFormat->toString(); << outputFormat;
return 0; return 0;
} }

View file

@ -167,7 +167,7 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &
} }
LOG(RPI, Debug) << "Format: " << size LOG(RPI, Debug) << "Format: " << size
<< " fmt " << format.toString() << " fmt " << format
<< " Score: " << score << " Score: " << score
<< " (best " << bestScore << ")"; << " (best " << bestScore << ")";
} }
@ -758,8 +758,8 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
return ret; return ret;
LOG(RPI, Info) << "Sensor: " << camera->id() LOG(RPI, Info) << "Sensor: " << camera->id()
<< " - Selected sensor format: " << sensorFormat.toString() << " - Selected sensor format: " << sensorFormat
<< " - Selected unicam format: " << unicamFormat.toString(); << " - Selected unicam format: " << unicamFormat;
ret = data->isp_[Isp::Input].dev()->setFormat(&unicamFormat); ret = data->isp_[Isp::Input].dev()->setFormat(&unicamFormat);
if (ret) if (ret)
@ -790,7 +790,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
format.colorSpace = cfg.colorSpace; format.colorSpace = cfg.colorSpace;
LOG(RPI, Debug) << "Setting " << stream->name() << " to " LOG(RPI, Debug) << "Setting " << stream->name() << " to "
<< format.toString(); << format;
ret = stream->dev()->setFormat(&format); ret = stream->dev()->setFormat(&format);
if (ret) if (ret)
@ -799,7 +799,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
if (format.size != cfg.size || format.fourcc != fourcc) { if (format.size != cfg.size || format.fourcc != fourcc) {
LOG(RPI, Error) LOG(RPI, Error)
<< "Failed to set requested format on " << stream->name() << "Failed to set requested format on " << stream->name()
<< ", returned " << format.toString(); << ", returned " << format;
return -EINVAL; return -EINVAL;
} }
@ -842,7 +842,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
} }
LOG(RPI, Debug) << "Defaulting ISP Output0 format to " LOG(RPI, Debug) << "Defaulting ISP Output0 format to "
<< format.toString(); << format;
} }
/* /*
@ -866,7 +866,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
output1Format.fourcc = V4L2PixelFormat::fromPixelFormat(formats::YUV420); output1Format.fourcc = V4L2PixelFormat::fromPixelFormat(formats::YUV420);
LOG(RPI, Debug) << "Setting ISP Output1 (internal) to " LOG(RPI, Debug) << "Setting ISP Output1 (internal) to "
<< output1Format.toString(); << output1Format;
ret = data->isp_[Isp::Output1].dev()->setFormat(&output1Format); ret = data->isp_[Isp::Output1].dev()->setFormat(&output1Format);
if (ret) { if (ret) {
@ -882,7 +882,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
ret = data->isp_[Isp::Stats].dev()->setFormat(&format); ret = data->isp_[Isp::Stats].dev()->setFormat(&format);
if (ret) { if (ret) {
LOG(RPI, Error) << "Failed to set format on ISP stats stream: " LOG(RPI, Error) << "Failed to set format on ISP stats stream: "
<< format.toString(); << format;
return ret; return ret;
} }
@ -923,7 +923,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
ret = data->unicam_[Unicam::Embedded].dev()->setFormat(&format); ret = data->unicam_[Unicam::Embedded].dev()->setFormat(&format);
if (ret) { if (ret) {
LOG(RPI, Error) << "Failed to set format on Unicam embedded: " LOG(RPI, Error) << "Failed to set format on Unicam embedded: "
<< format.toString(); << format;
return ret; return ret;
} }
} }
@ -965,7 +965,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
if (ret) { if (ret) {
LOG(RPI, Error) << "Failed to set format on " << device->entity()->name() LOG(RPI, Error) << "Failed to set format on " << device->entity()->name()
<< " pad " << sinkPad->index() << " pad " << sinkPad->index()
<< " with format " << format.toString() << " with format " << format
<< ": " << ret; << ": " << ret;
return ret; return ret;
} }

View file

@ -573,13 +573,13 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
* the pipeline. * the pipeline.
*/ */
V4L2SubdeviceFormat format = config->sensorFormat(); V4L2SubdeviceFormat format = config->sensorFormat();
LOG(RkISP1, Debug) << "Configuring sensor with " << format.toString(); LOG(RkISP1, Debug) << "Configuring sensor with " << format;
ret = sensor->setFormat(&format); ret = sensor->setFormat(&format);
if (ret < 0) if (ret < 0)
return ret; return ret;
LOG(RkISP1, Debug) << "Sensor configured with " << format.toString(); LOG(RkISP1, Debug) << "Sensor configured with " << format;
ret = isp_->setFormat(0, &format); ret = isp_->setFormat(0, &format);
if (ret < 0) if (ret < 0)
@ -591,13 +591,13 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
return ret; return ret;
LOG(RkISP1, Debug) LOG(RkISP1, Debug)
<< "ISP input pad configured with " << format.toString() << "ISP input pad configured with " << format
<< " crop " << rect; << " crop " << rect;
/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */ /* YUYV8_2X8 is required on the ISP source path pad for YUV output. */
format.mbus_code = MEDIA_BUS_FMT_YUYV8_2X8; format.mbus_code = MEDIA_BUS_FMT_YUYV8_2X8;
LOG(RkISP1, Debug) LOG(RkISP1, Debug)
<< "Configuring ISP output pad with " << format.toString() << "Configuring ISP output pad with " << format
<< " crop " << rect; << " crop " << rect;
ret = isp_->setSelection(2, V4L2_SEL_TGT_CROP, &rect); ret = isp_->setSelection(2, V4L2_SEL_TGT_CROP, &rect);
@ -609,7 +609,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
return ret; return ret;
LOG(RkISP1, Debug) LOG(RkISP1, Debug)
<< "ISP output pad configured with " << format.toString() << "ISP output pad configured with " << format
<< " crop " << rect; << " crop " << rect;
std::map<unsigned int, IPAStream> streamConfig; std::map<unsigned int, IPAStream> streamConfig;

View file

@ -119,13 +119,13 @@ int RkISP1Path::configure(const StreamConfiguration &config,
LOG(RkISP1, Debug) LOG(RkISP1, Debug)
<< "Configured " << name_ << " resizer input pad with " << "Configured " << name_ << " resizer input pad with "
<< ispFormat.toString() << " crop " << rect; << ispFormat << " crop " << rect;
ispFormat.size = config.size; ispFormat.size = config.size;
LOG(RkISP1, Debug) LOG(RkISP1, Debug)
<< "Configuring " << name_ << " resizer output pad with " << "Configuring " << name_ << " resizer output pad with "
<< ispFormat.toString(); << ispFormat;
switch (config.pixelFormat) { switch (config.pixelFormat) {
case formats::NV12: case formats::NV12:
@ -143,7 +143,7 @@ int RkISP1Path::configure(const StreamConfiguration &config,
LOG(RkISP1, Debug) LOG(RkISP1, Debug)
<< "Configured " << name_ << " resizer output pad with " << "Configured " << name_ << " resizer output pad with "
<< ispFormat.toString(); << ispFormat;
const PixelFormatInfo &info = PixelFormatInfo::info(config.pixelFormat); const PixelFormatInfo &info = PixelFormatInfo::info(config.pixelFormat);
V4L2DeviceFormat outputFormat; V4L2DeviceFormat outputFormat;

View file

@ -65,8 +65,8 @@ int SimpleConverter::Stream::configure(const StreamConfiguration &inputCfg,
format.planes[0].bpl != inputCfg.stride) { format.planes[0].bpl != inputCfg.stride) {
LOG(SimplePipeline, Error) LOG(SimplePipeline, Error)
<< "Input format not supported (requested " << "Input format not supported (requested "
<< inputCfg.size << "-" << videoFormat.toString() << inputCfg.size << "-" << videoFormat
<< ", got " << format.toString() << ")"; << ", got " << format << ")";
return -EINVAL; return -EINVAL;
} }

View file

@ -607,10 +607,10 @@ int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format,
LOG(SimplePipeline, Debug) LOG(SimplePipeline, Debug)
<< "Source '" << source->entity()->name() << "Source '" << source->entity()->name()
<< "':" << source->index() << "':" << source->index()
<< " produces " << sourceFormat.toString() << " produces " << sourceFormat
<< ", sink '" << sink->entity()->name() << ", sink '" << sink->entity()->name()
<< "':" << sink->index() << "':" << sink->index()
<< " requires " << format->toString(); << " requires " << format;
return -EINVAL; return -EINVAL;
} }
} }
@ -620,7 +620,7 @@ int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format,
<< "':" << source->index() << "':" << source->index()
<< " -> '" << sink->entity()->name() << " -> '" << sink->entity()->name()
<< "':" << sink->index() << "':" << sink->index()
<< " configured with format " << format->toString(); << " configured with format " << format;
} }
return 0; return 0;
@ -939,8 +939,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
captureFormat.size != pipeConfig->captureSize) { captureFormat.size != pipeConfig->captureSize) {
LOG(SimplePipeline, Error) LOG(SimplePipeline, Error)
<< "Unable to configure capture in " << "Unable to configure capture in "
<< pipeConfig->captureSize << "-" << pipeConfig->captureSize << "-" << videoFormat;
<< videoFormat.toString();
return -EINVAL; return -EINVAL;
} }

View file

@ -126,9 +126,8 @@ CameraConfiguration::Status UVCCameraConfiguration::validate()
if (iter == pixelFormats.end()) { if (iter == pixelFormats.end()) {
cfg.pixelFormat = pixelFormats.front(); cfg.pixelFormat = pixelFormats.front();
LOG(UVC, Debug) LOG(UVC, Debug)
<< "Adjusting pixel format from " << "Adjusting pixel format from " << pixelFormat
<< pixelFormat.toString() << " to " << " to " << cfg.pixelFormat;
<< cfg.pixelFormat.toString();
status = Adjusted; status = Adjusted;
} }

View file

@ -209,7 +209,7 @@ CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,
if (pixelformat.first != formats::BGR888) { if (pixelformat.first != formats::BGR888) {
LOG(VIMC, Info) LOG(VIMC, Info)
<< "Skipping unsupported pixel format " << "Skipping unsupported pixel format "
<< pixelformat.first.toString(); << pixelformat.first;
continue; continue;
} }
} }

View file

@ -206,7 +206,7 @@ uint8_t V4L2SubdeviceFormat::bitsPerPixel() const
const auto it = formatInfoMap.find(mbus_code); const auto it = formatInfoMap.find(mbus_code);
if (it == formatInfoMap.end()) { if (it == formatInfoMap.end()) {
LOG(V4L2, Error) << "No information available for format '" LOG(V4L2, Error) << "No information available for format '"
<< toString() << "'"; << *this << "'";
return 0; return 0;
} }

View file

@ -67,8 +67,7 @@ int ViewFinderQt::setFormat(const libcamera::PixelFormat &format,
image_ = QImage(size, QImage::Format_RGB32); image_ = QImage(size, QImage::Format_RGB32);
qInfo() << "Using software format conversion from" qInfo() << "Using software format conversion from" << format;
<< format.toString().c_str();
} else { } else {
qInfo() << "Zero-copy enabled"; qInfo() << "Zero-copy enabled";
} }

View file

@ -327,7 +327,7 @@ int V4L2CameraProxy::tryFormat(struct v4l2_format *arg)
if (ret < 0) { if (ret < 0) {
LOG(V4L2Compat, Error) LOG(V4L2Compat, Error)
<< "Failed to negotiate a valid format: " << "Failed to negotiate a valid format: "
<< format.toString(); << format;
return -EINVAL; return -EINVAL;
} }

View file

@ -72,8 +72,8 @@ protected:
bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2FmtExpect); bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2FmtExpect);
V4L2PixelFormat v4l2Fmt = bayerFmt.toV4L2PixelFormat(); V4L2PixelFormat v4l2Fmt = bayerFmt.toV4L2PixelFormat();
if (v4l2Fmt != v4l2FmtExpect) { if (v4l2Fmt != v4l2FmtExpect) {
cerr << "Expected: '" << v4l2FmtExpect.toString() cerr << "Expected: '" << v4l2FmtExpect
<< "' got: '" << v4l2Fmt.toString() << "'" << endl; << "' got: '" << v4l2Fmt << "'" << endl;
return TestFail; return TestFail;
} }
@ -86,7 +86,7 @@ protected:
v4l2Fmt = bayerFmt.toV4L2PixelFormat(); v4l2Fmt = bayerFmt.toV4L2PixelFormat();
if (v4l2Fmt != v4l2FmtExpect) { if (v4l2Fmt != v4l2FmtExpect) {
cerr << "Expected: empty V4L2PixelFormat got: '" cerr << "Expected: empty V4L2PixelFormat got: '"
<< v4l2Fmt.toString() << "'" << endl; << v4l2Fmt << "'" << endl;
return TestFail; return TestFail;
} }
@ -101,8 +101,8 @@ protected:
bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2Fmt); bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2Fmt);
if (bayerFmt != bayerFmtExpect) { if (bayerFmt != bayerFmtExpect) {
cerr << "Expected BayerFormat '" cerr << "Expected BayerFormat '"
<< bayerFmtExpect.toString() << "', got: '" << bayerFmtExpect << "', got: '"
<< bayerFmt.toString() << "'" << endl; << bayerFmt << "'" << endl;
return TestFail; return TestFail;
} }
@ -115,7 +115,7 @@ protected:
bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2FmtUnknown); bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2FmtUnknown);
if (bayerFmt.isValid()) { if (bayerFmt.isValid()) {
cerr << "Expected empty BayerFormat got: '" cerr << "Expected empty BayerFormat got: '"
<< bayerFmt.toString() << "'" << endl; << bayerFmt << "'" << endl;
return TestFail; return TestFail;
} }
@ -151,8 +151,8 @@ protected:
BayerFormat hFlipFmt = bayerFmt.transform(Transform::HFlip); BayerFormat hFlipFmt = bayerFmt.transform(Transform::HFlip);
if (hFlipFmt != bayerFmtExpect) { if (hFlipFmt != bayerFmtExpect) {
cerr << "Horizontal flip of 'BGGR-8' should result in '" cerr << "Horizontal flip of 'BGGR-8' should result in '"
<< bayerFmtExpect.toString() << "', got: '" << bayerFmtExpect << "', got: '"
<< hFlipFmt.toString() << "'" << endl; << hFlipFmt << "'" << endl;
return TestFail; return TestFail;
} }
@ -166,8 +166,8 @@ protected:
BayerFormat vFlipFmt = bayerFmt.transform(Transform::VFlip); BayerFormat vFlipFmt = bayerFmt.transform(Transform::VFlip);
if (vFlipFmt != bayerFmtExpect) { if (vFlipFmt != bayerFmtExpect) {
cerr << "Vertical flip of 'BGGR-8' should result in '" cerr << "Vertical flip of 'BGGR-8' should result in '"
<< bayerFmtExpect.toString() << "', got: '" << bayerFmtExpect << "', got: '"
<< vFlipFmt.toString() << "'" << endl; << vFlipFmt << "'" << endl;
return TestFail; return TestFail;
} }
@ -182,7 +182,7 @@ protected:
if (transposeFmt != bayerFmt) { if (transposeFmt != bayerFmt) {
cerr << "Transpose with both green pixels on the " cerr << "Transpose with both green pixels on the "
<< "antidiagonal should not change the order " << "antidiagonal should not change the order "
<< "(got '" << transposeFmt.toString() << "')" << "(got '" << transposeFmt << "')"
<< endl; << endl;
return TestFail; return TestFail;
} }
@ -199,7 +199,7 @@ protected:
if (transposeFmt != bayerFmtExpect) { if (transposeFmt != bayerFmtExpect) {
cerr << "Transpose with the red & blue pixels on the " cerr << "Transpose with the red & blue pixels on the "
<< "antidiagonal should switch their position " << "antidiagonal should switch their position "
<< "(got '" << transposeFmt.toString() << "')" << "(got '" << transposeFmt << "')"
<< endl; << endl;
return TestFail; return TestFail;
} }

View file

@ -99,7 +99,7 @@ protected:
format.size != Size(4096, 2160)) { format.size != Size(4096, 2160)) {
cerr << "Failed to get a suitable format, expected 4096x2160-0x" cerr << "Failed to get a suitable format, expected 4096x2160-0x"
<< utils::hex(MEDIA_BUS_FMT_SBGGR10_1X10) << utils::hex(MEDIA_BUS_FMT_SBGGR10_1X10)
<< ", got " << format.toString() << endl; << ", got " << format << endl;
return TestFail; return TestFail;
} }