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>
This commit is contained in:
Tomi Valkeinen 2020-10-07 16:18:10 +03:00 committed by Kieran Bingham
parent 6feebf297e
commit 5f1f3092a1

View file

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