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. */