Patch Detail
Show a patch.
GET /api/1.1/patches/17545/?format=api
{ "id": 17545, "url": "https://patchwork.libcamera.org/api/1.1/patches/17545/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17545/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20221006131744.5179-5-naush@raspberrypi.com>", "date": "2022-10-06T13:17:38", "name": "[libcamera-devel,v2,04/10] ipa: raspberrypi: Remove initialized_ field from CamHelper", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "6d0b87351b7591abe0f6fa54768a7971e142564f", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17545/mbox/", "series": [ { "id": 3537, "url": "https://patchwork.libcamera.org/api/1.1/series/3537/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3537", "date": "2022-10-06T13:17:34", "name": "Raspberry Pi: Horizontal blanking control", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3537/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17545/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17545/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 C3A92BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 6 Oct 2022 13:18:00 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8423162D0F;\n\tThu, 6 Oct 2022 15:18:00 +0200 (CEST)", "from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com\n\t[IPv6:2a00:1450:4864:20::42e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0E13762CF1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 6 Oct 2022 15:17:57 +0200 (CEST)", "by mail-wr1-x42e.google.com with SMTP id a3so2732506wrt.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 06 Oct 2022 06:17:57 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tq18-20020a056000137200b0022cc7c32309sm17986049wrz.115.2022.10.06.06.17.55\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 06 Oct 2022 06:17:55 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665062280;\n\tbh=9uSlBADtPmusFJSy/vPdN6s/sj96SrHKwSF9ge2O8co=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=NQ5Zxb0sK7mzVy3PNzU9JXGX+DaGSPzNStIXBOQSiYWuE8ENf1oCRLPFn+Vi8Qw+O\n\tGHk7DglZWJqKE7XDkqeKnskI89ZKGVXgNN/PjvsuOr2MeeUODFYVkM90/I+N6m3uFs\n\tE1IdUgcMefNDzcPjcwIwylLmtmk/sXnryiaDwvoSyR2RY10hFkyo+sMe9mvIlcu+cQ\n\tUQQfW9L5nF00DCp2MrcJGHMcgImk5k+esiYSjXpehqJw013fqEv5onTC4pWE10wum4\n\tO9g/PSB8sYUgQiMSFhiNYDJp3MHhn6Fngm1nIjFRm+nj8KPgNbg1fHoVFzhc20q8JQ\n\tDFbuaheJ1r/RQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date;\n\tbh=+XBEmVpKujqmMA3AqvvSLE7pPeInV6i9gV1hkCZ8g6I=;\n\tb=I7y4TiKtk8ZX88umR8aYHoOF36OLjwP7+wPnn5k63FKfRRAv6PATulAKEm4dTgVmM4\n\tFaFqbq9ran1s0jaQLow4TOi2uW5d9RYwGCJJRqe2yMwRNnVIq/Wr5Xkrx1Q4JXRgpE5m\n\tStLE3PUpSZlgXEArD8hjTUeBOUL1VBbalEnjucJi5VgQwWfn74KfB0Ym9rEqPeNAHU5v\n\tx1pJSknVhL9s5jtQn5099gPVgiadswVliTTq/2Eacoq4EE7+8QJV+TvfTNeyt8LTWgHC\n\tTyb+kSTwOOJvK2YjsmSWgwlhFa1I7912rL5MEdVljq2sCDPsek1HBtpNr16u/5fuFPWe\n\tzaiA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"I7y4TiKt\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date;\n\tbh=+XBEmVpKujqmMA3AqvvSLE7pPeInV6i9gV1hkCZ8g6I=;\n\tb=JJnYXOU6lsbou/mWZB9B2KMUzN7LSw10op/Dku1TTfJlwrcgyhT4VLIrnlyEYcM0Qz\n\t9g0HYMsf6utmHg0Sb5/L+gir4dsnPot7t+p7YrBCSytqgVx5nvgUBtwCc5jMi8QLeUEm\n\tAScPYaRNvV2PpSuihSK6w+OggN24M/78HLq1MlyZr+x2Tn+nKVLeO+Jsbj/RyH1pZCQX\n\tKY9tgunbFZlitzZE5A5pLND+aqGMvs5GrcyUDR1iYDsiqo8qBPeELZBNq1GsY8HNTGQa\n\tTaX0bJyigCCZBBIHcn0OIo70InITKgAvSiolJejxa8dBE2N08l1hbIfbSUAbAYAzl4Oh\n\tG0yA==", "X-Gm-Message-State": "ACrzQf0KTIlGpwdFvBf9+JlvWUiPdJ7qx8aGPdq1q4eFVx2uqpMm8uit\n\tEO9EoOA1VL+npgr8JnSH4/2txRjMPEIRNg==", "X-Google-Smtp-Source": "AMsMyM5F04OaSMiEvjdTtxxjLXCkaqnGIR9EoG6QR6XS8jl8dYZVYlGl9SRFkaUwI/Kfs7eiJenKyQ==", "X-Received": "by 2002:adf:b646:0:b0:221:76eb:b3ba with SMTP id\n\ti6-20020adfb646000000b0022176ebb3bamr3082713wre.237.1665062276505; \n\tThu, 06 Oct 2022 06:17:56 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 6 Oct 2022 14:17:38 +0100", "Message-Id": "<20221006131744.5179-5-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221006131744.5179-1-naush@raspberrypi.com>", "References": "<20221006131744.5179-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 04/10] ipa: raspberrypi: Remove\n\tinitialized_ field from CamHelper", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Given that the single user of the CamHelper is the Raspberry Pi IPA, the\ninitialized_ field check is unnecessary. Remove the check and the field.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/cam_helper.cpp | 9 +--------\n src/ipa/raspberrypi/cam_helper.h | 1 -\n 2 files changed, 1 insertion(+), 9 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp\nindex fd3527b94501..45214531626e 100644\n--- a/src/ipa/raspberrypi/cam_helper.cpp\n+++ b/src/ipa/raspberrypi/cam_helper.cpp\n@@ -7,7 +7,6 @@\n \n #include <linux/videodev2.h>\n \n-#include <assert.h>\n #include <map>\n #include <string.h>\n \n@@ -41,8 +40,7 @@ CamHelper *CamHelper::create(std::string const &camName)\n }\n \n CamHelper::CamHelper(std::unique_ptr<MdParser> parser, unsigned int frameIntegrationDiff)\n-\t: parser_(std::move(parser)), initialized_(false),\n-\t frameIntegrationDiff_(frameIntegrationDiff)\n+\t: parser_(std::move(parser)), frameIntegrationDiff_(frameIntegrationDiff)\n {\n }\n \n@@ -63,13 +61,11 @@ void CamHelper::process([[maybe_unused]] StatisticsPtr &stats,\n \n uint32_t CamHelper::exposureLines(const Duration exposure, const Duration lineLength) const\n {\n-\tassert(initialized_);\n \treturn exposure / lineLength;\n }\n \n Duration CamHelper::exposure(uint32_t exposureLines, const Duration lineLength) const\n {\n-\tassert(initialized_);\n \treturn exposureLines * lineLength;\n }\n \n@@ -80,8 +76,6 @@ uint32_t CamHelper::getVBlanking(Duration &exposure,\n \tuint32_t frameLengthMin, frameLengthMax, vblank;\n \tuint32_t exposureLines = CamHelper::exposureLines(exposure, mode_.minLineLength);\n \n-\tassert(initialized_);\n-\n \t/*\n \t * minFrameDuration and maxFrameDuration are clamped by the caller\n \t * based on the limits for the active sensor mode.\n@@ -110,7 +104,6 @@ void CamHelper::setCameraMode(const CameraMode &mode)\n \t\tparser_->setBitsPerPixel(mode.bitdepth);\n \t\tparser_->setLineLengthBytes(0); /* We use SetBufferSize. */\n \t}\n-\tinitialized_ = true;\n }\n \n void CamHelper::getDelays(int &exposureDelay, int &gainDelay,\ndiff --git a/src/ipa/raspberrypi/cam_helper.h b/src/ipa/raspberrypi/cam_helper.h\nindex 9b5e602689f3..6771829a56da 100644\n--- a/src/ipa/raspberrypi/cam_helper.h\n+++ b/src/ipa/raspberrypi/cam_helper.h\n@@ -106,7 +106,6 @@ protected:\n \tCameraMode mode_;\n \n private:\n-\tbool initialized_;\n \t/*\n \t * Smallest difference between the frame length and integration time,\n \t * in units of lines.\n", "prefixes": [ "libcamera-devel", "v2", "04/10" ] }