diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-10-23 05:36:38 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-11-25 10:52:06 +0200 |
commit | 2447d14fa8af7e913232d21e0d2157d3088ec25c (patch) | |
tree | ba7f246eab8bac8e54dc317dfedf2d51e0b06a94 /src/libcamera/pipeline/rkisp1/rkisp1_path.h | |
parent | 4c30ed47f656d67b619470b9091ebf6661b8a778 (diff) |
pipeline: rkisp1: Fix stream size validation
Unlike RkISP1Path::generateConfiguration(), the validate() function
doesn't take the camera sensor resolution into account but only
considers the absolute minimum and maximum sizes supported by the ISP to
validate the stream size. Fix it by using the same logic as when
generating the configuration.
Instead of passing the sensor resolution to the validate() function,
pass the CameraSensor pointer to prepare for subsequent changes that
will require access to more camera sensor data. While at it, update the
generateConfiguration() function similarly for the same reason.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/pipeline/rkisp1/rkisp1_path.h')
-rw-r--r-- | src/libcamera/pipeline/rkisp1/rkisp1_path.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h index d88effbb..bf4ad18f 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h @@ -23,6 +23,7 @@ namespace libcamera { +class CameraSensor; class MediaDevice; class V4L2Subdevice; struct StreamConfiguration; @@ -39,8 +40,9 @@ public: int setEnabled(bool enable) { return link_->setEnabled(enable); } bool isEnabled() const { return link_->flags() & MEDIA_LNK_FL_ENABLED; } - StreamConfiguration generateConfiguration(const Size &resolution); - CameraConfiguration::Status validate(StreamConfiguration *cfg); + StreamConfiguration generateConfiguration(const CameraSensor *sensor); + CameraConfiguration::Status validate(const CameraSensor *sensor, + StreamConfiguration *cfg); int configure(const StreamConfiguration &config, const V4L2SubdeviceFormat &inputFormat); |