From patchwork Wed Oct 7 11:07:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 10007 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 BCB8FBEEE0 for ; Wed, 7 Oct 2020 11:08:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 69BAA6059B; Wed, 7 Oct 2020 13:08:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="s/T/f+Lv"; dkim-atps=neutral Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DF05860553 for ; Wed, 7 Oct 2020 13:08:05 +0200 (CEST) Received: by mail-lf1-x144.google.com with SMTP id g2so1781958lfr.10 for ; Wed, 07 Oct 2020 04:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HeRPwF3rcso5VQ08mkHRzIs5kjhxqwAHvyl3LAyXSRY=; b=s/T/f+LvN3jvuzLSLUQDsbTnK/0XyB176RzRLmN0I5kdWKQWvGP8VPTSjU3h7jnd9A qsagX4X2800ROyRkHbGKMkAZQse8RSbruXfsNNNa1VKEm2iGGYbyGYtP6+qOzrvx6/7L tSEkORnx2aUl87OvXAOBN8rIGuSyO7BepkuTtuf6dbgKN2rCAIAXvjg8KqyW4FstzPF7 Yo/pKjBQDL6HZ+qOtkvgmOuSBiSXlEWqeWJCbK4O6FzzVIzw+aFDt1QLRiQm7CQ/m8DZ lg4QESGhzmTZbza4dINb4u8SPZV/LZrjxjGrSrjeJPI0MFAYqaA7d9qeksDe8sdQqlGn DCkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=HeRPwF3rcso5VQ08mkHRzIs5kjhxqwAHvyl3LAyXSRY=; b=Cz75T/rK4WgbL1DBdV5wL3Gq9190deH7e4DASFrLojHYQ/uJx4EDXPPYIv6JeE+RSS s7I1Lpn+aUFg+VVBiNENFKN2m1m4r7gDkk913ihiD6iZYwwdpvRZKKwjou2y52EXjHbo ddt/Egb7LetWn4bav6FABh04wU/sJLPIGtpRhfkTo4URloA9lBJHoVvNHgOncB6YsK63 XMOwquVXTbNKOo5GsGLX4yuAGyr4cYRqvg2KW0k10ytRtvm21h+0RG3C/nZVZU5ATucs sB4NeYQmXSPqBvLCbDO6VWUP3mysZyp17Xa/Iapr5Giy9S50tfTxW7IYHCWLXlhEhz1O D4Qg== X-Gm-Message-State: AOAM530XByGvJEH3vBKj9pKI+GD1TeqCQs0T1RvvFWUIa/km5nFkW7UW jBBjMPWMvQofPOiJZ7S0slfRAZEBmXGfnA== X-Google-Smtp-Source: ABdhPJzBxipH9h+0641ISu+xH8zaiUJaYh3E2DKFIYeUzDvEu7B81OMkr92zwf6oCJq4ANKj2/oAeg== X-Received: by 2002:ac2:5e9b:: with SMTP id b27mr720220lfq.312.1602068885107; Wed, 07 Oct 2020 04:08:05 -0700 (PDT) Received: from deskari.lan (91-152-83-50.elisa-laajakaista.fi. [91.152.83.50]) by smtp.gmail.com with ESMTPSA id x14sm287445lfc.93.2020.10.07.04.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 04:08:04 -0700 (PDT) From: Tomi Valkeinen To: libcamera-devel@lists.libcamera.org, Naushir Patuck , David Plowman Date: Wed, 7 Oct 2020 14:07:40 +0300 Message-Id: <20201007110743.55561-2-tomi.valkeinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201007110743.55561-1-tomi.valkeinen@iki.fi> References: <20201007110743.55561-1-tomi.valkeinen@iki.fi> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/4] ipa: raspberrypi: fix bin_x calculation 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: , Cc: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" I presume this code is supposed to set bin_x and bin_y, and not bin_y two times. This caused use of uninitialized variable later when bin_x was used. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: David Plowman --- src/ipa/raspberrypi/raspberrypi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index b0c7d1c..48a72dd 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -178,7 +178,7 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo) * * \todo Get the pipeline handle to provide the full data */ - mode_.bin_y = std::min(2, static_cast(mode_.scale_x)); + mode_.bin_x = std::min(2, static_cast(mode_.scale_x)); mode_.bin_y = std::min(2, static_cast(mode_.scale_y)); /* The noise factor is the square root of the total binning factor. */ From patchwork Wed Oct 7 11:07:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 10008 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 3C09BBEEE0 for ; Wed, 7 Oct 2020 11:08:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BAF2A605A9; Wed, 7 Oct 2020 13:08:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Cp9UtNQq"; dkim-atps=neutral Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BD00860455 for ; Wed, 7 Oct 2020 13:08:06 +0200 (CEST) Received: by mail-lj1-x22e.google.com with SMTP id a5so1522192ljj.11 for ; Wed, 07 Oct 2020 04:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2dKW7thoNLoTpb7x6D3yM/3mYoNj7JwgroKaLWUq1Kc=; b=Cp9UtNQqKwm+bOojsC73cPIyPK9+lTD+qfctP+FYHmdTdWAXshb9JVhAmuHRCa2ssP Qewt0ik7jZq7X3ROYpC6j/ST1RqCaw0ZtkyJsk/+GCCSZjJLJnnIXlV7QgWQnNF+Fy6x usZYLuU/M/L1zYjOlbbIvTuwOQncPtyKorRiQYFOa/C0mZ1IvkCdoVQZpfVWULzyYvpE 4nD2tp/rUvFJbR/SgSs+GwiMKoYLVUeLjpYVDqak9k8ch84mP3b++v7YbLFpb+h8euwP 4qG63D1pf576bXFHXeOxKuPnOJzYpEmrFdNneWoEEEwG8NxjEAEy/qpwe1xHnzr7Vl13 f87w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2dKW7thoNLoTpb7x6D3yM/3mYoNj7JwgroKaLWUq1Kc=; b=qtyyYT9VnYiX+wDYy6k8NW4pjRobvpTsGucwCOjYaDkFeoWXSz615Hjh2J+jUYDRC3 RvOEdRhC6mf3udBbMb63mw2zTcgHh6tVqEQtQdu7N90rFpUEjWhnIVbDvBJTQua29aCd kApyEWToAfg1FkcpcoRaItt3qRU1iwZaQ9KLy4q1w69D6HHfjvpJ65YIgSs1FszI4C93 nhXQiDU10lurg0Cdelw2xzuck5+dfAICPcwown7UxyCk9SqKQKlMmwIUNrB236PPBs1h nFmZc4ut94+ktwE8/OZ6Rwmu206ki/ESQd1rk694blmhgWeIQN/hZ/lo7GOHvOuHUUn3 GaAg== X-Gm-Message-State: AOAM530YFJFOB1+Ma1ob08TihwB1TG+lCwT/fxx6oUQNbiBaaN4od9Ad 8iQe/JfJKcUQLqsocDL4sF6TDog00DQCSQ== X-Google-Smtp-Source: ABdhPJyqwGN9gUXSuAsjuT13XfhukuKqbbjuWzyn5PW1o0z3TzKTb2LWHLOf8rtB0uPetAss3YQSdw== X-Received: by 2002:a2e:b6cf:: with SMTP id m15mr782283ljo.74.1602068886106; Wed, 07 Oct 2020 04:08:06 -0700 (PDT) Received: from deskari.lan (91-152-83-50.elisa-laajakaista.fi. [91.152.83.50]) by smtp.gmail.com with ESMTPSA id x14sm287445lfc.93.2020.10.07.04.08.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 04:08:05 -0700 (PDT) From: Tomi Valkeinen To: libcamera-devel@lists.libcamera.org, Naushir Patuck , David Plowman Date: Wed, 7 Oct 2020 14:07:41 +0300 Message-Id: <20201007110743.55561-3-tomi.valkeinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201007110743.55561-1-tomi.valkeinen@iki.fi> References: <20201007110743.55561-1-tomi.valkeinen@iki.fi> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] ipa: raspberrypi: fix missing initialize of status_ 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: , Cc: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Many fields in status_ are not initialized, causing use of uninitialized memory. Drop the code that clears some of the individual fields, and instead just memset the whole thing. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham --- src/ipa/raspberrypi/controller/rpi/agc.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp index df4d364..9e75178 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp @@ -148,14 +148,8 @@ Agc::Agc(Controller *controller) exposure_mode_(nullptr), constraint_mode_(nullptr), frame_count_(0), lock_count_(0) { + memset(&status_, 0, sizeof(status_)); ev_ = status_.ev = 1.0; - flicker_period_ = status_.flicker_period = 0.0; - fixed_shutter_ = status_.fixed_shutter = 0; - fixed_analogue_gain_ = status_.fixed_analogue_gain = 0.0; - // set to zero initially, so we can tell it's not been calculated - status_.total_exposure_value = 0.0; - status_.target_exposure_value = 0.0; - status_.locked = false; output_status_ = status_; } From patchwork Wed Oct 7 11:07:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 10009 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 4B75EBEEE0 for ; Wed, 7 Oct 2020 11:08:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1589E60589; Wed, 7 Oct 2020 13:08:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UkU7GzzR"; dkim-atps=neutral Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AD2BE60589 for ; Wed, 7 Oct 2020 13:08:07 +0200 (CEST) Received: by mail-lf1-x144.google.com with SMTP id l2so1830790lfk.0 for ; Wed, 07 Oct 2020 04:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OySjD9dnYgzNLor4izMnFRzCScZeaXOazSafFJr+/L0=; b=UkU7GzzRwnkDTsbAtI90N/xVtwVY22eEnF2jOvgGgder98edWLcr3GM7Y7uWdut+HM T6Ga93/64v/BqUUimI+t1heDgIW2dMGscwtiovaM5nvCc+WehxjMKs2K5T8WN5X5Xp+F O6mWR1E5QuIBu/d7tIReDivWUtNxFAqPtRJD1eEdrPXKA3JIK7AebFSzvGbx2nJ7OofL MGsSLqnb9SrsFPI/rJV94Qog+T/ZJw3Ad3IOFQCTYFO32r0qbxJ5RgfCgBNuaOM/qCPF 1j5ftD3nePdAWGBtWSuWDU4LFaf4LxY1jvJV9KOaDVxEiCjBAhB1mRg2khKuyR/9gWrU TL3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OySjD9dnYgzNLor4izMnFRzCScZeaXOazSafFJr+/L0=; b=mVeECvlffp7wZG+QlUY27twkrursVdzNKN75UlQyWgMqRD1K66hCppIRbb3CBy26EQ 1U4hkdfX5LRmypBfloroKBnaqXP+1G29roQIOUwhPre+mGQOuvwjyml5LuJiCBtbpN5r BH1EeII5ZX2zZmI4mhQ0SHaPzzk6kd1qv9/vhHW41ORw5tQhk8lxGZCVko6wUPuT+0cm Al6JjUF1GAPQ0LpXbaAhtHWbVsMw8VHEAyllJ/9tPEw+LpdANwrqSYQnRIiFaGhnFMPP ATGj1aBEaP1VCm5v2bQJ/x4LQX7gcfXDESFRVdCwYn6YAaz1pi4uzr2GjQRoyq4bgeP/ 840A== X-Gm-Message-State: AOAM532xwQQq37jw2t+KI+t3L4XqN3ieBUPQQqNwmD7so6LBjrdYzSbu ie6PaQMKcROa5WSKLN/qyQAVfNnLJzx9lA== X-Google-Smtp-Source: ABdhPJxUcsU4PKZ2QaCgvxm4cHEFIvdtQhne9ZBFhcr5fdf/VxvLkWL1A01bs6gSgK/4ihNHfSNmMw== X-Received: by 2002:a19:8286:: with SMTP id e128mr729245lfd.307.1602068887019; Wed, 07 Oct 2020 04:08:07 -0700 (PDT) Received: from deskari.lan (91-152-83-50.elisa-laajakaista.fi. [91.152.83.50]) by smtp.gmail.com with ESMTPSA id x14sm287445lfc.93.2020.10.07.04.08.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 04:08:06 -0700 (PDT) From: Tomi Valkeinen To: libcamera-devel@lists.libcamera.org, Naushir Patuck , David Plowman Date: Wed, 7 Oct 2020 14:07:42 +0300 Message-Id: <20201007110743.55561-4-tomi.valkeinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201007110743.55561-1-tomi.valkeinen@iki.fi> References: <20201007110743.55561-1-tomi.valkeinen@iki.fi> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/4] ipa: raspberrypi: fix access to uninitialized variables 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: , Cc: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Set span_r and span_b to -1 so that when they are passed to Pwl::Eval() they won't cause access to uninitialized memory. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: David Plowman --- src/ipa/raspberrypi/controller/rpi/awb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp index a5536e4..469d0e5 100644 --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp @@ -430,7 +430,7 @@ double Awb::coarseSearch(Pwl const &prior) void Awb::fineSearch(double &t, double &r, double &b, Pwl const &prior) { - int span_r, span_b; + int span_r = -1, span_b = -1; config_.ct_r.Eval(t, &span_r); config_.ct_b.Eval(t, &span_b); double step = t / 10 * config_.coarse_step * 0.1; From patchwork Wed Oct 7 11:07:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 10010 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 A6332BEEE1 for ; Wed, 7 Oct 2020 11:08:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 73D1F605AF; Wed, 7 Oct 2020 13:08:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="o8fBkDrF"; dkim-atps=neutral Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 83E6F60455 for ; Wed, 7 Oct 2020 13:08:08 +0200 (CEST) Received: by mail-lj1-x22f.google.com with SMTP id a5so1522292ljj.11 for ; Wed, 07 Oct 2020 04:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nzYDU2E0TJa+hObRpA9YU7WnAsBv5mGDCt8vxp3W3hk=; b=o8fBkDrFnbk+CCVOetv4TbItez7CRn3f3EfrI/3VDQA2HhWymHRALOfUAPgwAoA5UF nmICmgPxXzOLxnQzQP73AgM/sHC43+tvfx6gq27h79OXPwL1l3XoNZnHwrUBOExOilPv 4qDibCBs5+BF+p1uVroaB8nwXABbPqewDOfU7lNm+6S0tiCQcUsbzrXvTHoFzuvsJbUY EC3oq9qAwYOXJ9JEf1rvVAPBdFnPWZb4blAH/11W7O71JaR7WTGKJTRD4JKYKrxcOk4y +JmVecBGnLSoxbWv/3cQOb6zhY0zyarwoloCS2NJGNZ+boPH5jnu/ItxPr+IYCJqNPog qqnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=nzYDU2E0TJa+hObRpA9YU7WnAsBv5mGDCt8vxp3W3hk=; b=AnPYrx2fqpO5LDNbv63S0BBdKZbj54kjPCc45GTwM2DsQWvwvcVNjlydnbEM0x4BQh /MhcSWgH5g0WitYGwO29xqkSZ2X8ZnMBtRvtqYKHvafwhYhLDP5TO4+C2CtMXDPjF6zv F5lwMlszp/C+ApfJ0DsQsdD9CFyUhX9l8yNAf1wL/5RlvFgrgt5HoOQVHBNvQMRQhSXc +f9/bKhq+PYPW3u2sDrTU3AzHtqbILChqLZCOn+nGJR5FzsxhbWZzTnxEQFr2kez57bW 7++wREeXtAJTd1GeJpiIUS7KiVLrzq4U8RsfRYH3QOJtDrh9bDG1hlIPtrcrAP7MIRRg mUFw== X-Gm-Message-State: AOAM531jksOA5ImI3dF3KJDDPVXf61HP3bO8mS1RCktShQ9vRZr1/lg4 IKkKkeFhae1bnG0S0lPHIVLB7i3x0enUrg== X-Google-Smtp-Source: ABdhPJx/dKkCA1N42JgirGHiXUYshexlPAs68u9C2RB7uMPdKWybtyiVrIjnhETebhNlD+M4/sM9mg== X-Received: by 2002:a2e:50a:: with SMTP id 10mr925166ljf.55.1602068887834; Wed, 07 Oct 2020 04:08:07 -0700 (PDT) Received: from deskari.lan (91-152-83-50.elisa-laajakaista.fi. [91.152.83.50]) by smtp.gmail.com with ESMTPSA id x14sm287445lfc.93.2020.10.07.04.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 04:08:07 -0700 (PDT) From: Tomi Valkeinen To: libcamera-devel@lists.libcamera.org, Naushir Patuck , David Plowman Date: Wed, 7 Oct 2020 14:07:43 +0300 Message-Id: <20201007110743.55561-5-tomi.valkeinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201007110743.55561-1-tomi.valkeinen@iki.fi> References: <20201007110743.55561-1-tomi.valkeinen@iki.fi> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/4] ipa: raspberrypi: fix use of uninitialized fields 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: , Cc: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" These fields are not initialized, but are used. Set them to 0. Signed-off-by: Tomi Valkeinen --- src/ipa/raspberrypi/controller/rpi/agc.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp index ba7ae09..23374d5 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.hpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp @@ -116,9 +116,9 @@ private: std::string exposure_mode_name_; std::string constraint_mode_name_; double ev_; - double flicker_period_; - double fixed_shutter_; - double fixed_analogue_gain_; + double flicker_period_ = 0; + double fixed_shutter_ = 0; + double fixed_analogue_gain_ = 0; }; } // namespace RPiController