[libcamera-devel] [PATCH v1 4/4] pipeline: raspberrypi: Drop unused code

Naushir Patuck naush at raspberrypi.com
Wed Feb 8 09:51:46 CET 2023


Hi Laurent,

Thank you for these fixups.

On Mon, 6 Feb 2023 at 17:04, Laurent Pinchart via libcamera-devel
<libcamera-devel at lists.libcamera.org> wrote:
>
> Commit 1a614866a29c ("libcamera: camera_sensor: Validate Transform") has
> removed usage of the RPiCameraData::supportsFlips_ but hasn't removed
> the field itself, nor its initialization. Drop those as they're unused.
>
> Fixes: 1a614866a29c ("libcamera: camera_sensor: Validate Transform")
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Naushir Patuck <naush at raspberrypi.com>

> ---
>  .../pipeline/raspberrypi/raspberrypi.cpp      | 21 +++++++------------
>  1 file changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index d752911ddfff..77e860ab0e72 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -187,8 +187,8 @@ class RPiCameraData : public Camera::Private
>  public:
>         RPiCameraData(PipelineHandler *pipe)
>                 : Camera::Private(pipe), state_(State::Stopped),
> -                 supportsFlips_(false), flipsAlterBayerOrder_(false),
> -                 dropFrameCount_(0), buffersAllocated_(false), ispOutputCount_(0)
> +                 flipsAlterBayerOrder_(false), dropFrameCount_(0),
> +                 buffersAllocated_(false), ispOutputCount_(0)
>         {
>         }
>
> @@ -275,11 +275,9 @@ public:
>         std::deque<Request *> requestQueue_;
>
>         /*
> -        * Manage horizontal and vertical flips supported (or not) by the
> -        * sensor. Also store the "native" Bayer order (that is, with no
> -        * transforms applied).
> +        * Store the "native" Bayer order (that is, with no transforms
> +        * applied).
>          */
> -       bool supportsFlips_;
>         bool flipsAlterBayerOrder_;
>         BayerFormat::Order nativeBayerOrder_;
>
> @@ -1424,12 +1422,10 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me
>         data->properties_.set(properties::ScalerCropMaximum, Rectangle{});
>
>         /*
> -        * We cache three things about the sensor in relation to transforms
> -        * (meaning horizontal and vertical flips).
> -        *
> -        * If flips are supported verify if they affect the Bayer ordering
> -        * and what the "native" Bayer order is, when no transforms are
> -        * applied.
> +        * We cache two things about the sensor in relation to transforms
> +        * (meaning horizontal and vertical flips): if they affect the Bayer
> +        * ordering, and what the "native" Bayer order is, when no transforms
> +        * are applied.
>          *
>          * We note that the sensor's cached list of supported formats is
>          * already in the "native" order, with any flips having been undone.
> @@ -1438,7 +1434,6 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me
>         const struct v4l2_query_ext_ctrl *hflipCtrl = sensor->controlInfo(V4L2_CID_HFLIP);
>         if (hflipCtrl) {
>                 /* We assume it will support vflips too... */
> -               data->supportsFlips_ = true;
>                 data->flipsAlterBayerOrder_ = hflipCtrl->flags & V4L2_CTRL_FLAG_MODIFY_LAYOUT;
>         }
>
> --
> Regards,
>
> Laurent Pinchart
>


More information about the libcamera-devel mailing list