[{"id":27604,"web_url":"https://patchwork.libcamera.org/comment/27604/","msgid":"<CAEmqJPqiJ6WKea-yz7Mw94O0u7fL-zZS8DeGx+OpkVgneTpxNA@mail.gmail.com>","date":"2023-07-24T10:07:44","subject":"Re: [libcamera-devel] [PATCH v3 0/3] Raspberry Pi: Configuration\n\tsimplifications","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Jacopo,\n\nOn Mon, 24 Jul 2023 at 10:59, Jacopo Mondi\n<jacopo.mondi@ideasonboard.com> wrote:\n>\n> Naush, I have simplified a bit 2/3 and removed a few leftovers.\n> If no objections I plan to push this soon, is it fine ?\n\nNo objections from me.  Feel free to merge it when you are ready.\n\nRegards,\nNaush\n\n\n>\n> The overall diff between v2 and v3 is very minor, but 2/3 now looks more\n> logical.\n>\n> --- 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>\n>\n> Thanks\n>   j\n>\n> Jacopo 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> --\n> 2.40.1\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 315CFBDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Jul 2023 10:08:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 600DB628C0;\n\tMon, 24 Jul 2023 12:08:02 +0200 (CEST)","from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com\n\t[IPv6:2607:f8b0:4864:20::1130])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D2F5B6056C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jul 2023 12:08:00 +0200 (CEST)","by mail-yw1-x1130.google.com with SMTP id\n\t00721157ae682-57688a146ecso50343287b3.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jul 2023 03:08:00 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690193282;\n\tbh=xJ4DNCXSvgdf59Yy5OWpfXZ8WT2wUyopS1LWmN4wrOY=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=g9RTmAuSw114NQI69FbkBuZdwLN73MxjFDqad9x5KJ2YseHQqJCGokBljS00z9hcr\n\tYZ7ZVk00LYLHMqAq/OIsjKPlI0XP4QIxtsBI9HQXg4Nimbj8IvUwBW8G5wCoe3Ip3p\n\tWhFBOJqY/4VY5cax99DpCNS60w+4uzRFuzleBtHdz0sIrj/iOx5VinqiT2bzbJtX6+\n\t24KMnmne+cYGk8bYpUD5+DO19JKGfWEDE1g5aOo/vurOcjyD7YhW3If3SEpkF9yTRx\n\tH1iO5udLkMKw4+OR2kxEx+e2rxhDO/SBqSqoo0oIk7Z92MsFBhJhYhotBn4UxrDVI5\n\t/EoJx14/NKK0A==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1690193279; x=1690798079;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=gZmAHu5KkQ83EDfTi5h6Kdlregi6eekPlcglNd44EV4=;\n\tb=tnkRmJJuoKjCt7m3AfvlF8R/h8R97nJ3kP7/0+dlW35KY1bwNoXX+QLiXtw9Dx3b4p\n\tUNBFz3wMgm37l/0Mk5P2VSCVJxip0jkzdOCQSWI4xCQTK4F0Z0fGlVTn3dmS7Hr2siu8\n\tnoPVWKlpsuxGGgd+PdA5penAXCSBkzW1qm3mHla2kQNkrSOBSY7FkiS2OeGyv/9iZ762\n\tNq142NWfzrGys5VkrlqA9Gz3VvzpKysQr2VJI7mgmf7hMxfOHb35LcZ/HWvobytclZ65\n\tfpkNSkMcXKGEJOzrjRsrZMszuw/K7KQKrAhZ2vrLH28LNvk3sZHOfQMBqI5eXFXIAKYe\n\tBq+Q=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"tnkRmJJu\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1690193279; x=1690798079;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=gZmAHu5KkQ83EDfTi5h6Kdlregi6eekPlcglNd44EV4=;\n\tb=Ly74NvCuDJ2XYmjwbfYxXHagHJ6OzRKnM68D1cdNUoYTQSuEsbOWfkipOSkYdX8ApK\n\tSCVmTRKKcmAWjIHLmGTAq6Kf3ywYjkvHXCKVO+QezryzpEOPyPlAdJkneCxt2FWo+GPD\n\t/2WW6auzDjyr3W/0O7otjxMxxL+YZPlQ2/PdZ81R7oK+1nmSb+jwEjzGyjwHuNzAPD30\n\tDYTKl3wNjAjqy11dul+tCT3CqyrQEC9bJfF8JGIynSD43vzab6V3/3WPQw9KJaThl3ii\n\tUl7C0aZn0186jYpQAp5Nvo71yxHZ6BvnhFAile7ir2IDU3VAoXBOacRgc8xkRKWlkoqP\n\tbb5A==","X-Gm-Message-State":"ABy/qLbAXCITwtj4A+qWmPPiXiRAhu0tpD24hos29XEksOx0uidCirAJ\n\tSEa9jUINf78coFyZmpZ873Zl9Sl2w6NXTPw1h48ncTuTFRfQbbyVbyo=","X-Google-Smtp-Source":"APBJJlHvapRDdCBuKFR1WB2TjOdGB2U1eaH/ZYrztYVElsvozW7bFU4GSoBmTW61wGUqO/BPyR37fCj7O1KFTBt+gso=","X-Received":"by 2002:a81:494b:0:b0:569:e7cb:cd4e with SMTP id\n\tw72-20020a81494b000000b00569e7cbcd4emr6805908ywa.48.1690193279624;\n\tMon, 24 Jul 2023 03:07:59 -0700 (PDT)","MIME-Version":"1.0","References":"<20230724095925.20877-1-jacopo.mondi@ideasonboard.com>","In-Reply-To":"<20230724095925.20877-1-jacopo.mondi@ideasonboard.com>","Date":"Mon, 24 Jul 2023 11:07:44 +0100","Message-ID":"<CAEmqJPqiJ6WKea-yz7Mw94O0u7fL-zZS8DeGx+OpkVgneTpxNA@mail.gmail.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]