[{"id":34529,"web_url":"https://patchwork.libcamera.org/comment/34529/","msgid":"<cd8f8759-a50e-4083-b83a-197ea1a8c3c1@ideasonboard.com>","date":"2025-06-17T15:42:13","subject":"Re: [PATCH 2/2] libcamera: pipeline: Add R-Car Gen4 ISP pipeline","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 06. 17. 12:46 keltezéssel, Niklas Söderlund írta:\n> Add a pipeline handler for R-Car Gen4. The pipeline makes use of the\n> RkISP1 IPA and, depending on the kernel R-Car ISP driver, support the\n> same features as the RkISP1 pipeline handler.\n> \n> The pipeline and IPA is tested with the Agc, Agw and\n> BlackLevelCorrection algorithms and produce a stable and good image.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>\n> ---\n>   meson.build                                   |   1 +\n>   meson_options.txt                             |   1 +\n>   src/libcamera/pipeline/rcar-gen4/frames.cpp   | 283 ++++++\n>   src/libcamera/pipeline/rcar-gen4/frames.h     |  87 ++\n>   src/libcamera/pipeline/rcar-gen4/isp.cpp      | 227 +++++\n>   src/libcamera/pipeline/rcar-gen4/isp.h        |  44 +\n>   src/libcamera/pipeline/rcar-gen4/meson.build  |   8 +\n>   .../pipeline/rcar-gen4/rcar-gen4.cpp          | 816 ++++++++++++++++++\n>   src/libcamera/pipeline/rcar-gen4/vin.cpp      | 386 +++++++++\n>   src/libcamera/pipeline/rcar-gen4/vin.h        |  68 ++\n>   10 files changed, 1921 insertions(+)\n>   create mode 100644 src/libcamera/pipeline/rcar-gen4/frames.cpp\n>   create mode 100644 src/libcamera/pipeline/rcar-gen4/frames.h\n>   create mode 100644 src/libcamera/pipeline/rcar-gen4/isp.cpp\n>   create mode 100644 src/libcamera/pipeline/rcar-gen4/isp.h\n>   create mode 100644 src/libcamera/pipeline/rcar-gen4/meson.build\n>   create mode 100644 src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp\n>   create mode 100644 src/libcamera/pipeline/rcar-gen4/vin.cpp\n>   create mode 100644 src/libcamera/pipeline/rcar-gen4/vin.h\n> \n> diff --git a/meson.build b/meson.build\n> index 4ed8017eba1a..478beb27e9f9 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -214,6 +214,7 @@ pipelines_support = {\n>       'imx8-isi':     arch_arm,\n>       'ipu3':         arch_x86,\n>       'mali-c55':     arch_arm,\n> +    'rcar-gen4':    arch_arm,\n>       'rkisp1':       arch_arm,\n>       'rpi/pisp':     arch_arm,\n>       'rpi/vc4':      arch_arm,\n> diff --git a/meson_options.txt b/meson_options.txt\n> index 2104469e3793..eba9458487ff 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -51,6 +51,7 @@ option('pipelines',\n>               'imx8-isi',\n>               'ipu3',\n>               'mali-c55',\n> +            'rcar-gen4',\n>               'rkisp1',\n>               'rpi/pisp',\n>               'rpi/vc4',\n> diff --git a/src/libcamera/pipeline/rcar-gen4/frames.cpp b/src/libcamera/pipeline/rcar-gen4/frames.cpp\n> new file mode 100644\n> index 000000000000..9185c1e89673\n> --- /dev/null\n> +++ b/src/libcamera/pipeline/rcar-gen4/frames.cpp\n> @@ -0,0 +1,283 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright 2025 Renesas Electronics Co\n> + * Copyright 2025 Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> + *\n> + * Renesas R-Car Gen4 VIN pipeline\n> + */\n> +\n> +#include \"frames.h\"\n> +\n> +#include <libcamera/base/log.h>\n> +\n> +#include <libcamera/framebuffer.h>\n> +#include <libcamera/request.h>\n> +\n> +#include \"libcamera/internal/framebuffer.h\"\n> +#include \"libcamera/internal/pipeline_handler.h\"\n> +\n> +namespace libcamera {\n> +\n> +LOG_DECLARE_CATEGORY(RCar4)\n> +\n> +RCar4Frames::RCar4Frames()\n> +{\n> +}\n\nRCar4Frames::RCar4Frames() = default;\n\nor just drop it.\n\n\n> [...]\n> +RCar4Frames::Info *RCar4Frames::create(Request *request)\n> +{\n> +\tunsigned int frame = request->sequence();\n> +\n> +\t/* Try to get input and output buffers from request. */\n> +\tFrameBuffer *inputBuffer = request->findBuffer(&rawStream_);\n> +\tFrameBuffer *outputBuffer = request->findBuffer(&outputStream_);\n> +\n> +\t/* Make sure we have enough internal buffers. */\n> +\tif (!inputBuffer && availableInputBuffers_.empty()) {\n> +\t\tLOG(RCar4, Debug) << \"Input buffer underrun\";\n> +\t\treturn nullptr;\n> +\t}\n> +\n> +\tif (availableParamBuffers_.empty()) {\n> +\t\tLOG(RCar4, Debug) << \"Parameters buffer underrun\";\n> +\t\treturn nullptr;\n> +\t}\n> +\n> +\tif (availableStatBuffers_.empty()) {\n> +\t\tLOG(RCar4, Debug) << \"Statistics buffer underrun\";\n> +\t\treturn nullptr;\n> +\t}\n> +\n> +\tif (!outputBuffer && availableOutputBuffers_.empty()) {\n> +\t\tLOG(RCar4, Debug) << \"Output buffer underrun\";\n> +\t\treturn nullptr;\n> +\t}\n> +\n> +\t/* Select buffers to use. */\n> +\tif (!inputBuffer) {\n> +\t\tinputBuffer = availableInputBuffers_.front();\n> +\t\tavailableInputBuffers_.pop();\n> +\t\tinputBuffer->_d()->setRequest(request);\n> +\t}\n> +\n> +\tFrameBuffer *paramBuffer = availableParamBuffers_.front();\n> +\tavailableParamBuffers_.pop();\n> +\tparamBuffer->_d()->setRequest(request);\n> +\n> +\tFrameBuffer *statBuffer = availableStatBuffers_.front();\n> +\tavailableStatBuffers_.pop();\n> +\tstatBuffer->_d()->setRequest(request);\n> +\n> +\tif (!outputBuffer) {\n> +\t\toutputBuffer = availableOutputBuffers_.front();\n> +\t\tavailableOutputBuffers_.pop();\n> +\t\toutputBuffer->_d()->setRequest(request);\n> +\t}\n> +\n> +\t/* Recored the info needed to process one frame. */\n> +\tstd::unique_ptr<Info> info = std::make_unique<Info>();\n> +\n> +\tinfo->frame = frame;\n> +\tinfo->request = request;\n> +\tinfo->inputBuffer = inputBuffer;\n> +\tinfo->paramBuffer = paramBuffer;\n> +\tinfo->statBuffer = statBuffer;\n> +\tinfo->outputBuffer = outputBuffer;\n> +\tinfo->rawDequeued = false;\n> +\tinfo->paramDequeued = false;\n> +\tinfo->metadataProcessed = false;\n> +\tinfo->outputDequeued = false;\n> +\n> +\tframeInfo_[frame] = std::move(info);\n> +\n> +\treturn frameInfo_[frame].get();\n\nWith `frameInfo_` no longer storing std::unique_ptr (see below):\n\n   auto [it, inserted] = frameInfo_.try_emplace(frame);\n   ASSERT(inserted); // or something\n\n   auto &info = it->second;\n\n   // ...\n\n   return &info;\n\n\n> +}\n> [...]\n> diff --git a/src/libcamera/pipeline/rcar-gen4/frames.h b/src/libcamera/pipeline/rcar-gen4/frames.h\n> new file mode 100644\n> index 000000000000..8eab3de8d91a\n> --- /dev/null\n> +++ b/src/libcamera/pipeline/rcar-gen4/frames.h\n> @@ -0,0 +1,87 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright 2025 Renesas Electronics Co\n> + * Copyright 2025 Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> + *\n> + * Renesas R-Car Gen4 VIN pipeline\n> + */\n> +\n> +#pragma once\n> +\n> +#include <map>\n> +#include <memory>\n> +#include <queue>\n> +#include <vector>\n> +\n> +#include <libcamera/base/signal.h>\n> +\n> +#include <libcamera/controls.h>\n> +#include <libcamera/stream.h>\n> +\n> +#include <libcamera/ipa/core_ipa_interface.h>\n> +#include <libcamera/ipa/rkisp1_ipa_interface.h>\n> +#include <libcamera/ipa/rkisp1_ipa_proxy.h>\n> +\n> +#include \"isp.h\"\n> +\n> +namespace libcamera {\n> +\n> +class FrameBuffer;\n> +class Request;\n> +\n> +class RCar4Frames\n> +{\n> +public:\n> +\tstruct Info {\n> +\t\tunsigned int frame;\n> +\t\tRequest *request;\n> +\n> +\t\tFrameBuffer *inputBuffer;\n> +\t\tFrameBuffer *paramBuffer;\n> +\t\tFrameBuffer *statBuffer;\n> +\t\tFrameBuffer *outputBuffer;\n> +\n> +\t\tControlList effectiveSensorControls;\n> +\n> +\t\tbool rawDequeued;\n> +\t\tbool paramDequeued;\n> +\t\tbool metadataProcessed;\n> +\t\tbool outputDequeued;\n> +\t};\n> +\n> +\tRCar4Frames();\n> +\n> +\tint start(class RCarISPDevice *isp, class ipa::rkisp1::IPAProxyRkISP1 *ipa);\n> +\tvoid stop(class RCarISPDevice *isp, class ipa::rkisp1::IPAProxyRkISP1 *ipa);\n> +\n> +\tInfo *create(Request *request);\n> +\tvoid remove(Info *info);\n> +\tbool tryComplete(Info *info);\n> +\n> +\tInfo *find(unsigned int frame);\n> +\tInfo *find(FrameBuffer *buffer);\n> +\n> +\tSignal<> bufferAvailable;\n> +\n> +\tStream rawStream_;\n> +\tStream outputStream_;\n> +private:\n> +\tstd::map<unsigned int, std::unique_ptr<Info>> frameInfo_;\n\nPlease use\n\n   std::map<unsigned int, Info> frameInfo_;\n\nif nothing requires a unique_ptr.\n\n\n> +\n> +\t/* Buffers for internal use, if none is provided in request. */\n> +\tstd::vector<std::unique_ptr<FrameBuffer>> inputBuffers_;\n> +\tstd::vector<std::unique_ptr<FrameBuffer>> paramBuffers_;\n> +\tstd::vector<std::unique_ptr<FrameBuffer>> statBuffers_;\n> +\tstd::vector<std::unique_ptr<FrameBuffer>> outputBuffers_;\n> +\n> +\t/* Queues of available internal buffers. */\n> +\tstd::queue<FrameBuffer *> availableInputBuffers_;\n> +\tstd::queue<FrameBuffer *> availableParamBuffers_;\n> +\tstd::queue<FrameBuffer *> availableStatBuffers_;\n> +\tstd::queue<FrameBuffer *> availableOutputBuffers_;\n> +\n> +\t/* Buffers mapped and shared with IPA. */\n> +\tstd::vector<IPABuffer> ipaBuffers_;\n> +};\n> +\n> +} /* namespace libcamera */\n> [...]\n> diff --git a/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp b/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp\n> new file mode 100644\n> index 000000000000..a63c2b1f7c02\n> --- /dev/null\n> +++ b/src/libcamera/pipeline/rcar-gen4/rcar-gen4.cpp\n> @@ -0,0 +1,816 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright 2025 Renesas Electronics Co\n> + * Copyright 2025 Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> + *\n> + * Renesas R-Car Gen4 ISP pipeline\n> + */\n> +\n> +#include <memory>\n> +#include <queue>\n> +#include <string>\n> +#include <vector>\n> +\n> +#include <linux/rkisp1-config.h>\n> +\n> +#include <libcamera/formats.h>\n> +#include <libcamera/stream.h>\n> +\n> +#include <libcamera/ipa/core_ipa_interface.h>\n> +#include <libcamera/ipa/rkisp1_ipa_interface.h>\n> +#include <libcamera/ipa/rkisp1_ipa_proxy.h>\n> +\n> +#include \"libcamera/internal/camera.h\"\n> +#include \"libcamera/internal/camera_sensor.h\"\n> +#include \"libcamera/internal/delayed_controls.h\"\n> +#include \"libcamera/internal/device_enumerator.h\"\n> +#include \"libcamera/internal/framebuffer.h\"\n> +#include \"libcamera/internal/ipa_manager.h\"\n> +#include \"libcamera/internal/mapped_framebuffer.h\"\n> +#include \"libcamera/internal/media_device.h\"\n> +#include \"libcamera/internal/pipeline_handler.h\"\n> +#include \"libcamera/internal/v4l2_device.h\"\n> +#include \"libcamera/internal/v4l2_subdevice.h\"\n> +#include \"libcamera/internal/v4l2_videodevice.h\"\n> +\n> +#include \"frames.h\"\n> +#include \"isp.h\"\n> +#include \"vin.h\"\n> +\n> +namespace libcamera {\n> +\n> +namespace {\n> +\n> +const std::map<PixelFormat, uint32_t> formatToMediaBus = {\n> +\t{ formats::SBGGR10, MEDIA_BUS_FMT_SBGGR10_1X10 },\n> +\t{ formats::SGBRG10, MEDIA_BUS_FMT_SGBRG10_1X10 },\n> +\t{ formats::SGRBG10, MEDIA_BUS_FMT_SGRBG10_1X10 },\n> +\t{ formats::SRGGB10, MEDIA_BUS_FMT_SRGGB10_1X10 },\n> +};\n> +\n> +/* Max supported resolution of VIN and ISP. */\n> +static constexpr Size MaxResolution = { 4096, 4096 };\n> +static constexpr unsigned int nBuffers = 4;\n> +\n> +} /* namespace */\n> +\n> +LOG_DEFINE_CATEGORY(RCar4)\n> [...]\n> +\n> +/* -----------------------------------------------------------------------------\n> + * Camera Configuration\n> + */\n> +\n> +class RCar4CameraConfiguration : public CameraConfiguration\n> +{\n> +public:\n> +\tRCar4CameraConfiguration(Camera *camera, RCar4CameraData *data);\n> +\n> +\tStatus validate() override;\n> +\n> +\tconst V4L2SubdeviceFormat &sensorFormat() { return sensorFormat_; }\n> +\tconst Transform &combinedTransform() { return combinedTransform_; }\n> +\tconst PixelFormat &ispOutputFormat() { return ispOutputFormat_; }\n> +private:\n> +\tstd::shared_ptr<Camera> camera_;\n> +\tRCar4CameraData *data_;\n> +\n> +\tV4L2SubdeviceFormat sensorFormat_;\n> +\tTransform combinedTransform_;\n> +\tPixelFormat ispOutputFormat_;\n> +};\n> +\n> +RCar4CameraConfiguration::RCar4CameraConfiguration(Camera *camera,\n> +\t\t\t\t\t\t   RCar4CameraData *data)\n> +\t: CameraConfiguration()\n> +{\n> +\tcamera_ = camera->shared_from_this();\n> +\tdata_ = data;\n\nPlease use the member init list.\n\n\n> +}\n> +\n> +CameraConfiguration::Status RCar4CameraConfiguration::validate()\n> +{\n> +\tStatus status;\n> +\n> +\tif (config_.empty())\n> +\t\treturn Invalid;\n> +\n> +\tstatus = validateColorSpaces(ColorSpaceFlag::StreamsShareColorSpace);\n> +\n> +\t/* Cap the number of entries to the available streams. */\n> +\tif (config_.size() > 2) {\n> +\t\tconfig_.resize(2);\n> +\t\tstatus = Adjusted;\n> +\t}\n> +\n> +\tOrientation requestedOrientation = orientation;\n> +\tcombinedTransform_ = data_->vin_.sensor()->computeTransform(&orientation);\n> +\tif (orientation != requestedOrientation)\n> +\t\tstatus = Adjusted;\n> +\n> +\t/* Figure out the VIN configuration based on the first stream size. */\n> +\tStreamConfiguration vinCfg = data_->vin_.generateConfiguration(config_.at(0).size);\n\nWhat happens if this returns nullptr? Should `ASSERT(vinCfg)` be used?\n\n\n> +\n> +\t/* Default ISP output format. */\n> +\tispOutputFormat_ = formats::XRGB8888;\n> +\n> +\t/*\n> +\t * Validate there are at max two streams, one output and one RAW. The\n> +\t * size of two streams must match each other and the sensor output as we\n> +\t * have no scaler.\n> +\t */\n> +\tunsigned int outputStreams = 0;\n> +\tunsigned int rawStreams = 0;\n> +\tfor (unsigned int i = 0; i < config_.size(); i++) {\n> +\t\tStreamConfiguration &cfg = config_.at(i);\n> +\t\tStreamConfiguration newCfg = {};\n> +\t\tconst StreamConfiguration originalCfg = cfg;\n> +\t\tconst PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);\n> +\n> +\t\tLOG(RCar4, Debug) << \"Validating stream: \" << cfg.toString();\n> +\n> +\t\tif (info.colourEncoding == PixelFormatInfo::ColourEncodingRAW) {\n> +\t\t\tif (rawStreams++) {\n> +\t\t\t\tLOG(RCar4, Error) <<\n> +\t\t\t\t\t\"Camera configuration support only one RAW stream\";\n> +\t\t\t\treturn Invalid;\n> +\t\t\t}\n> +\n> +\t\t\tnewCfg = vinCfg;\n> +\n> +\t\t\tcfg.setStream(&data_->frames_.rawStream_);\n> +\t\t\tLOG(RCar4, Debug) << \"Assigned \" << newCfg.toString()\n> +\t\t\t\t<< \" to the raw stream\";\n> +\t\t} else {\n> +\t\t\tif (outputStreams++) {\n> +\t\t\t\tLOG(RCar4, Error) <<\n> +\t\t\t\t\t\"Camera configuration support only one output stream\";\n> +\t\t\t\treturn Invalid;\n> +\t\t\t}\n> +\n> +\t\t\tnewCfg = data_->isp_.generateConfiguration(cfg.pixelFormat, vinCfg.size);\n\nSame here, what if nullptr?\n\n\n> +\t\t\tispOutputFormat_ = newCfg.pixelFormat;\n> +\n> +\t\t\tcfg.setStream(&data_->frames_.outputStream_);\n> +\t\t\tLOG(RCar4, Debug) << \"Assigned \" << newCfg.toString()\n> +\t\t\t\t<< \" to the output stream\";\n> +\t\t}\n> +\n> +\t\tcfg.size = newCfg.size;\n> +\t\tcfg.bufferCount = newCfg.bufferCount;\n> +\t\tcfg.pixelFormat = newCfg.pixelFormat;\n> +\t\tcfg.stride = newCfg.stride;\n> +\t\tcfg.frameSize = newCfg.frameSize;\n> +\n> +\t\tif (!cfg.pixelFormat.isValid()) {\n> +\t\t\tLOG(RCar4, Error)\n> +\t\t\t\t<< \"Stream \" << i << \" can not generate cfg\";\n> +\t\t\treturn Invalid;\n> +\t\t}\n> +\n> +\t\tif (cfg.pixelFormat != originalCfg.pixelFormat ||\n> +\t\t    cfg.size != originalCfg.size) {\n> +\t\t\tLOG(RCar4, Debug)\n> +\t\t\t\t<< \"Stream \" << i << \" configuration adjusted to \"\n> +\t\t\t\t<< cfg.toString();\n> +\t\t\tstatus = Adjusted;\n> +\t\t}\n> +\t}\n> +\n> +\t/* Select the sensor format. */\n> +\tsensorFormat_ =\n> +\t\tdata_->vin_.sensor()->getFormat({ formatToMediaBus.at(vinCfg.pixelFormat) },\n> +\t\t\t\t\t\tvinCfg.size, vinCfg.size);\n> +\n> +\treturn status;\n> +}\n> [...]\n> diff --git a/src/libcamera/pipeline/rcar-gen4/vin.cpp b/src/libcamera/pipeline/rcar-gen4/vin.cpp\n> new file mode 100644\n> index 000000000000..46c647f9a10e\n> --- /dev/null\n> +++ b/src/libcamera/pipeline/rcar-gen4/vin.cpp\n> @@ -0,0 +1,386 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright 2025 Renesas Electronics Co\n> + * Copyright 2025 Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> + *\n> + * Renesas R-Car Gen4 VIN pipeline\n> + */\n> +\n> +#include \"vin.h\"\n> +\n> +#include <cmath>\n> +#include <limits>\n> +\n> +#include <linux/media-bus-format.h>\n> +\n> +#include <libcamera/formats.h>\n> +#include <libcamera/geometry.h>\n> +#include <libcamera/stream.h>\n> +#include <libcamera/transform.h>\n> +\n> +#include \"libcamera/internal/camera_sensor.h\"\n> +#include \"libcamera/internal/framebuffer.h\"\n> +#include \"libcamera/internal/media_device.h\"\n> +#include \"libcamera/internal/v4l2_subdevice.h\"\n> +\n> +namespace libcamera {\n> +\n> +LOG_DECLARE_CATEGORY(RCar4)\n> +\n> +namespace {\n> +\n> +const std::map<uint32_t, PixelFormat> mbusCodesToPixelFormat = {\n> +\t{ MEDIA_BUS_FMT_SBGGR10_1X10, formats::SBGGR10 },\n> +\t{ MEDIA_BUS_FMT_SGBRG10_1X10, formats::SGBRG10 },\n> +\t{ MEDIA_BUS_FMT_SGRBG10_1X10, formats::SGRBG10 },\n> +\t{ MEDIA_BUS_FMT_SRGGB10_1X10, formats::SRGGB10 },\n> +};\n> +\n> +} /* namespace */\n> +\n> +RCarVINDevice::RCarVINDevice()\n> +{\n> +}\n\n= default; or just drop it.\n\n> +\n> +/**\n> + * \\brief Retrieve the list of supported PixelFormats\n> + *\n> + * Retrieve the list of supported pixel formats by matching the sensor produced\n> + * media bus codes with the formats supported by the VIN unit.\n> + *\n> + * \\return The list of supported PixelFormat\n> + */\n> +std::vector<PixelFormat> RCarVINDevice::formats() const\n> +{\n> +\tif (!sensor_)\n> +\t\treturn {};\n> +\n> +\tstd::vector<PixelFormat> formats;\n> +\tfor (unsigned int code : sensor_->mbusCodes()) {\n> +\t\tauto it = mbusCodesToPixelFormat.find(code);\n> +\t\tif (it != mbusCodesToPixelFormat.end())\n> +\t\t\tformats.push_back(it->second);\n> +\t}\n> [...]\n\n\nRegards,\nBarnabás Pőcze","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 01014C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Jun 2025 15:42:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D726B68DCC;\n\tTue, 17 Jun 2025 17:42:18 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C100268DB1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Jun 2025 17:42:17 +0200 (CEST)","from [192.168.33.11] (185.221.143.107.nat.pool.zt.hu\n\t[185.221.143.107])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 03602666;\n\tTue, 17 Jun 2025 17:42:04 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"agAqnFBY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750174925;\n\tbh=rxoM1q8hfgETIIuO4dLGDfbDJkV6eK5L5uKbLz++UNc=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=agAqnFBYp8unocZfVnvhptBtfn9sMocwZtfMdpsDZoaQICQMbe9Xz3fUdedxpokFc\n\t43ycohkN/rcKDudfb9s99joK8fLEJP/RCo/bJmbGkVBGMcqCAis8wrvFb39CB2Ifo9\n\tcn5JJYqbnO5iuaCftAIOGNWycMuc8eApozOhzdJU=","Message-ID":"<cd8f8759-a50e-4083-b83a-197ea1a8c3c1@ideasonboard.com>","Date":"Tue, 17 Jun 2025 17:42:13 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 2/2] libcamera: pipeline: Add R-Car Gen4 ISP pipeline","To":"=?utf-8?q?Niklas_S=C3=B6derlund?=\n\t<niklas.soderlund+renesas@ragnatech.se>, Jacopo Mondi\n\t<jacopo.mondi@ideasonboard.com>, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>, libcamera-devel@lists.libcamera.org","References":"<20250617104642.1607118-1-niklas.soderlund+renesas@ragnatech.se>\n\t<20250617104642.1607118-3-niklas.soderlund+renesas@ragnatech.se>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250617104642.1607118-3-niklas.soderlund+renesas@ragnatech.se>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34783,"web_url":"https://patchwork.libcamera.org/comment/34783/","msgid":"<20250704140326.GC309980@ragnatech.se>","date":"2025-07-04T14:03:26","subject":"Re: [PATCH 2/2] libcamera: pipeline: Add R-Car Gen4 ISP pipeline","submitter":{"id":230,"url":"https://patchwork.libcamera.org/api/people/230/","name":"Niklas Söderlund","email":"niklas.soderlund+renesas@ragnatech.se"},"content":"Hello Barnabás,\n\nThanks for taking the time to look at this.\n\nI agree with all your comments but one where I have a question.\n\nOn 2025-06-17 17:42:13 +0200, Barnabás Pőcze wrote:\n\n...\n\n> > +CameraConfiguration::Status RCar4CameraConfiguration::validate()\n> > +{\n> > +\tStatus status;\n> > +\n> > +\tif (config_.empty())\n> > +\t\treturn Invalid;\n> > +\n> > +\tstatus = validateColorSpaces(ColorSpaceFlag::StreamsShareColorSpace);\n> > +\n> > +\t/* Cap the number of entries to the available streams. */\n> > +\tif (config_.size() > 2) {\n> > +\t\tconfig_.resize(2);\n> > +\t\tstatus = Adjusted;\n> > +\t}\n> > +\n> > +\tOrientation requestedOrientation = orientation;\n> > +\tcombinedTransform_ = data_->vin_.sensor()->computeTransform(&orientation);\n> > +\tif (orientation != requestedOrientation)\n> > +\t\tstatus = Adjusted;\n> > +\n> > +\t/* Figure out the VIN configuration based on the first stream size. */\n> > +\tStreamConfiguration vinCfg = data_->vin_.generateConfiguration(config_.at(0).size);\n> \n> What happens if this returns nullptr? Should `ASSERT(vinCfg)` be used?\n\nThis can't return a nullptr as it returns an object not a pointer, \nright? My C++ is a tad rusty.\n\nIt can however return an zeroed object and indeed maybe that should be \nchecked for. But assert is such a large tool to use, would it not be \nbetter to return Invalid in that case?","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C824FBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Jul 2025 14:03:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EBB8A68E66;\n\tFri,  4 Jul 2025 16:03:32 +0200 (CEST)","from fout-b2-smtp.messagingengine.com\n\t(fout-b2-smtp.messagingengine.com [202.12.124.145])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D671F68E55\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Jul 2025 16:03:30 +0200 (CEST)","from phl-compute-06.internal (phl-compute-06.phl.internal\n\t[10.202.2.46])\n\tby mailfout.stl.internal (Postfix) with ESMTP id 8AAE51D001EB;\n\tFri,  4 Jul 2025 10:03:29 -0400 (EDT)","from phl-mailfrontend-02 ([10.202.2.163])\n\tby phl-compute-06.internal (MEProxy); Fri, 04 Jul 2025 10:03:29 -0400","by mail.messagingengine.com (Postfix) with ESMTPA; Fri,\n\t4 Jul 2025 10:03:28 -0400 (EDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=ragnatech.se header.i=@ragnatech.se\n\theader.b=\"q3Vge9W9\"; dkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"Bhq8ymfQ\"; \n\tdkim-atps=neutral","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech.se; h=\n\tcc:cc:content-transfer-encoding:content-type:content-type:date\n\t:date:from:from:in-reply-to:in-reply-to:message-id:mime-version\n\t:references:reply-to:subject:subject:to:to; s=fm1; t=1751637809;\n\tx=1751724209; bh=As5CJUMPVXc5zbV0o/PEs41RxDIRTEY7HHkQ5OOAk0o=; b=\n\tq3Vge9W9+KFphZo75mp1cqhW0/tHtKhfiakP25IhAiFPa8hYpbsYUfzbxRTKcAU1\n\tz9snZrspB3trEXo7eVpu8P54SrvdOh++ECDSEy752ih+bx546r9cHUr/ClH6lI9G\n\tmt/sA+UN3u2/SS9DSJqV7+8eZU7TufXblj0wW3u9M4mW3ZMlYuWWXhptMISGW4G5\n\tswvg9z2xojo+ipsoxOva9BLIfUX6LW3y4ab+kOmCy88iqG85xB4EXfvqBsnz+T1h\n\tr6RcViEvaIWqLV/oGatVd3gX8UOCwsZd7GJyA9DammSY9jb73WQ1PXjjmY4EQH/u\n\twroJcI3rXK3rREWYsf21/w==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:cc:content-transfer-encoding\n\t:content-type:content-type:date:date:feedback-id:feedback-id\n\t:from:from:in-reply-to:in-reply-to:message-id:mime-version\n\t:references:reply-to:subject:subject:to:to:x-me-proxy\n\t:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1751637809; x=\n\t1751724209; bh=As5CJUMPVXc5zbV0o/PEs41RxDIRTEY7HHkQ5OOAk0o=; b=B\n\thq8ymfQLntd3q7yDUQEV0Fx/viQcyTohwSJIxUPZlT0OvlNUPTU/7Ejn+QhfbFTG\n\tnCUgwl2PUs7tx00rURHDMXFJ+ocJhImr9azHfmD3B3e6q1kuG7bhcFOMQnvhXyYu\n\tUqoyiR5kauyYQ5poBny6PbMLAf2TFoGAy7t2Eqpep7NcrSgClRJvpQpLXGW8MQkg\n\tNvk9SZf2DtSnYQd8ua7N15Dii0xbHT8wHMntJdQt77lDyccpvlEIQax0mL7obKiH\n\tPzAPNyl8TYj8yGbUiHM0HGtA/lVeG8JmCm1oGhK1+y3M8kTH+KHgN0Zikgn6mWI1\n\tf2DtVuL7CzWs1Q7wv6Oqw=="],"X-ME-Sender":"<xms:Md9naMNLAqLLyGbOOoIQdb5BJNJ1BJgXKefF-DF_g56ou-pIPMBVWQ>\n\t<xme:Md9naC-QxUS5ClXAlDGFLXkfxD6a6Nid2j0m-My6RcQiZUqya4XQLgcMj2TACVJbg\n\tOjie3lRHLfjRcElBsU>","X-ME-Received":"<xmr:Md9naDT2XGyFNAA8UIeOOYe9lcxXlCqyLDaM0Mayykz7jYwQPNPFVWxFOxelrsOGvj67JmZt6GrU06rf40uboxCbCPUOG1Uk6w>","X-ME-Proxy-Cause":"gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddvfeefhecutefuodetggdotefrod\n\tftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr\n\tihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug\n\thrpeffhffvvefukfhfgggtugfgjgesthekredttddtjeenucfhrhhomheppfhikhhlrghs\n\tucfunpguvghrlhhunhguuceonhhikhhlrghsrdhsohguvghrlhhunhguodhrvghnvghsrg\n\thssehrrghgnhgrthgvtghhrdhsvgeqnecuggftrfgrthhtvghrnhepfefhleelhfffjefg\n\tfedugfegjeelhfevheeikefhueelgfdtfeeuhefftddvleeinecuvehluhhsthgvrhfuih\n\tiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepnhhikhhlrghsrdhsohguvghrlhhu\n\tnhguodhrvghnvghsrghssehrrghgnhgrthgvtghhrdhsvgdpnhgspghrtghpthhtohepge\n\tdpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsggrrhhnrggsrghsrdhpohgtiigv\n\tsehiuggvrghsohhnsghorghrugdrtghomhdprhgtphhtthhopehjrggtohhpohdrmhhonh\n\tguihesihguvggrshhonhgsohgrrhgurdgtohhmpdhrtghpthhtoheplhgruhhrvghnthdr\n\tphhinhgthhgrrhhtsehiuggvrghsohhnsghorghrugdrtghomhdprhgtphhtthhopehlih\n\tgstggrmhgvrhgrqdguvghvvghlsehlihhsthhsrdhlihgstggrmhgvrhgrrdhorhhg","X-ME-Proxy":"<xmx:Md9naEv4mv030ngJlBpGfA4M-lAxTbGDvW9qN8hjnXINOy27hUlxNw>\n\t<xmx:Md9naEfedmH1VPz3e653t4txmTbMHSDmSfTymWB699FbWLCVxJJTXg>\n\t<xmx:Md9naI0Kq0eAgnPeG4ypnYjj99J8omLZAKsH4SvqjbLmRHqrwnuj7A>\n\t<xmx:Md9naI-956HLHlkh3fiGxe1quvq9nbeTEcij3DVa-A4qBkR-flysTA>\n\t<xmx:Md9naHt51Lvj1oXdCrgdoYiGcz0KhEm8l5q_KY9IFzQfnzhUSJV7OCES>","Feedback-ID":"i80c9496c:Fastmail","Date":"Fri, 4 Jul 2025 16:03:26 +0200","From":"Niklas =?utf-8?q?S=C3=B6derlund?=\n\t<niklas.soderlund+renesas@ragnatech.se>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/2] libcamera: pipeline: Add R-Car Gen4 ISP pipeline","Message-ID":"<20250704140326.GC309980@ragnatech.se>","References":"<20250617104642.1607118-1-niklas.soderlund+renesas@ragnatech.se>\n\t<20250617104642.1607118-3-niklas.soderlund+renesas@ragnatech.se>\n\t<cd8f8759-a50e-4083-b83a-197ea1a8c3c1@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<cd8f8759-a50e-4083-b83a-197ea1a8c3c1@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34829,"web_url":"https://patchwork.libcamera.org/comment/34829/","msgid":"<ffb42b20-9823-4b4b-b916-575fe6d97e17@protonmail.com>","date":"2025-07-09T07:51:35","subject":"Re: [PATCH 2/2] libcamera: pipeline: Add R-Car Gen4 ISP pipeline","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"Hi\n\n2025. 07. 04. 16:03 keltezéssel, Niklas Söderlund írta:\n> Hello Barnabás,\n> \n> Thanks for taking the time to look at this.\n> \n> I agree with all your comments but one where I have a question.\n> \n> On 2025-06-17 17:42:13 +0200, Barnabás Pőcze wrote:\n> \n> ...\n> \n>>> +CameraConfiguration::Status RCar4CameraConfiguration::validate()\n>>> +{\n>>> +\tStatus status;\n>>> +\n>>> +\tif (config_.empty())\n>>> +\t\treturn Invalid;\n>>> +\n>>> +\tstatus = validateColorSpaces(ColorSpaceFlag::StreamsShareColorSpace);\n>>> +\n>>> +\t/* Cap the number of entries to the available streams. */\n>>> +\tif (config_.size() > 2) {\n>>> +\t\tconfig_.resize(2);\n>>> +\t\tstatus = Adjusted;\n>>> +\t}\n>>> +\n>>> +\tOrientation requestedOrientation = orientation;\n>>> +\tcombinedTransform_ = data_->vin_.sensor()->computeTransform(&orientation);\n>>> +\tif (orientation != requestedOrientation)\n>>> +\t\tstatus = Adjusted;\n>>> +\n>>> +\t/* Figure out the VIN configuration based on the first stream size. */\n>>> +\tStreamConfiguration vinCfg = data_->vin_.generateConfiguration(config_.at(0).size);\n>>\n>> What happens if this returns nullptr? Should `ASSERT(vinCfg)` be used?\n> \n> This can't return a nullptr as it returns an object not a pointer,\n> right? My C++ is a tad rusty.\n\nOops, sorry, you're right. I looked at it again, and have no recollection of what\nI had in mind at the time.\n\n> \n> It can however return an zeroed object and indeed maybe that should be\n> checked for. But assert is such a large tool to use, would it not be\n> better to return Invalid in that case?\n\nI think that is handled by `if (!cfg.pixelFormat.isValid()) {`, no?\n\n\nRegards,\nBarnabás Pőcze\n\n\n> \n> --\n> Kind Regards,\n> Niklas Söderlund","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6B611C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  9 Jul 2025 07:51:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 249C668EEA;\n\tWed,  9 Jul 2025 09:51:43 +0200 (CEST)","from mail-4316.protonmail.ch (mail-4316.protonmail.ch\n\t[185.70.43.16])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 07E4868E30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  9 Jul 2025 09:51:41 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"Lmthidad\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1752047500; x=1752306700;\n\tbh=m9U++SyzpEiglMrd0SP9gTgZu6YRn9s18CSuG8zLsIs=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=LmthidadIjeAn9CjYLIrFgG3TGa+FH7xm2YFUWLGRuAZ9yW+Wif9VYHj5nUCzKFxY\n\tqslsrLpN11/8NBXktheyMhr8dD+y/hiFZt460PkVL+fT+ZE+DAM5oIAVnbPG15bLph\n\tQFb7fdlrUJG7Kw8kY86U8E7/pb0pnVh8/Un4OnJI8fxtUsRWsDzWxq7YZsuJyL9Soz\n\tt1CxdRLHcRYPb6byGU7w0kD781oyClAeY8hvdcsiru4vDYFO5N2i3svsjsEqxX/THN\n\tBRZ7feB5/511UvS0JYZ1Y3cYsziVD9ZKHGa61VhLKdeD4gyROWa/ax59Nb1rwpUdf9\n\tAPdIIJe6YhywA==","Date":"Wed, 09 Jul 2025 07:51:35 +0000","To":"=?utf-8?q?Niklas_S=C3=B6derlund?=\n\t<niklas.soderlund+renesas@ragnatech.se>, =?utf-8?q?Barnab=C3=A1s_P?=\n\t=?utf-8?b?xZFjemU=?= <barnabas.pocze@ideasonboard.com>","From":"=?utf-8?q?P=C5=91cze_Barnab=C3=A1s?= <pobrn@protonmail.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/2] libcamera: pipeline: Add R-Car Gen4 ISP pipeline","Message-ID":"<ffb42b20-9823-4b4b-b916-575fe6d97e17@protonmail.com>","In-Reply-To":"<20250704140326.GC309980@ragnatech.se>","References":"<20250617104642.1607118-1-niklas.soderlund+renesas@ragnatech.se>\n\t<20250617104642.1607118-3-niklas.soderlund+renesas@ragnatech.se>\n\t<cd8f8759-a50e-4083-b83a-197ea1a8c3c1@ideasonboard.com>\n\t<20250704140326.GC309980@ragnatech.se>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"b8a66a9a7aa2d270ba735d92d065b34be3060a74","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34830,"web_url":"https://patchwork.libcamera.org/comment/34830/","msgid":"<20250709115429.GA2073213@ragnatech.se>","date":"2025-07-09T11:54:29","subject":"Re: [PATCH 2/2] libcamera: pipeline: Add R-Car Gen4 ISP pipeline","submitter":{"id":230,"url":"https://patchwork.libcamera.org/api/people/230/","name":"Niklas Söderlund","email":"niklas.soderlund+renesas@ragnatech.se"},"content":"Hello,\n\nOn 2025-07-09 07:51:35 +0000, Pőcze Barnabás wrote:\n> Hi\n> \n> 2025. 07. 04. 16:03 keltezéssel, Niklas Söderlund írta:\n> > Hello Barnabás,\n> > \n> > Thanks for taking the time to look at this.\n> > \n> > I agree with all your comments but one where I have a question.\n> > \n> > On 2025-06-17 17:42:13 +0200, Barnabás Pőcze wrote:\n> > \n> > ...\n> > \n> >>> +CameraConfiguration::Status RCar4CameraConfiguration::validate()\n> >>> +{\n> >>> +\tStatus status;\n> >>> +\n> >>> +\tif (config_.empty())\n> >>> +\t\treturn Invalid;\n> >>> +\n> >>> +\tstatus = validateColorSpaces(ColorSpaceFlag::StreamsShareColorSpace);\n> >>> +\n> >>> +\t/* Cap the number of entries to the available streams. */\n> >>> +\tif (config_.size() > 2) {\n> >>> +\t\tconfig_.resize(2);\n> >>> +\t\tstatus = Adjusted;\n> >>> +\t}\n> >>> +\n> >>> +\tOrientation requestedOrientation = orientation;\n> >>> +\tcombinedTransform_ = data_->vin_.sensor()->computeTransform(&orientation);\n> >>> +\tif (orientation != requestedOrientation)\n> >>> +\t\tstatus = Adjusted;\n> >>> +\n> >>> +\t/* Figure out the VIN configuration based on the first stream size. */\n> >>> +\tStreamConfiguration vinCfg = data_->vin_.generateConfiguration(config_.at(0).size);\n> >>\n> >> What happens if this returns nullptr? Should `ASSERT(vinCfg)` be used?\n> > \n> > This can't return a nullptr as it returns an object not a pointer,\n> > right? My C++ is a tad rusty.\n> \n> Oops, sorry, you're right. I looked at it again, and have no recollection of what\n> I had in mind at the time.\n> \n> > \n> > It can however return an zeroed object and indeed maybe that should be\n> > checked for. But assert is such a large tool to use, would it not be\n> > better to return Invalid in that case?\n> \n> I think that is handled by `if (!cfg.pixelFormat.isValid()) {`, no?\n\nOhh, indeed it is ;-)\n\n> \n> \n> Regards,\n> Barnabás Pőcze\n> \n> \n> > \n> > --\n> > Kind Regards,\n> > Niklas Söderlund\n> \n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C5485C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  9 Jul 2025 11:54:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E8DB068EEA;\n\tWed,  9 Jul 2025 13:54:35 +0200 (CEST)","from fout-a8-smtp.messagingengine.com\n\t(fout-a8-smtp.messagingengine.com [103.168.172.151])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 85ECD68E8A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  9 Jul 2025 13:54:33 +0200 (CEST)","from phl-compute-02.internal (phl-compute-02.phl.internal\n\t[10.202.2.42])\n\tby mailfout.phl.internal (Postfix) with ESMTP id 7A825EC054F;\n\tWed,  9 Jul 2025 07:54:32 -0400 (EDT)","from phl-mailfrontend-01 ([10.202.2.162])\n\tby phl-compute-02.internal (MEProxy); Wed, 09 Jul 2025 07:54:32 -0400","by mail.messagingengine.com (Postfix) with ESMTPA; Wed,\n\t9 Jul 2025 07:54:31 -0400 (EDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=ragnatech.se header.i=@ragnatech.se\n\theader.b=\"RI2X9N7L\"; dkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"bqpopMAr\"; \n\tdkim-atps=neutral","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech.se; h=\n\tcc:cc:content-transfer-encoding:content-type:content-type:date\n\t:date:from:from:in-reply-to:in-reply-to:message-id:mime-version\n\t:references:reply-to:subject:subject:to:to; s=fm1; t=1752062072;\n\tx=1752148472; bh=ab3dKY7iL3hu4HWixX05L198F12AnknkhoChGV1lNqM=; b=\n\tRI2X9N7LlQFnpoRq9GKj9TzfAaV92BXqi05gIrouC0MqVzoRPH6GhAPF8Z1KFMna\n\tfbV2B/anI+J+dfS+xwPQfXcmkczNgoQWFdE55nSU0XB3+vKLJnwiLWmqRpLCzDtX\n\tJkz/YRNOGsKqavYs31Vt7F+ZRnLApitmL96RYE/Kw8MxBjiUgFfPpZABeyzU6Mfw\n\t6z84Xa/FWnV9RbH5LRAg7T3v83SqfYIGybCboYr0dPxWzgNgJrxS5pStF3XdC24z\n\txY336ZHsyJjJjUulPQSVecZMgrsK8pGqulaEsRp+ElKjEw6Mi6v2hOalQYFJD2gj\n\tggJxGKfT4q5a7UT3ij0Ipw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:cc:content-transfer-encoding\n\t:content-type:content-type:date:date:feedback-id:feedback-id\n\t:from:from:in-reply-to:in-reply-to:message-id:mime-version\n\t:references:reply-to:subject:subject:to:to:x-me-proxy\n\t:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1752062072; x=\n\t1752148472; bh=ab3dKY7iL3hu4HWixX05L198F12AnknkhoChGV1lNqM=; b=b\n\tqpopMArvPs0NOzLrZNSQWMag4MWD/A2wOxSJBf4cI/gGjcm6LzPU/bXnDWdkfaMg\n\t7UbLxz4E+bh5WcDj0XzK4tT2uv6OhVpluRlGbZkA0sNCO3zGwg3PaRyXILDg76m8\n\t/xdwknjG1+5ApaYGs/ugYR8s5DosTf64spCPSh4XizDmxxCFsQhGDwolSzhivItt\n\t2w8FlZopP/yMSnA3YwrXkkVbVWE5PV+wEPn/C7RMEUuytzh7clqWpxX+EPt3mC54\n\tL+BrpH/UpNPJgc08xEpzcKiEQDTBvjB0Hab7LEGWfiExJUazaM8JU4j9ir5GKwbl\n\tvCWXIXA6hoj83rX5Y7clQ=="],"X-ME-Sender":"<xms:eFhuaGCtTZ5t9_oRXvtLKlB3_Hs0G8qnUzzlAKQKcK2nOCu20mn_8Q>\n\t<xme:eFhuaMCkaegkJ04xruzP36YJWeEnYfYNiV-75s69eTBeiAi6ZntyOi3Uex_Kjwylo\n\tHTZpjtyQfL0kgPNr8A>","X-ME-Received":"<xmr:eFhuaADQoMWJADQxMP-fOoeKRw4ZcrPhEgXGkxOMMYWQRMQVOsGefcNVnpHajZ1P3dDbXoGfpmpnSsfDq4Atyn0Sv72-UkO5fg>","X-ME-Proxy-Cause":"gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdefjeeglecutefuodetggdotefrod\n\tftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr\n\tihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug\n\thrpeffhffvvefukfhfgggtugfgjgesthekredttddtjeenucfhrhhomheppfhikhhlrghs\n\tucfunpguvghrlhhunhguuceonhhikhhlrghsrdhsohguvghrlhhunhguodhrvghnvghsrg\n\thssehrrghgnhgrthgvtghhrdhsvgeqnecuggftrfgrthhtvghrnhepfefhleelhfffjefg\n\tfedugfegjeelhfevheeikefhueelgfdtfeeuhefftddvleeinecuvehluhhsthgvrhfuih\n\tiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepnhhikhhlrghsrdhsohguvghrlhhu\n\tnhguodhrvghnvghsrghssehrrghgnhgrthgvtghhrdhsvgdpnhgspghrtghpthhtohephe\n\tdpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhosghrnhesphhrohhtohhnmhgr\n\tihhlrdgtohhmpdhrtghpthhtohepsggrrhhnrggsrghsrdhpohgtiigvsehiuggvrghsoh\n\thnsghorghrugdrtghomhdprhgtphhtthhopehjrggtohhpohdrmhhonhguihesihguvggr\n\tshhonhgsohgrrhgurdgtohhmpdhrtghpthhtoheplhgruhhrvghnthdrphhinhgthhgrrh\n\thtsehiuggvrghsohhnsghorghrugdrtghomhdprhgtphhtthhopehlihgstggrmhgvrhgr\n\tqdguvghvvghlsehlihhsthhsrdhlihgstggrmhgvrhgrrdhorhhg","X-ME-Proxy":"<xmx:eFhuaPpMbpWeYa0-PtPjZQAZaSPLLhVSz7rC_Gl2g7hMQYIwXEVEug>\n\t<xmx:eFhuaCm8k39ipDJKu90lvxsXQQSrPVvF8NGwgaQ-uLdtXnt8JgrM2w>\n\t<xmx:eFhuaHw7-Wb7-aU1p-3zbvAmZYDELZdcjOHUE-wLQT2mCYlkzAby9Q>\n\t<xmx:eFhuaC_9UBndUZziqFxXELD1mVeL0C-RDYIpTGYqIkMDTCAaqdtfJg>\n\t<xmx:eFhuaFBBUhPWuwgE_C7p6gkdmmJ4VXAiJbUUoQP1RAEzODiSuheT8Efr>","Feedback-ID":"i80c9496c:Fastmail","Date":"Wed, 9 Jul 2025 13:54:29 +0200","From":"Niklas =?utf-8?q?S=C3=B6derlund?=\n\t<niklas.soderlund+renesas@ragnatech.se>","To":"=?utf-8?q?P=C5=91cze_Barnab=C3=A1s?= <pobrn@protonmail.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>, libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/2] libcamera: pipeline: Add R-Car Gen4 ISP pipeline","Message-ID":"<20250709115429.GA2073213@ragnatech.se>","References":"<20250617104642.1607118-1-niklas.soderlund+renesas@ragnatech.se>\n\t<20250617104642.1607118-3-niklas.soderlund+renesas@ragnatech.se>\n\t<cd8f8759-a50e-4083-b83a-197ea1a8c3c1@ideasonboard.com>\n\t<20250704140326.GC309980@ragnatech.se>\n\t<ffb42b20-9823-4b4b-b916-575fe6d97e17@protonmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<ffb42b20-9823-4b4b-b916-575fe6d97e17@protonmail.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]