| Message ID | 20260507-kbingham-simple-scaler-crop-v1-1-7a5af1948565@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Hi, Quoting Kieran Bingham (2026-05-07 17:25:33) > Even without a specific scaler, this gives the application information about > the rectangle that conveys the pixels being displayed in the mode. > > Provide the analog crop region to the camera properties. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> As argued in my reply to the cover letter. Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Cheers, Stefan > --- > src/libcamera/pipeline/simple/simple.cpp | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp > index c6fe12d65b18..ee394c567a2c 100644 > --- a/src/libcamera/pipeline/simple/simple.cpp > +++ b/src/libcamera/pipeline/simple/simple.cpp > @@ -30,6 +30,7 @@ > #include <libcamera/control_ids.h> > #include <libcamera/geometry.h> > #include <libcamera/pixel_format.h> > +#include <libcamera/property_ids.h> > #include <libcamera/stream.h> > > #include "libcamera/internal/camera.h" > @@ -1523,6 +1524,13 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) > if (ret < 0) > return ret; > > + IPACameraSensorInfo sensorInfo; > + ret = data->sensor_->sensorInfo(&sensorInfo); > + if (ret) > + return ret; > + > + data->properties_.set(properties::ScalerCropMaximum, sensorInfo.analogCrop); > + > /* Configure the video node, taking into account any Bayer pattern change. */ > V4L2PixelFormat videoFormat; > if (format.code == pipeConfig->code) { > > -- > 2.52.0 >
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index c6fe12d65b18..ee394c567a2c 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -30,6 +30,7 @@ #include <libcamera/control_ids.h> #include <libcamera/geometry.h> #include <libcamera/pixel_format.h> +#include <libcamera/property_ids.h> #include <libcamera/stream.h> #include "libcamera/internal/camera.h" @@ -1523,6 +1524,13 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) if (ret < 0) return ret; + IPACameraSensorInfo sensorInfo; + ret = data->sensor_->sensorInfo(&sensorInfo); + if (ret) + return ret; + + data->properties_.set(properties::ScalerCropMaximum, sensorInfo.analogCrop); + /* Configure the video node, taking into account any Bayer pattern change. */ V4L2PixelFormat videoFormat; if (format.code == pipeConfig->code) {
Even without a specific scaler, this gives the application information about the rectangle that conveys the pixels being displayed in the mode. Provide the analog crop region to the camera properties. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- src/libcamera/pipeline/simple/simple.cpp | 8 ++++++++ 1 file changed, 8 insertions(+)