From patchwork Wed Oct 7 13:18:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 10014 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 84028BEEE0 for ; Wed, 7 Oct 2020 13:18:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 520F8605BF; Wed, 7 Oct 2020 15:18:29 +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="Ge7RcPdq"; dkim-atps=neutral Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B593E605BB for ; Wed, 7 Oct 2020 15:18:27 +0200 (CEST) Received: by mail-lj1-x241.google.com with SMTP id r24so1945906ljm.3 for ; Wed, 07 Oct 2020 06:18:27 -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=VjW3v+iYoAihvSHm5zPVY+BTaBGIbTXNOxQerJAtna0=; b=Ge7RcPdqm+NRes6TIn/8NVmumQ0A4lduEkXg7n4fb+mIN+GYxH04b5ksCev0HMorqg e6m/kHu+xgfSdgYsctvJhZpV/92J2TMz1OIzLmoFIZY4He44Rcu8SX/jA6EKpvqhAY2Q G/06dmXqCz41VOR4HhCS4yFOF2/GK2ewmhcrWOJaMyNCXyaDbX9GFJFrvvN5eGB9v9Zx 9cQWnT1WMr/v8qRGA9NHIdocXDGdN1WWU8OUekmz3OjSMAzIH7nIUht3LgZyAi5LVswZ zyU+VmVNnCbQx5eOJYn2Y1o4tR+2vVKCAtriQWDubbz5hcy0jZAdMTFWFPmIqUdchjS+ VsiQ== 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=VjW3v+iYoAihvSHm5zPVY+BTaBGIbTXNOxQerJAtna0=; b=Ur/4kPWwcWtoOPEkGlLrF3AKvAR4T/ieIAerln3VBU4tkqIYj8rjq8idpttbW7Yu98 E09FC4QZmLNzG3CvqQXmUrZFDp3Im2U6WSIpIwOd8YzcOvDfRbXzknPJkkG5TFsNF9ZY pbQkvqsAkr1QWHiyiqS+Zr2OlOPdXEned5MRav3TAJAmiZSVAwSDaHDV0I5eYZFqDDGq rNt8vV2QrsiBopdN9QTQc1fwDx7SDNxcU/T7ponsirfBuwzoaLLeVJrkKW2mdod/15Ya MmnrZqh76Rz1A7UmX5Qut/0ZXBM4XpBvEcglBnC6ygYZollGgPrc3pTRI/v6EOFtSRYG jZYQ== X-Gm-Message-State: AOAM533ppHzBq2DbqreVGyMY4nKGjFrJzw3reNHMOCAiAezWiHc43kFB pReVXdZDQ1Ck6MkR6iAircaFEKqUsly3nqDt X-Google-Smtp-Source: ABdhPJxGr+vaGduO5nAz5Qz8mvo0SN6JUGsux2A3GvteXuP8w+UhjjhVw/57nCeFoGOibsYfavAEdw== X-Received: by 2002:a2e:9118:: with SMTP id m24mr1291571ljg.364.1602076707056; Wed, 07 Oct 2020 06:18:27 -0700 (PDT) Received: from deskari.lan (91-152-83-50.elisa-laajakaista.fi. [91.152.83.50]) by smtp.gmail.com with ESMTPSA id i139sm329539lfi.276.2020.10.07.06.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 06:18:26 -0700 (PDT) From: Tomi Valkeinen To: libcamera-devel@lists.libcamera.org, Naushir Patuck , David Plowman Date: Wed, 7 Oct 2020 16:18:10 +0300 Message-Id: <20201007131812.2688973-2-tomi.valkeinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201007131812.2688973-1-tomi.valkeinen@iki.fi> References: <20201007131812.2688973-1-tomi.valkeinen@iki.fi> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/3] 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. */