Patch Detail
Show a patch.
GET /api/patches/3519/?format=api
{ "id": 3519, "url": "https://patchwork.libcamera.org/api/patches/3519/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3519/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200424215304.558317-2-jacopo@jmondi.org>", "date": "2020-04-24T21:52:52", "name": "[libcamera-devel,v3,01/13] libcamera: geometry: Rename Rectangle fields", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "54677ee13baa96640d8c3bf4c820b29d45c6d7fc", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3519/mbox/", "series": [ { "id": 822, "url": "https://patchwork.libcamera.org/api/series/822/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=822", "date": "2020-04-24T21:52:51", "name": "libcamera: Add CameraSensorInfo", "version": 3, "mbox": "https://patchwork.libcamera.org/series/822/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3519/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3519/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B9AD5603FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Apr 2020 23:50:02 +0200 (CEST)", "from uno.homenet.telecomitalia.it\n\t(host240-55-dynamic.3-87-r.retail.telecomitalia.it [87.3.55.240])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id EB12460002;\n\tFri, 24 Apr 2020 21:50:01 +0000 (UTC)" ], "X-Originating-IP": "87.3.55.240", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 24 Apr 2020 23:52:52 +0200", "Message-Id": "<20200424215304.558317-2-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.26.1", "In-Reply-To": "<20200424215304.558317-1-jacopo@jmondi.org>", "References": "<20200424215304.558317-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 01/13] libcamera: geometry: Rename\n\tRectangle fields", "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>", "X-List-Received-Date": "Fri, 24 Apr 2020 21:50:02 -0000" }, "content": "The Rectangle class members that represents the rectangle horizontal and\nvertical sizes are named 'w' and 'h', in contrast with the Size and\nSizeRange classes which use 'width' and 'height', resulting in having to\nlook at class definition every time to know which names to use.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/geometry.h | 4 ++--\n src/libcamera/geometry.cpp | 8 ++++----\n src/libcamera/pipeline/ipu3/ipu3.cpp | 4 ++--\n src/libcamera/v4l2_subdevice.cpp | 8 ++++----\n src/libcamera/v4l2_videodevice.cpp | 8 ++++----\n 5 files changed, 16 insertions(+), 16 deletions(-)", "diff": "diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h\nindex 7f1b29fe8c19..2d364891858c 100644\n--- a/include/libcamera/geometry.h\n+++ b/include/libcamera/geometry.h\n@@ -15,8 +15,8 @@ namespace libcamera {\n struct Rectangle {\n \tint x;\n \tint y;\n-\tunsigned int w;\n-\tunsigned int h;\n+\tunsigned int width;\n+\tunsigned int height;\n \n \tconst std::string toString() const;\n };\ndiff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp\nindex 13f642be526f..fd78cf2c0ab7 100644\n--- a/src/libcamera/geometry.cpp\n+++ b/src/libcamera/geometry.cpp\n@@ -40,12 +40,12 @@ namespace libcamera {\n */\n \n /**\n- * \\var Rectangle::w\n+ * \\var Rectangle::width\n * \\brief The distance between the left and right sides\n */\n \n /**\n- * \\var Rectangle::h\n+ * \\var Rectangle::height\n * \\brief The distance between the top and bottom sides\n */\n \n@@ -57,7 +57,7 @@ const std::string Rectangle::toString() const\n {\n \tstd::stringstream ss;\n \n-\tss << \"(\" << x << \"x\" << y << \")/\" << w << \"x\" << h;\n+\tss << \"(\" << x << \"x\" << y << \")/\" << width << \"x\" << height;\n \n \treturn ss.str();\n }\n@@ -69,7 +69,7 @@ const std::string Rectangle::toString() const\n bool operator==(const Rectangle &lhs, const Rectangle &rhs)\n {\n \treturn lhs.x == rhs.x && lhs.y == rhs.y &&\n-\t lhs.w == rhs.w && lhs.h == rhs.h;\n+\t lhs.width == rhs.width && lhs.height == rhs.height;\n }\n \n /**\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 36ac571a0b06..b45900159d06 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1132,8 +1132,8 @@ int ImgUDevice::configureInput(const Size &size,\n \tRectangle rect = {\n \t\t.x = 0,\n \t\t.y = 0,\n-\t\t.w = inputFormat->size.width,\n-\t\t.h = inputFormat->size.height,\n+\t\t.width = inputFormat->size.width,\n+\t\t.height = inputFormat->size.height,\n \t};\n \tret = imgu_->setCrop(PAD_INPUT, &rect);\n \tif (ret)\ndiff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex c28e591ba51a..5a479a96b795 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -355,8 +355,8 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,\n \n \tsel.r.left = rect->x;\n \tsel.r.top = rect->y;\n-\tsel.r.width = rect->w;\n-\tsel.r.height = rect->h;\n+\tsel.r.width = rect->width;\n+\tsel.r.height = rect->height;\n \n \tint ret = ioctl(VIDIOC_SUBDEV_S_SELECTION, &sel);\n \tif (ret < 0) {\n@@ -368,8 +368,8 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,\n \n \trect->x = sel.r.left;\n \trect->y = sel.r.top;\n-\trect->w = sel.r.width;\n-\trect->h = sel.r.height;\n+\trect->width = sel.r.width;\n+\trect->height = sel.r.height;\n \n \treturn 0;\n }\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex a959cfe65c43..beeec3ebe869 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1121,8 +1121,8 @@ int V4L2VideoDevice::setSelection(unsigned int target, Rectangle *rect)\n \n \tsel.r.left = rect->x;\n \tsel.r.top = rect->y;\n-\tsel.r.width = rect->w;\n-\tsel.r.height = rect->h;\n+\tsel.r.width = rect->width;\n+\tsel.r.height = rect->height;\n \n \tint ret = ioctl(VIDIOC_S_SELECTION, &sel);\n \tif (ret < 0) {\n@@ -1133,8 +1133,8 @@ int V4L2VideoDevice::setSelection(unsigned int target, Rectangle *rect)\n \n \trect->x = sel.r.left;\n \trect->y = sel.r.top;\n-\trect->w = sel.r.width;\n-\trect->h = sel.r.height;\n+\trect->width = sel.r.width;\n+\trect->height = sel.r.height;\n \n \treturn 0;\n }\n", "prefixes": [ "libcamera-devel", "v3", "01/13" ] }