[libcamera-devel,v4,09/10] pipeline: raspberrypi: Remove "unpacked" format penalty in mode selection
diff mbox series

Message ID 20211028084646.453775-10-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Raspberry Pi: Conversion to media controller
Related show

Commit Message

Naushir Patuck Oct. 28, 2021, 8:46 a.m. UTC
With the recent change to switch to programming the sensor device directly,
the notion of packed vs unpacked modes are not relevent, since that is a
Unicam format construct. Remove any scoring based on packed/unpacked modes.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ----
 1 file changed, 4 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 8e3e96a4359f..b405e2d55d57 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -131,7 +131,6 @@  V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &
 #define PENALTY_8BIT		2000.0
 #define PENALTY_10BIT		1000.0
 #define PENALTY_12BIT		   0.0
-#define PENALTY_UNPACKED	 500.0
 
 	/* Calculate the closest/best mode from the user requested size. */
 	for (const auto &iter : formatsMap) {
@@ -150,9 +149,6 @@  V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &
 			score += PENALTY_AR * scoreFormat(reqAr, fmtAr);
 
 			/* Add any penalties... this is not an exact science! */
-			if (!info.packed)
-				score += PENALTY_UNPACKED;
-
 			if (info.bitsPerPixel == 12)
 				score += PENALTY_12BIT;
 			else if (info.bitsPerPixel == 10)