Message ID | 20211022143907.3089419-5-naush@raspberrypi.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Naush Thanks for the patch. On Fri, 22 Oct 2021 at 15:40, Naushir Patuck <naush@raspberrypi.com> wrote: > > 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> > --- > 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 45725527d66e..2b70b877e70a 100644 > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > @@ -109,7 +109,6 @@ V4L2SubdeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &re > #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) { > @@ -127,9 +126,6 @@ V4L2SubdeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &re > score += PENALTY_AR * scoreFormat(reqAr, modeAr); > > /* Add any penalties... this is not an exact science! */ > - if (!info.packed) > - score += PENALTY_UNPACKED; > - Agreed, good to see this go. Reviewed-by: David Plowman <david.plowman@raspberrypi.com> David > if (info.bitsPerPixel == 12) > score += PENALTY_12BIT; > else if (info.bitsPerPixel == 10) > -- > 2.25.1 >
Hi Naush, Thank you for the patch. On Fri, Oct 22, 2021 at 03:39:05PM +0100, Naushir Patuck wrote: > 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> > --- > 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 45725527d66e..2b70b877e70a 100644 > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp > @@ -109,7 +109,6 @@ V4L2SubdeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &re > #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) { > @@ -127,9 +126,6 @@ V4L2SubdeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &re > score += PENALTY_AR * scoreFormat(reqAr, modeAr); > > /* Add any penalties... this is not an exact science! */ > - if (!info.packed) > - score += PENALTY_UNPACKED; > - I'm all for exact science when possible :-) Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > if (info.bitsPerPixel == 12) > score += PENALTY_12BIT; > else if (info.bitsPerPixel == 10)
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 45725527d66e..2b70b877e70a 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -109,7 +109,6 @@ V4L2SubdeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &re #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) { @@ -127,9 +126,6 @@ V4L2SubdeviceFormat findBestMode(const SensorFormats &formatsMap, const Size &re score += PENALTY_AR * scoreFormat(reqAr, modeAr); /* 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)
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> --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ---- 1 file changed, 4 deletions(-)