{"id":18873,"url":"https://patchwork.libcamera.org/api/1.1/patches/18873/?format=json","web_url":"https://patchwork.libcamera.org/patch/18873/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230724095925.20877-1-jacopo.mondi@ideasonboard.com>","date":"2023-07-24T09:59:22","name":"[libcamera-devel,v3,0/3] Raspberry Pi: Configuration simplifications","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"6f02ccbc0746a7e30d2c05b3611c1d3956a09c33","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/1.1/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18873/mbox/","series":[],"comments":"https://patchwork.libcamera.org/api/patches/18873/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18873/checks/","tags":{},"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 AB136BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Jul 2023 09:59:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CD900628C3;\n\tMon, 24 Jul 2023 11:59:40 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 63D8D60387\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jul 2023 11:59:38 +0200 (CEST)","from uno.localdomain (mob-5-91-20-233.net.vodafone.it\n\t[5.91.20.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7A29C735;\n\tMon, 24 Jul 2023 11:58:40 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690192781;\n\tbh=CMFgOTznWF7SeATeOSY7MIvsn1ok8/HwJlHdAqoC1Ys=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=JQ2XHzsdit6gtaM4HRbYojau8As6Wb9dbCaDVOifOQbkZLskamc/MhLzQ0H9oM9AZ\n\tXTkj/RLT/o5ZOzMFsc8Rb5LSbnOye34LfHwKLboF77ftjtbEYM1HhADfcWbqZYKYsC\n\tjwSiuDTHj9GqWT9hrV1bDa0zJrmr4zIPWFefo3eLZYaDeJ6dlF2BGpEJTduRXpEot1\n\tJ3Nu9yHLQiepjFFFqJSn7wEKsFC3ZPssV06rYm4oM3ewPqxY0e6imGAf9uCIFAwe//\n\t606slHUvOVwnHxRx8rn/Kp6pkhOiykDeAsjITpZhgb5ujV6xNhW48TJLvfXgPzkIxE\n\tko4clg3uzAkRQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1690192720;\n\tbh=CMFgOTznWF7SeATeOSY7MIvsn1ok8/HwJlHdAqoC1Ys=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=KkUYOmjncOBPyClU4nLsV+aZB37gfukJDLoDaolH+guQnEFEpxSoUEo4HroB/dttJ\n\tMB9qUu6E5C7TSHW66dge63ciPEy3hrB3e56TJCXDUPAMZH01YC2dY24awpXPuz79ir\n\tnuNZxkLAeJunK7HmavIB+RV4og98OiDpMO7yNtQc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"KkUYOmjn\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 24 Jul 2023 11:59:22 +0200","Message-Id":"<20230724095925.20877-1-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.40.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 0/3] Raspberry Pi: Configuration\n\tsimplifications","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Naush, I have simplified a bit 2/3 and removed a few leftovers.\nIf no objections I plan to push this soon, is it fine ?\n\nThe overall diff between v2 and v3 is very minor, but 2/3 now looks more\nlogical.\n\n\n\nThanks\n  j\n\nJacopo Mondi (3):\n  libcamera: rpi: pipeline_base: Remove populateSensorFormats()\n  libcamera: rpi: pipeline_base: Move findBestFormat to CameraData\n  libcamera: rpi: pipeline_base: Cache sensor format\n\n .../pipeline/rpi/common/pipeline_base.cpp     | 182 +++++++++---------\n .../pipeline/rpi/common/pipeline_base.h       |   5 +\n 2 files changed, 91 insertions(+), 96 deletions(-)\n\n--\n2.40.1","diff":"--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -207,7 +207,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n        std::sort(outStreams.begin(), outStreams.end(),\n                  [](auto &l, auto &r) { return l.cfg->size > r.cfg->size; });\n\n-       /* Do any platform specific fixups. */\n+       /* Compute the sensor configuration. */\n        unsigned int bitDepth = defaultRawBitDepth;\n        if (!rawStreams.empty()) {\n                BayerFormat bayerFormat = BayerFormat::fromPixelFormat(rawStreams[0].cfg->pixelFormat);\n@@ -218,6 +218,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n                                                                 : rawStreams[0].cfg->size,\n                                              bitDepth);\n\n+       /* Do any platform specific fixups. */\n        status = data_->platformValidate(rawStreams, outStreams);\n        if (status == Invalid)\n                return Invalid;\n@@ -227,9 +228,6 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n                StreamConfiguration &cfg = config_.at(raw.index);\n                V4L2DeviceFormat rawFormat;\n\n-               const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);\n-               bitDepth = info.isValid() ? info.bitsPerPixel : defaultRawBitDepth;\n-\n                BayerFormat::Packing packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;\n                rawFormat = PipelineHandlerBase::toV4L2DeviceFormat(raw.dev, sensorFormat_, packing);\n\n","prefixes":["libcamera-devel","v3","0/3"]}