[libcamera-devel] [PATCH v3 7/9] pipeline: raspberrypi: Remove "unpacked" format penalty in mode selection

Kieran Bingham kieran.bingham at ideasonboard.com
Wed Oct 27 14:19:30 CEST 2021


Quoting Naushir Patuck (2021-10-27 10:28:01)
> 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 at raspberrypi.com>
> Reviewed-by: David Plowman <david.plowman at raspberrypi.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>


Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index 1b78b5e74a63..e01359b20fd9 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -144,7 +144,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) {
> @@ -162,9 +161,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)
> -- 
> 2.25.1
>


More information about the libcamera-devel mailing list