[{"id":14803,"web_url":"https://patchwork.libcamera.org/comment/14803/","msgid":"<YBCi20vjuVk5BguB@pendragon.ideasonboard.com>","date":"2021-01-26T23:16:43","subject":"Re: [libcamera-devel] [PATCH v3 0/5] Improve BayerFormat class","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Sebastian,\n\nThank you for the patch.\n\nOn Tue, Jan 26, 2021 at 07:48:49PM +0100, Sebastian Fricke wrote:\n> Improve BayerFormat class\n> \n> This patch series adds unit-tests, the `fromV4L2PixelFormat` static\n> member function and the ==/!= operators to the BayerFormat class.\n\nThis looks good overall. I forgot to mention in the review of individual\ncommits that the subject line should start with \"libcamera: bayer_format: \"\nfor patch 1/5 to 4/5.\n\nThe issues are minor and I can address them when applying the patches. I\nwould however like David's feedback on patch 4/5 before pushing this\nseries.\n\n> ---\n> \n> Changes since version 2:\n> * Improve the error messages of the unit tests by reducing them to a\n>   single-line if possible.\n> * Change the test that makes sure that an invalid BayerFormat doesn't\n>   yield a V4L2PixelFormat to use an empty BayerFormat instead of an\n>   imaginary one.\n> * Add the transpose transformation to the transform method.\n> * Add an extra test that makes sure that a transpose on a format causes\n>   red and blue pixels that are on the antidiagonal to switch their position.\n> * Change the transpose tests to not compare BayerFormat string\n>   representations.\n> * Combine the modifications in the Raspberry Pi pipeline with the first\n>   patch that adds the `fromV4L2PixelFormat` static member function.\n> * Add documentation for the `!=` operator.\n> * Split the removal of the deprecated constructor and mapping table from\n>   the addition of the `fromV4L2PixelFormat` function.\n> * Fix indentation issues.\n> \n> Changes since version 1:\n> * Convert the `fromV4L2PixelFormat` to a static member function, as it doesn't\n>   contain any self use.\n> * Adjust the current user of the old constructor (raspberryPi pipeline) to use\n>   the new function.\n> * Add the ==/!= operators to improve tests and to add helpful helper functions.\n> * Change the logic of `fromV4L2PixelFormat` by replace the search of a matching\n>   bayer format to a v4l2 pixel format with a search for a matching v4l2 pixel\n>   format to a bayer format.\n> * Remove the v4l2ToBayer mapping table as it lost it's last user\n> * Remove 'TEST \\d:' & 'TEST \\d: FAIL:' pattern from comments and messages\n>   within the unit tests.\n> * Convert variable names from snake_case to camelCase.\n> * Add an additional to test to confirm that we cannot get a V4L2PixelFormat\n>   from a BayerFormat not found in the mapping table.\n> * Add tests for the == & != operators\n> * Change the test within the Transform unit tests from a comparision of string\n>   formats to a direct compare of the BayerFormat objects.\n> * Unify the test error messages by enclosing the expected and actual string\n>   representations in ''\n> * Fix checkstyle errors.\n> * Add explaination for why the transpose functionality was ignored\n>   within the unit test.\n> \n> ---\n> \n> Sebastian Fricke (5):\n>   libcamera: Add the fromV4L2PixelFormat function\n>   libcamera: Remove unnecessary constructor\n>   libcamera: Overload ==/!= operators for BayerFormats\n>   libcamera: Add the transpose transformation\n>   test: Add unit tests for the BayerFormat class\n> \n>  include/libcamera/internal/bayer_format.h     |   8 +-\n>  src/libcamera/bayer_format.cpp                |  89 ++++----\n>  .../pipeline/raspberrypi/raspberrypi.cpp      |   4 +-\n>  test/bayer_format.cpp                         | 210 ++++++++++++++++++\n>  test/meson.build                              |   1 +\n>  5 files changed, 260 insertions(+), 52 deletions(-)\n>  create mode 100644 test/bayer_format.cpp","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 6E20FBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Jan 2021 23:17:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 038AA68335;\n\tWed, 27 Jan 2021 00:17:05 +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 3C3DD682D2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jan 2021 00:17:03 +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 A5D9D2C1;\n\tWed, 27 Jan 2021 00:17:02 +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=\"SJPyX7OW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611703022;\n\tbh=+2G5NMp5O6bEQ+ZBIfyjE7ZrzMrFaDNJTT830g7iEsU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SJPyX7OWXQOj9GD9SzO2ovso/exVG4TzZP9xmODSo9E6fueMAi9R/Vp9k1+HO4Mf3\n\taEJdyKIPJvGD6dYjsdtWPeRUTj2Tk85lNMPcGl+efbFHfHsjy56lyreZZ0A8XRjza+\n\tGDiPxlnsYwh+uVPGuYJRFFc3b84RhWqizjjAuDjM=","Date":"Wed, 27 Jan 2021 01:16:43 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Sebastian Fricke <sebastian.fricke@posteo.net>","Message-ID":"<YBCi20vjuVk5BguB@pendragon.ideasonboard.com>","References":"<20210126184854.46156-1-sebastian.fricke@posteo.net>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210126184854.46156-1-sebastian.fricke@posteo.net>","Subject":"Re: [libcamera-devel] [PATCH v3 0/5] Improve BayerFormat class","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>"}}]