libcamera: pipeline: raspberrypi: Fix initial value for scoring routine
Use std::numerical_limits to initialise the best score instead of an arbitrary value. This fixes a failure in v4l2-conformance when using the Raspberry Pi pipeline handler and v4l2-compatibility libcamera layer. Reported-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
committed by
Paul Elder
parent
e37e72c61c
commit
d76acac30d
@@ -69,7 +69,7 @@ double scoreFormat(double desired, double actual)
|
||||
|
||||
V4L2DeviceFormat findBestMode(V4L2PixFmtMap &formatsMap, const Size &req)
|
||||
{
|
||||
double bestScore = 9e9, score;
|
||||
double bestScore = std::numeric_limits<double>::max(), score;
|
||||
V4L2DeviceFormat bestMode = {};
|
||||
|
||||
#define PENALTY_AR 1500.0
|
||||
|
||||
Reference in New Issue
Block a user