Message ID | 20240930141415.8857-6-naush@raspberrypi.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Naush On Mon, Sep 30, 2024 at 03:14:13PM GMT, Naushir Patuck wrote: > Add a ispIndex field to CropParams that is used to track > which ISP output (0/1) will be used for a given stream during > configuration. > > Tracking this information is required for an upcoming change where crop > rectangles can be specified for each configured stream. Currently, the > value is fixed to 0. > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Thanks j > --- > src/libcamera/pipeline/rpi/common/pipeline_base.h | 6 ++++-- > src/libcamera/pipeline/rpi/vc4/vc4.cpp | 2 +- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h > index 75babbe17f31..9d23a1994f00 100644 > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h > @@ -135,8 +135,8 @@ public: > IPACameraSensorInfo sensorInfo_; > > struct CropParams { > - CropParams(Rectangle ispCrop_, Size ispMinCropSize_) > - : ispCrop(ispCrop_), ispMinCropSize(ispMinCropSize_) > + CropParams(Rectangle ispCrop_, Size ispMinCropSize_, unsigned int ispIndex_) > + : ispCrop(ispCrop_), ispMinCropSize(ispMinCropSize_), ispIndex(ispIndex_) > { > } > > @@ -148,6 +148,8 @@ public: > Rectangle ispCrop; > /* Minimum crop size in ISP output pixels */ > Size ispMinCropSize; > + /* Index of the ISP output channel for this crop */ > + unsigned int ispIndex; > }; > > /* Mapping of CropParams keyed by the output stream order in CameraConfiguration */ > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp > index 8080f55a1cf4..cfed214ddbd4 100644 > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp > @@ -714,7 +714,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi > */ > cropParams_.emplace(std::piecewise_construct, > std::forward_as_tuple(0), > - std::forward_as_tuple(ispCrop, testCrop.size())); > + std::forward_as_tuple(ispCrop, testCrop.size(), 0)); > > return 0; > } > -- > 2.34.1 >
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h index 75babbe17f31..9d23a1994f00 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h @@ -135,8 +135,8 @@ public: IPACameraSensorInfo sensorInfo_; struct CropParams { - CropParams(Rectangle ispCrop_, Size ispMinCropSize_) - : ispCrop(ispCrop_), ispMinCropSize(ispMinCropSize_) + CropParams(Rectangle ispCrop_, Size ispMinCropSize_, unsigned int ispIndex_) + : ispCrop(ispCrop_), ispMinCropSize(ispMinCropSize_), ispIndex(ispIndex_) { } @@ -148,6 +148,8 @@ public: Rectangle ispCrop; /* Minimum crop size in ISP output pixels */ Size ispMinCropSize; + /* Index of the ISP output channel for this crop */ + unsigned int ispIndex; }; /* Mapping of CropParams keyed by the output stream order in CameraConfiguration */ diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp index 8080f55a1cf4..cfed214ddbd4 100644 --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp @@ -714,7 +714,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi */ cropParams_.emplace(std::piecewise_construct, std::forward_as_tuple(0), - std::forward_as_tuple(ispCrop, testCrop.size())); + std::forward_as_tuple(ispCrop, testCrop.size(), 0)); return 0; }