summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/raspberrypi.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@iki.fi>2020-10-07 16:18:10 +0300
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-07 14:46:38 +0100
commit5f1f3092a1bedaec36fa98f9c6476fb48f70f931 (patch)
treeeaa9e9f4d9cb445de9a922359b186c2546853430 /src/ipa/raspberrypi/raspberrypi.cpp
parent6feebf297ead7b13495d01d9dffb5a09aab82af9 (diff)
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 <tomi.valkeinen@iki.fi> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/raspberrypi.cpp')
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp2
1 files changed, 1 insertions, 1 deletions
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<int>(mode_.scale_x));
+ mode_.bin_x = std::min(2, static_cast<int>(mode_.scale_x));
mode_.bin_y = std::min(2, static_cast<int>(mode_.scale_y));
/* The noise factor is the square root of the total binning factor. */