From 5f1f3092a1bedaec36fa98f9c6476fb48f70f931 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 7 Oct 2020 16:18:10 +0300 Subject: ipa: raspberrypi: fix bin_x calculation 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 Signed-off-by: Kieran Bingham --- src/ipa/raspberrypi/raspberrypi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ipa') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index b0c7d1c1..48a72dd2 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. */ -- cgit v1.2.1