[{"id":14424,"web_url":"https://patchwork.libcamera.org/comment/14424/","msgid":"<X+zfZktkO9UCbe8V@pendragon.ideasonboard.com>","date":"2020-12-30T20:13:26","subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera_sensor:\n\tDefault selection targets","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Wed, Dec 30, 2020 at 07:01:17PM +0100, Jacopo Mondi wrote:\n> Support for the V4L2 selection API is optional in the CameraSensor\n> class. Currently the properties registred by using values read\n\ns/registred/registered/\n\n> through that API are defaulted in several places (the Android camera HAL\n> or the CameraSensor class).\n> \n> In future support for the selection API will be made mandatory, but to\n\ns/In future/In the future/\n\n> give time to sensor drivers in all test platforms to be updated, provide\n> a default for each of those properties, simplifying the creation of\n> the camera sensor properties list and of CameraSensorInfo.\n> \n> Provide a default size of [2592x2944] for the pixel array size and a\n> default rectangle [16, 12, 2560, 1920] for the active area and analog\n> crop rectangles.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  include/libcamera/internal/camera_sensor.h |  3 +\n>  src/libcamera/camera_sensor.cpp            | 71 +++++++++-------------\n>  2 files changed, 31 insertions(+), 43 deletions(-)\n> \n> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> index aee10aa6e3c7..c2d620f05b65 100644\n> --- a/include/libcamera/internal/camera_sensor.h\n> +++ b/include/libcamera/internal/camera_sensor.h\n> @@ -84,6 +84,9 @@ private:\n>  \tstd::vector<unsigned int> mbusCodes_;\n>  \tstd::vector<Size> sizes_;\n>  \n> +\tSize pixelArraySize_;\n> +\tRectangle activeAreaSize_;\n\nIt's not a size but a rectangle, I'd call this activeArea_.\n\n> +\n>  \tControlList properties_;\n>  };\n>  \n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index a1f1256bd6f4..2ce19a40b448 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -31,6 +31,9 @@ namespace libcamera {\n>  \n>  LOG_DEFINE_CATEGORY(CameraSensor)\n>  \n> +static constexpr Size defaultPixelArraySize = { 2592, 1944 };\n> +static constexpr Rectangle defaultActiveAreaSize = { 16, 12, 2560, 1920 };\n> +\n>  /**\n>   * \\struct CameraSensorInfo\n>   * \\brief Report the image sensor characteristics\n> @@ -266,25 +269,35 @@ int CameraSensor::validateSensorDriver()\n>  \t * but some properties and features, like constructing a\n>  \t * CameraSensorInfo for the IPA module, won't be supported.\n>  \t */\n> +\n>  \tRectangle rect;\n>  \tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_BOUNDS, &rect);\n>  \tif (ret) {\n>  \t\tLOG(CameraSensor, Info)\n> -\t\t\t<< \"Failed to retrieve the readable pixel area size\";\n> +\t\t\t<< \"The PixelArraySize property has been defaulted to: \"\n\ns/to:/to/ (and same below). But do we actually need this change ? We\nplan to revert it soon, isn't it better to keep talking about a failure\n?\n\n> +\t\t\t<< defaultPixelArraySize.toString();\n> +\t\trect.width = defaultPixelArraySize.width;\n> +\t\trect.height = defaultPixelArraySize.height;\n>  \t\terr = -EINVAL;\n>  \t}\n> +\tpixelArraySize_.width = rect.width;\n> +\tpixelArraySize_.height = rect.height;\n>  \n>  \tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_DEFAULT, &rect);\n\ns/rect/activeAreaSize_/\n\n>  \tif (ret) {\n>  \t\tLOG(CameraSensor, Info)\n> -\t\t\t<< \"Failed to retrieve the active pixel area size\";\n> +\t\t\t<< \"The PixelArraySize property has been defaulted to: \"\n> +\t\t\t<< defaultActiveAreaSize.toString();\n> +\t\trect = defaultActiveAreaSize;\n\n\t\tactiveAreaSize_ = defaultActiveAreaSize;\n\n>  \t\terr = -EINVAL;\n>  \t}\n> +\tactiveAreaSize_ = rect;\n\nAnd drop this line.\n\n>  \n>  \tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP, &rect);\n>  \tif (ret) {\n>  \t\tLOG(CameraSensor, Info)\n> -\t\t\t<< \"Failed to retreive the sensor crop rectangle\";\n\nIf this has been introduced in a previous patch in the series,\ns/retreive/retrieve/.\n\n> +\t\t\t<< \"The analog crop rectangle has been defaulted to: \"\n> +\t\t\t<< defaultActiveAreaSize.toString();\n\nThis looks messy as there's no handling of the default here, only down\nbelow.\n\n>  \t\terr = -EINVAL;\n>  \t}\n>  \n> @@ -378,30 +391,8 @@ int CameraSensor::initProperties()\n>  \t}\n>  \tproperties_.set(properties::Rotation, propertyValue);\n>  \n> -\tRectangle bounds;\n> -\tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_BOUNDS, &bounds);\n> -\tif (!ret)\n> -\t\tproperties_.set(properties::PixelArraySize, bounds.size());\n> -\telse\n> -\t\tLOG(CameraSensor, Debug)\n> -\t\t\t<< \"PixelArraySize property not registered\";\n> -\n> -\tRectangle crop;\n> -\tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_DEFAULT, &crop);\n> -\tif (!ret) {\n> -\t\t/*\n> -\t\t * V4L2_SEL_TGT_CROP_DEFAULT and V4L2_SEL_TGT_CROP_BOUNDS are\n> -\t\t * defined relatively to the sensor full pixel array size,\n> -\t\t * while properties::PixelArrayActiveAreas is defined relatively\n> -\t\t * to properties::PixelArraySize. Adjust it.\n> -\t\t */\n> -\t\tcrop.x -= bounds.x;\n> -\t\tcrop.y -= bounds.y;\n> -\t\tproperties_.set(properties::PixelArrayActiveAreas, { crop });\n> -\t} else {\n> -\t\tLOG(CameraSensor, Debug)\n> -\t\t\t<< \"PixelArrayActiveAreas property not registered\";\n> -\t}\n> +\tproperties_.set(properties::PixelArraySize, pixelArraySize_);\n> +\tproperties_.set(properties::PixelArrayActiveAreas, { activeAreaSize_ });\n\nThis is nice. Caching those two values is in my opinion the main feature\nof this patch, it's worth mentioning it in the commit message.\n\n>  \n>  \t/* Color filter array pattern, register only for RAW sensors. */\n>  \tfor (const auto &format : formats_) {\n> @@ -657,21 +648,15 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const\n>  {\n>  \tinfo->model = model();\n>  \n> -\t/* Get the active area size. */\n> -\tRectangle rect;\n> -\tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_DEFAULT, &rect);\n> -\tif (ret) {\n> -\t\tLOG(CameraSensor, Error) << \"Failed to get the active area\";\n> -\t\treturn ret;\n> -\t}\n> -\tinfo->activeAreaSize = { rect.width, rect.height };\n> +\t/*\n> +\t * The active area size is a static property, while the crop\n> +\t * rectangle needs to be re-read as it changes per-mode.\n\ns/changes per-mode/depends on the sensor configuration/\n\nI'd like to avoid talking about sensor modes everywhere, a sensor mode\nis an artificial limitation that we have to live with but that we should\nstill push against as much as possible. It shouldn't become a core\nconcept in the libcamera vocabulary.\n\n> +\t */\n> +\tinfo->activeAreaSize = { activeAreaSize_.width, activeAreaSize_.height };\n>  \n> -\t/* It's mandatory for the subdevice to report its crop rectangle. */\n> -\tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP, &info->analogCrop);\n> -\tif (ret) {\n> -\t\tLOG(CameraSensor, Error) << \"Failed to get the crop rectangle\";\n> -\t\treturn ret;\n> -\t}\n> +\tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP, &info->analogCrop);\n> +\tif (ret)\n> +\t\tinfo->analogCrop = defaultActiveAreaSize;\n\nAs this already causes an error, and we want to turn it into a fatal\nerror soon, how about dropping this change and the corresponding one in\nCameraSensor::validateSensorDriver() ?\n\n>  \n>  \t/*\n>  \t * CameraSensorInfo::analogCrop::x and CameraSensorInfo::analogCrop::y\n> @@ -680,8 +665,8 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const\n>  \t *\n>  \t * Compensate it by subtracting the active areas offset.\n\nWhile at it you could write s/areas/area/ (s/areas/area's/ ?).\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \t */\n> -\tinfo->analogCrop.x -= rect.x;\n> -\tinfo->analogCrop.y -= rect.y;\n> +\tinfo->analogCrop.x -= activeAreaSize_.x;\n> +\tinfo->analogCrop.y -= activeAreaSize_.y;\n>  \n>  \t/* The bit depth and image size depend on the currently applied format. */\n>  \tV4L2SubdeviceFormat format{};","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7007EC0F1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Dec 2020 20:13:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 02267615B4;\n\tWed, 30 Dec 2020 21:13:39 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4A9A260526\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Dec 2020 21:13:38 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AE66C2A3;\n\tWed, 30 Dec 2020 21:13:37 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"p/UAhqgt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1609359217;\n\tbh=eJOgTVr6W/MnD48IIv6KAHjYVwgmeYscax378d0LzTg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=p/UAhqgt14J6XFcTim+/sXHQQfUuiEzthP4SYtOj4nl+eyXvkSyMdj2GndJNbAkiT\n\tDYEWak0fHSYsa34yw4ZnTxlLpiF3Un62EqBe9/zvISnTmfQ9UeqmMvOsPWeS6KvIvP\n\tr6Z7tClCmYemZIyfoGeaCWrJunc7bXl8cjNxE9g4=","Date":"Wed, 30 Dec 2020 22:13:26 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<X+zfZktkO9UCbe8V@pendragon.ideasonboard.com>","References":"<20201230180120.78407-1-jacopo@jmondi.org>\n\t<20201230180120.78407-4-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201230180120.78407-4-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera_sensor:\n\tDefault selection targets","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14428,"web_url":"https://patchwork.libcamera.org/comment/14428/","msgid":"<20201230224046.54syudgojmp4o22i@uno.localdomain>","date":"2020-12-30T22:40:46","subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera_sensor:\n\tDefault selection targets","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Wed, Dec 30, 2020 at 10:13:26PM +0200, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Wed, Dec 30, 2020 at 07:01:17PM +0100, Jacopo Mondi wrote:\n> > Support for the V4L2 selection API is optional in the CameraSensor\n> > class. Currently the properties registred by using values read\n>\n> s/registred/registered/\n>\n> > through that API are defaulted in several places (the Android camera HAL\n> > or the CameraSensor class).\n> >\n> > In future support for the selection API will be made mandatory, but to\n>\n> s/In future/In the future/\n>\n> > give time to sensor drivers in all test platforms to be updated, provide\n> > a default for each of those properties, simplifying the creation of\n> > the camera sensor properties list and of CameraSensorInfo.\n> >\n> > Provide a default size of [2592x2944] for the pixel array size and a\n> > default rectangle [16, 12, 2560, 1920] for the active area and analog\n> > crop rectangles.\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  include/libcamera/internal/camera_sensor.h |  3 +\n> >  src/libcamera/camera_sensor.cpp            | 71 +++++++++-------------\n> >  2 files changed, 31 insertions(+), 43 deletions(-)\n> >\n> > diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> > index aee10aa6e3c7..c2d620f05b65 100644\n> > --- a/include/libcamera/internal/camera_sensor.h\n> > +++ b/include/libcamera/internal/camera_sensor.h\n> > @@ -84,6 +84,9 @@ private:\n> >  \tstd::vector<unsigned int> mbusCodes_;\n> >  \tstd::vector<Size> sizes_;\n> >\n> > +\tSize pixelArraySize_;\n> > +\tRectangle activeAreaSize_;\n>\n> It's not a size but a rectangle, I'd call this activeArea_.\n>\n> > +\n> >  \tControlList properties_;\n> >  };\n> >\n> > diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> > index a1f1256bd6f4..2ce19a40b448 100644\n> > --- a/src/libcamera/camera_sensor.cpp\n> > +++ b/src/libcamera/camera_sensor.cpp\n> > @@ -31,6 +31,9 @@ namespace libcamera {\n> >\n> >  LOG_DEFINE_CATEGORY(CameraSensor)\n> >\n> > +static constexpr Size defaultPixelArraySize = { 2592, 1944 };\n> > +static constexpr Rectangle defaultActiveAreaSize = { 16, 12, 2560, 1920 };\n> > +\n> >  /**\n> >   * \\struct CameraSensorInfo\n> >   * \\brief Report the image sensor characteristics\n> > @@ -266,25 +269,35 @@ int CameraSensor::validateSensorDriver()\n> >  \t * but some properties and features, like constructing a\n> >  \t * CameraSensorInfo for the IPA module, won't be supported.\n> >  \t */\n> > +\n> >  \tRectangle rect;\n> >  \tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_BOUNDS, &rect);\n> >  \tif (ret) {\n> >  \t\tLOG(CameraSensor, Info)\n> > -\t\t\t<< \"Failed to retrieve the readable pixel area size\";\n> > +\t\t\t<< \"The PixelArraySize property has been defaulted to: \"\n>\n> s/to:/to/ (and same below). But do we actually need this change ? We\n> plan to revert it soon, isn't it better to keep talking about a failure\n> ?\n\nI would rather tell what we default to than repeating the \"Failed..\"\nas we get the V4L2Subdevice error message already\n\n>\n> > +\t\t\t<< defaultPixelArraySize.toString();\n> > +\t\trect.width = defaultPixelArraySize.width;\n> > +\t\trect.height = defaultPixelArraySize.height;\n> >  \t\terr = -EINVAL;\n> >  \t}\n> > +\tpixelArraySize_.width = rect.width;\n> > +\tpixelArraySize_.height = rect.height;\n> >\n> >  \tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_DEFAULT, &rect);\n>\n> s/rect/activeAreaSize_/\n>\n> >  \tif (ret) {\n> >  \t\tLOG(CameraSensor, Info)\n> > -\t\t\t<< \"Failed to retrieve the active pixel area size\";\n> > +\t\t\t<< \"The PixelArraySize property has been defaulted to: \"\n> > +\t\t\t<< defaultActiveAreaSize.toString();\n> > +\t\trect = defaultActiveAreaSize;\n>\n> \t\tactiveAreaSize_ = defaultActiveAreaSize;\n>\n> >  \t\terr = -EINVAL;\n> >  \t}\n> > +\tactiveAreaSize_ = rect;\n>\n> And drop this line.\n>\n> >\n> >  \tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP, &rect);\n> >  \tif (ret) {\n> >  \t\tLOG(CameraSensor, Info)\n> > -\t\t\t<< \"Failed to retreive the sensor crop rectangle\";\n>\n> If this has been introduced in a previous patch in the series,\n> s/retreive/retrieve/.\n>\n> > +\t\t\t<< \"The analog crop rectangle has been defaulted to: \"\n> > +\t\t\t<< defaultActiveAreaSize.toString();\n>\n> This looks messy as there's no handling of the default here, only down\n> below.\n>\n\nI'll drop the default, but I will have to add it to the\nCameraSensorInfo creation, as I would like to tell the crop\nrectangle has been defaulted.\n\n> >  \t\terr = -EINVAL;\n> >  \t}\n> >\n> > @@ -378,30 +391,8 @@ int CameraSensor::initProperties()\n> >  \t}\n> >  \tproperties_.set(properties::Rotation, propertyValue);\n> >\n> > -\tRectangle bounds;\n> > -\tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_BOUNDS, &bounds);\n> > -\tif (!ret)\n> > -\t\tproperties_.set(properties::PixelArraySize, bounds.size());\n> > -\telse\n> > -\t\tLOG(CameraSensor, Debug)\n> > -\t\t\t<< \"PixelArraySize property not registered\";\n> > -\n> > -\tRectangle crop;\n> > -\tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_DEFAULT, &crop);\n> > -\tif (!ret) {\n> > -\t\t/*\n> > -\t\t * V4L2_SEL_TGT_CROP_DEFAULT and V4L2_SEL_TGT_CROP_BOUNDS are\n> > -\t\t * defined relatively to the sensor full pixel array size,\n> > -\t\t * while properties::PixelArrayActiveAreas is defined relatively\n> > -\t\t * to properties::PixelArraySize. Adjust it.\n> > -\t\t */\n> > -\t\tcrop.x -= bounds.x;\n> > -\t\tcrop.y -= bounds.y;\n> > -\t\tproperties_.set(properties::PixelArrayActiveAreas, { crop });\n> > -\t} else {\n> > -\t\tLOG(CameraSensor, Debug)\n> > -\t\t\t<< \"PixelArrayActiveAreas property not registered\";\n> > -\t}\n> > +\tproperties_.set(properties::PixelArraySize, pixelArraySize_);\n> > +\tproperties_.set(properties::PixelArrayActiveAreas, { activeAreaSize_ });\n>\n> This is nice. Caching those two values is in my opinion the main feature\n> of this patch, it's worth mentioning it in the commit message.\n>\n> >\n> >  \t/* Color filter array pattern, register only for RAW sensors. */\n> >  \tfor (const auto &format : formats_) {\n> > @@ -657,21 +648,15 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const\n> >  {\n> >  \tinfo->model = model();\n> >\n> > -\t/* Get the active area size. */\n> > -\tRectangle rect;\n> > -\tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_DEFAULT, &rect);\n> > -\tif (ret) {\n> > -\t\tLOG(CameraSensor, Error) << \"Failed to get the active area\";\n> > -\t\treturn ret;\n> > -\t}\n> > -\tinfo->activeAreaSize = { rect.width, rect.height };\n> > +\t/*\n> > +\t * The active area size is a static property, while the crop\n> > +\t * rectangle needs to be re-read as it changes per-mode.\n>\n> s/changes per-mode/depends on the sensor configuration/\n>\n> I'd like to avoid talking about sensor modes everywhere, a sensor mode\n> is an artificial limitation that we have to live with but that we should\n> still push against as much as possible. It shouldn't become a core\n> concept in the libcamera vocabulary.\n>\n> > +\t */\n> > +\tinfo->activeAreaSize = { activeAreaSize_.width, activeAreaSize_.height };\n> >\n> > -\t/* It's mandatory for the subdevice to report its crop rectangle. */\n> > -\tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP, &info->analogCrop);\n> > -\tif (ret) {\n> > -\t\tLOG(CameraSensor, Error) << \"Failed to get the crop rectangle\";\n> > -\t\treturn ret;\n> > -\t}\n> > +\tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP, &info->analogCrop);\n> > +\tif (ret)\n> > +\t\tinfo->analogCrop = defaultActiveAreaSize;\n>\n> As this already causes an error, and we want to turn it into a fatal\n> error soon, how about dropping this change and the corresponding one in\n> CameraSensor::validateSensorDriver() ?\n>\n> >\n> >  \t/*\n> >  \t * CameraSensorInfo::analogCrop::x and CameraSensorInfo::analogCrop::y\n> > @@ -680,8 +665,8 @@ int CameraSensor::sensorInfo(CameraSensorInfo *info) const\n> >  \t *\n> >  \t * Compensate it by subtracting the active areas offset.\n>\n> While at it you could write s/areas/area/ (s/areas/area's/ ?).\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> >  \t */\n> > -\tinfo->analogCrop.x -= rect.x;\n> > -\tinfo->analogCrop.y -= rect.y;\n> > +\tinfo->analogCrop.x -= activeAreaSize_.x;\n> > +\tinfo->analogCrop.y -= activeAreaSize_.y;\n> >\n> >  \t/* The bit depth and image size depend on the currently applied format. */\n> >  \tV4L2SubdeviceFormat format{};\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AD7BCC0F1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Dec 2020 22:40:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4595B60526;\n\tWed, 30 Dec 2020 23:40:36 +0100 (CET)","from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3B81460320\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Dec 2020 23:40:34 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id A93FF100003;\n\tWed, 30 Dec 2020 22:40:32 +0000 (UTC)"],"Date":"Wed, 30 Dec 2020 23:40:46 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20201230224046.54syudgojmp4o22i@uno.localdomain>","References":"<20201230180120.78407-1-jacopo@jmondi.org>\n\t<20201230180120.78407-4-jacopo@jmondi.org>\n\t<X+zfZktkO9UCbe8V@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<X+zfZktkO9UCbe8V@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 3/6] libcamera: camera_sensor:\n\tDefault selection targets","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]