[{"id":27445,"web_url":"https://patchwork.libcamera.org/comment/27445/","msgid":"<CAEmqJPo=KTt9NNp8Wh-TgKXyfnM==rNQ0BKmqnPSzqMjvdBVtA@mail.gmail.com>","date":"2023-06-30T13:00:28","subject":"Re: [libcamera-devel] [RFC PATCH 4/5] ipa: rpi: cam_helper_imx477:\n\tOnly pass embedded buffer in parseEmbeddedData()","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Umang,\n\nOn Fri, 30 Jun 2023 at 13:03, Umang Jain <umang.jain@ideasonboard.com> wrote:\n>\n> Only the embedded data section should be passed while parsing the\n> embedded data through parseEmbeddedData().\n>\n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n\nI'm not sure if this patch is needed.  IMX477 only passes out embedded data, so\nsubdividing the buffer in the span will not do anything.\n\nRegards,\nNaush\n\n> ---\n>  src/ipa/rpi/cam_helper/cam_helper_imx477.cpp | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/ipa/rpi/cam_helper/cam_helper_imx477.cpp b/src/ipa/rpi/cam_helper/cam_helper_imx477.cpp\n> index bc769ca7..3753fd0b 100644\n> --- a/src/ipa/rpi/cam_helper/cam_helper_imx477.cpp\n> +++ b/src/ipa/rpi/cam_helper/cam_helper_imx477.cpp\n> @@ -42,6 +42,9 @@ constexpr std::initializer_list<uint32_t> registerList =\n>         { expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg,\n>           lineLengthHiReg, lineLengthLoReg, temperatureReg };\n>\n> +/* No. of lines of embedded data on IMX477. */\n> +constexpr uint32_t embeddedDataLinesImx477 = 2;\n> +\n>  class CamHelperImx477 : public CamHelper\n>  {\n>  public:\n> @@ -95,7 +98,11 @@ void CamHelperImx477::prepare(libcamera::Span<const uint8_t> buffer, Metadata &m\n>                 return;\n>         }\n>\n> -       parseEmbeddedData(buffer, metadata);\n> +       size_t bytesPerLine = (mode_.width * mode_.bitdepth) >> 3;\n> +       libcamera::Span<const uint8_t> embeddedData{ buffer.data(),\n> +                                                    embeddedDataLinesImx477 * bytesPerLine };\n> +\n> +       parseEmbeddedData(embeddedData, metadata);\n>\n>         /*\n>          * The DeviceStatus struct is first populated with values obtained from\n> --\n> 2.39.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 8FC70BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 Jun 2023 13:00:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 29AE3628C0;\n\tFri, 30 Jun 2023 15:00:46 +0200 (CEST)","from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com\n\t[IPv6:2607:f8b0:4864:20::1131])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EC3D960454\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jun 2023 15:00:44 +0200 (CEST)","by mail-yw1-x1131.google.com with SMTP id\n\t00721157ae682-57712d00cc1so19741867b3.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jun 2023 06:00:44 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1688130046;\n\tbh=ipYIIrsxvsXT6yB3QphKmRNjZJNAXciwM+IBSwx/1W8=;\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=I4P/bF80SeKB34LZ/ydkTC6VXyZL8qSmhpxb/v8TxWaGNty4hkJpZ3V0nnUvHJ2DL\n\tqCGo7FMNG7rnFlUhPemSGbDSax737uRgc4IfsdcyO32IeWNsXbzqwk2oYXmzCaikbJ\n\t5x+ovq3Cp374wbPut5znZurS8BpLIki5tmQRv7WBDoKHXAm8HvRQN4V045Q/Wrl8YT\n\t4DhePeitNTvLVdo0zMhsPlvdODm+kGFlMBWLmFP/PbTTbtmhJMDHnag4Ba8LjU6/W8\n\tfpyvcuv3WzSMnTSydTkJrHgcS2S8AvGQRU6/RanOftRy1pls4gjvMllGjmwsaQ6ng3\n\t+DcPTSX2sJkNg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1688130044; x=1690722044;\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=S+OnxW1ghIGgDbMjBrevPG2f4EsvNDn+AncdlAWREQ4=;\n\tb=HLfi55T6TzVw8VMlHBPsJI/2KX34wt62KGm6oBXkVnvauLIffMt+yLQKefSXKQ6zrl\n\tuLyta0Oz6gRvCNEJOJq3O65kT9ga3lfDpSno7e2dW7E5RT35T0SQnH0KNYKzUcUHkXYX\n\tqpGCzlGD6eMpbVfPb4rtCP/FsVKFpl+DxHAJ3SzQKQ6mi0V26J+2/iYGOaIzlr3jD8X8\n\ttVpubZ+aO7sNjaHdTLZ3Sivg+AqO5eYcq+mpGtjqpOV/KK3q8EQisOVqDX4jlFZmFjRK\n\t7LQ45MhfxQfji58bj9Or8CoFQ94mo66g87yfTcFufegJOAV24Nsx+5PAOHaTNST0ar0q\n\tmHnQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"HLfi55T6\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1688130044; x=1690722044;\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=S+OnxW1ghIGgDbMjBrevPG2f4EsvNDn+AncdlAWREQ4=;\n\tb=d+8pGx3i73gx/7CBpm7e5AsZ673/QIKdh5yaTe756Kpfntq0ATvemHOYdWfUHAS79m\n\t6SMRisu9+PoV8kCNRb3pDHNzB253b1WvKawa0y4AeirohMuB8ZVJPVebTRh9l9cwcyAS\n\t8kiJOo3rS8F/4Dawfw0RLWswbvbqOvHVJVICioJ4WABRMDaSMoHgUi7ByDrjUogllVbk\n\t2eD8V7gJP0dks+n8mHic49CfufdUiRrCfj/xdjdNgX+Zs+SNcVaOxDKexJVuLmrSRiAS\n\t7ZJAoe1izNIFVADc8/VZC9v2gjnUHnmBdHHNGLkC8xSi7xu3H9Qom5XLImjV7HBKE3np\n\tEv0g==","X-Gm-Message-State":"ABy/qLYmES5hkaBDPCvqVbcDO14PFFdQZRTHirRm1hnMsC90cyL+v9ZS\n\tkXcetAVLxd+DcbrBhkhcY4JSupjvHsA1+E7u6zyJkw==","X-Google-Smtp-Source":"APBJJlFzxKSxiipgK3YNOifxeJPzyNkMzmQ2EC0aYtdKe8F9Th+Df02G1H+YOrizfZDcFQd9OQsmbFO+2i54lTACYXA=","X-Received":"by 2002:a0d:dd81:0:b0:56d:292d:a225 with SMTP id\n\tg123-20020a0ddd81000000b0056d292da225mr2320156ywe.43.1688130043944;\n\tFri, 30 Jun 2023 06:00:43 -0700 (PDT)","MIME-Version":"1.0","References":"<20230630120303.33023-1-umang.jain@ideasonboard.com>\n\t<20230630120303.33023-5-umang.jain@ideasonboard.com>","In-Reply-To":"<20230630120303.33023-5-umang.jain@ideasonboard.com>","Date":"Fri, 30 Jun 2023 14:00:28 +0100","Message-ID":"<CAEmqJPo=KTt9NNp8Wh-TgKXyfnM==rNQ0BKmqnPSzqMjvdBVtA@mail.gmail.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [RFC PATCH 4/5] ipa: rpi: cam_helper_imx477:\n\tOnly pass embedded buffer in parseEmbeddedData()","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>"}}]