From patchwork Mon Jun 14 09:53:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 12582 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A8FA8C3218 for ; Mon, 14 Jun 2021 09:53:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D13D56892F; Mon, 14 Jun 2021 11:53:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="ndbKxKRB"; dkim-atps=neutral Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C8A668933 for ; Mon, 14 Jun 2021 11:53:47 +0200 (CEST) Received: by mail-wr1-x433.google.com with SMTP id c5so13820524wrq.9 for ; Mon, 14 Jun 2021 02:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ifVD5IiwHvkcKKMT1rdm93U31ooE4K5nZEZrQlYCzcg=; b=ndbKxKRBg/iInp20v+RYGpJS8SPSoCqD1IZlbhgSgsDJxy7RFiELbbmB5mXqzuaoz0 InpHKYfKjiGLG2v5qYX/E+VYpuOA8/z3x4MljcB4SN/RdTwBCkO8UijBku3iWwM47KvA J4gqDe983s6njBhZwhnVf8CDgESZaElyU6W1hR/88fKiSCzmF4vER4LLEW+LO6LUm2P7 N6hkuvrpspsa0AgLMXRJ9nJJrHyXEzr2sVUPNXcrBLqtPvMUph1sQTpb9raOnB3tcNl6 KOgEBBpFAR/r9bc0nkp7PSAP775zGaiU2RS4ej7R6XtS/hAyJTFamZZaggYEmyeLuUyX f5vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ifVD5IiwHvkcKKMT1rdm93U31ooE4K5nZEZrQlYCzcg=; b=ZN3gCPyUygdD6Uh8YaP8QiRUXOFBYpVsyfifaN+Kr7D90NsI9i6JrlP1kBL0jTcpvs aYN8wFjtR4o6EEh/YT220MShB4JzJzVKgl0uCEDrhokiAoaD2wWKR80LLGC7oQUSWs2N McF0eu3dPs3X1WOvzkY249LVa7z8c8mRhQhivzOjkfxkTCQUysYh5vMAH9sGV98goYR2 OyICP+cTQpv46UKL5WidEFEc3aHmIgEH23/NgftPvVIvYmEYL3NRXous/QgD7USvHbdA V9puJ6Tg+A0J1giPdRDgdRgWnlP0QuapaCKLaeot9aZU7WxXFgmkiZyU3h5VwjfQeVYQ ruGw== X-Gm-Message-State: AOAM530hejHjI+wxHphTXJUfw5xbgh2OrZ2VI2cgBoxee30hMYRhZUEv ZzNSlMVv49IWV9mpbsnsmbvnbmr00xTJbA== X-Google-Smtp-Source: ABdhPJxHrbEDsWHYr5x6LLoyz3t48/FJwrOQQI9L8rzo/7pEhvkdJCykCG2EMCsrUPdjH/ydFrjYkg== X-Received: by 2002:adf:e7d0:: with SMTP id e16mr17372066wrn.202.1623664426749; Mon, 14 Jun 2021 02:53:46 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:fd93:d554:2dff:83ca]) by smtp.gmail.com with ESMTPSA id c2sm19834891wmf.24.2021.06.14.02.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 02:53:46 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Mon, 14 Jun 2021 10:53:36 +0100 Message-Id: <20210614095340.3051816-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210614095340.3051816-1-naush@raspberrypi.com> References: <20210614095340.3051816-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/6] ipa: raspberrypi: Set default values for member variables of MdParser X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Set some sensible default values for member variables of the MdParser class. Remove buffer_size_bytes_ along with some related asserts as this class now uses libcamera::Span for buffer handling, and buffer_size_bytes_ is unused. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Laurent Pinchart --- src/ipa/raspberrypi/cam_helper_imx219.cpp | 1 - src/ipa/raspberrypi/cam_helper_imx477.cpp | 1 - src/ipa/raspberrypi/md_parser.hpp | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ipa/raspberrypi/cam_helper_imx219.cpp b/src/ipa/raspberrypi/cam_helper_imx219.cpp index e550fba62cde..ec218dce5456 100644 --- a/src/ipa/raspberrypi/cam_helper_imx219.cpp +++ b/src/ipa/raspberrypi/cam_helper_imx219.cpp @@ -128,7 +128,6 @@ MdParser::Status MdParserImx219::Parse(libcamera::Span buffer) * registers. */ assert(bits_per_pixel_); - assert(num_lines_ || buffer_size_bytes_); /* Need to be ordered */ uint32_t regs[3] = { GAIN_REG, EXPHI_REG, EXPLO_REG }; reg_offsets_[0] = reg_offsets_[1] = reg_offsets_[2] = -1; diff --git a/src/ipa/raspberrypi/cam_helper_imx477.cpp b/src/ipa/raspberrypi/cam_helper_imx477.cpp index a4a58c15467d..25b36bce0dac 100644 --- a/src/ipa/raspberrypi/cam_helper_imx477.cpp +++ b/src/ipa/raspberrypi/cam_helper_imx477.cpp @@ -117,7 +117,6 @@ MdParser::Status MdParserImx477::Parse(libcamera::Span buffer) * registers. */ assert(bits_per_pixel_); - assert(num_lines_ || buffer_size_bytes_); /* Need to be ordered */ uint32_t regs[4] = { EXPHI_REG, diff --git a/src/ipa/raspberrypi/md_parser.hpp b/src/ipa/raspberrypi/md_parser.hpp index 86e0577614e0..25ba0e7c9400 100644 --- a/src/ipa/raspberrypi/md_parser.hpp +++ b/src/ipa/raspberrypi/md_parser.hpp @@ -68,7 +68,8 @@ public: ERROR = 2 }; - MdParser() : reset_(true) + MdParser() + : reset_(true), bits_per_pixel_(0), num_lines_(0), line_length_bytes_(0) { } @@ -103,7 +104,6 @@ protected: int bits_per_pixel_; unsigned int num_lines_; unsigned int line_length_bytes_; - unsigned int buffer_size_bytes_; }; /*