[{"id":24188,"web_url":"https://patchwork.libcamera.org/comment/24188/","msgid":"<YuE6LZPrWT7OONPx@pendragon.ideasonboard.com>","date":"2022-07-27T13:14:21","subject":"Re: [libcamera-devel] [PATCH v3 1/8] ipa: raspberrypi: Code\n\trefactoring to match style guidelines","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Wed, Jul 27, 2022 at 09:55:17AM +0100, Naushir Patuck wrote:\n> Refactor all the source files in src/ipa/raspberrypi/ to match the recommended\n> formatting guidelines for the libcamera project. The vast majority of changes\n> in this commit comprise of switching from snake_case to CamelCase, and starting\n> class member functions with a lower case character.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/ipa/raspberrypi/cam_helper.cpp            |  88 +--\n>  src/ipa/raspberrypi/cam_helper.hpp            |  40 +-\n>  src/ipa/raspberrypi/cam_helper_imx219.cpp     |  34 +-\n>  src/ipa/raspberrypi/cam_helper_imx290.cpp     |  32 +-\n>  src/ipa/raspberrypi/cam_helper_imx296.cpp     |  24 +-\n>  src/ipa/raspberrypi/cam_helper_imx477.cpp     |  72 +-\n>  src/ipa/raspberrypi/cam_helper_imx519.cpp     |  70 +-\n>  src/ipa/raspberrypi/cam_helper_ov5647.cpp     |  44 +-\n>  src/ipa/raspberrypi/cam_helper_ov9281.cpp     |  28 +-\n>  .../raspberrypi/controller/agc_algorithm.hpp  |  19 +-\n>  src/ipa/raspberrypi/controller/agc_status.h   |  24 +-\n>  src/ipa/raspberrypi/controller/algorithm.cpp  |  20 +-\n>  src/ipa/raspberrypi/controller/algorithm.hpp  |  26 +-\n>  .../raspberrypi/controller/awb_algorithm.hpp  |   6 +-\n>  src/ipa/raspberrypi/controller/awb_status.h   |   8 +-\n>  .../controller/black_level_status.h           |   6 +-\n>  src/ipa/raspberrypi/controller/camera_mode.h  |  16 +-\n>  .../raspberrypi/controller/ccm_algorithm.hpp  |   2 +-\n>  .../controller/contrast_algorithm.hpp         |   4 +-\n>  src/ipa/raspberrypi/controller/controller.cpp |  74 +-\n>  src/ipa/raspberrypi/controller/controller.hpp |  22 +-\n>  .../controller/denoise_algorithm.hpp          |   2 +-\n>  .../raspberrypi/controller/denoise_status.h   |   4 +-\n>  .../raspberrypi/controller/device_status.cpp  |  18 +-\n>  .../raspberrypi/controller/device_status.h    |  16 +-\n>  src/ipa/raspberrypi/controller/focus_status.h |   2 +-\n>  src/ipa/raspberrypi/controller/histogram.cpp  |  34 +-\n>  src/ipa/raspberrypi/controller/histogram.hpp  |  10 +-\n>  src/ipa/raspberrypi/controller/metadata.hpp   |  16 +-\n>  src/ipa/raspberrypi/controller/noise_status.h |   4 +-\n>  src/ipa/raspberrypi/controller/pwl.cpp        | 130 ++--\n>  src/ipa/raspberrypi/controller/pwl.hpp        |  48 +-\n>  src/ipa/raspberrypi/controller/rpi/agc.cpp    | 732 +++++++++---------\n>  src/ipa/raspberrypi/controller/rpi/agc.hpp    | 130 ++--\n>  src/ipa/raspberrypi/controller/rpi/alsc.cpp   | 641 ++++++++-------\n>  src/ipa/raspberrypi/controller/rpi/alsc.hpp   |  86 +-\n>  src/ipa/raspberrypi/controller/rpi/awb.cpp    | 564 +++++++-------\n>  src/ipa/raspberrypi/controller/rpi/awb.hpp    | 110 +--\n>  .../controller/rpi/black_level.cpp            |  34 +-\n>  .../controller/rpi/black_level.hpp            |  12 +-\n>  src/ipa/raspberrypi/controller/rpi/ccm.cpp    |  84 +-\n>  src/ipa/raspberrypi/controller/rpi/ccm.hpp    |  12 +-\n>  .../raspberrypi/controller/rpi/contrast.cpp   | 118 ++-\n>  .../raspberrypi/controller/rpi/contrast.hpp   |  30 +-\n>  src/ipa/raspberrypi/controller/rpi/dpc.cpp    |  18 +-\n>  src/ipa/raspberrypi/controller/rpi/dpc.hpp    |   6 +-\n>  src/ipa/raspberrypi/controller/rpi/focus.cpp  |  14 +-\n>  src/ipa/raspberrypi/controller/rpi/focus.hpp  |   4 +-\n>  src/ipa/raspberrypi/controller/rpi/geq.cpp    |  48 +-\n>  src/ipa/raspberrypi/controller/rpi/geq.hpp    |   6 +-\n>  src/ipa/raspberrypi/controller/rpi/lux.cpp    |  70 +-\n>  src/ipa/raspberrypi/controller/rpi/lux.hpp    |  22 +-\n>  src/ipa/raspberrypi/controller/rpi/noise.cpp  |  38 +-\n>  src/ipa/raspberrypi/controller/rpi/noise.hpp  |  14 +-\n>  src/ipa/raspberrypi/controller/rpi/sdn.cpp    |  36 +-\n>  src/ipa/raspberrypi/controller/rpi/sdn.hpp    |  10 +-\n>  .../raspberrypi/controller/rpi/sharpen.cpp    |  42 +-\n>  .../raspberrypi/controller/rpi/sharpen.hpp    |  14 +-\n>  .../controller/sharpen_algorithm.hpp          |   2 +-\n>  .../raspberrypi/controller/sharpen_status.h   |   2 +-\n>  src/ipa/raspberrypi/md_parser.hpp             |  44 +-\n>  src/ipa/raspberrypi/md_parser_smia.cpp        | 108 +--\n>  src/ipa/raspberrypi/raspberrypi.cpp           | 272 +++----\n>  63 files changed, 2099 insertions(+), 2167 deletions(-)\n\n[snip]\n\n> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> index f6a9cb0a2cd8..408ff9cf296d 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n\n[snip]\n\n> -static double compute_initial_Y(bcm2835_isp_stats *stats, AwbStatus const &awb,\n> -\t\t\t\tdouble weights[], double gain)\n> +static double computeInitialY(bcm2835_isp_stats *stats, AwbStatus const &awb,\n> +\t\t\t      double weights[], double gain)\n>  {\n>  \tbcm2835_isp_stats_region *regions = stats->agc_stats;\n>  \t// Note how the calculation below means that equal weights give you\n>  \t// \"average\" metering (i.e. all pixels equally important).\n> -\tdouble R_sum = 0, G_sum = 0, B_sum = 0, pixel_sum = 0;\n> +\tdouble rSum = 0, gSum = 0, bSum = 0, pixelSum = 0;\n>  \tfor (int i = 0; i < AGC_STATS_SIZE; i++) {\n>  \t\tdouble counted = regions[i].counted;\n> -\t\tdouble r_sum = std::min(regions[i].r_sum * gain, ((1 << PIPELINE_BITS) - 1) * counted);\n> -\t\tdouble g_sum = std::min(regions[i].g_sum * gain, ((1 << PIPELINE_BITS) - 1) * counted);\n> -\t\tdouble b_sum = std::min(regions[i].b_sum * gain, ((1 << PIPELINE_BITS) - 1) * counted);\n> -\t\tR_sum += r_sum * weights[i];\n> -\t\tG_sum += g_sum * weights[i];\n> -\t\tB_sum += b_sum * weights[i];\n> -\t\tpixel_sum += counted * weights[i];\n> +\t\tdouble rAcc = std::min(regions[i].r_sum * gain, ((1 << PIPELINE_BITS) - 1) * counted);\n> +\t\tdouble gAcc = std::min(regions[i].g_sum * gain, ((1 << PIPELINE_BITS) - 1) * counted);\n> +\t\tdouble bAcc = std::min(regions[i].b_sum * gain, ((1 << PIPELINE_BITS) - 1) * counted);\n> +\t\trSum += rAcc * weights[i];\n> +\t\tgSum += gAcc * weights[i];\n> +\t\tbSum += bAcc * weights[i];\n> +\t\tpixelSum += counted * weights[i];\n>  \t}\n> -\tif (pixel_sum == 0.0) {\n> -\t\tLOG(RPiAgc, Warning) << \"compute_initial_Y: pixel_sum is zero\";\n> +\tif (pixelSum == 0.0) {\n> +\t\tLOG(RPiAgc, Warning) << \"computeInitialY: pixel_sum is zero\";\n\ns/pixel_sum/pixelSum/\n\n>  \t\treturn 0;\n>  \t}\n> -\tdouble Y_sum = R_sum * awb.gain_r * .299 +\n> -\t\t       G_sum * awb.gain_g * .587 +\n> -\t\t       B_sum * awb.gain_b * .114;\n> -\treturn Y_sum / pixel_sum / (1 << PIPELINE_BITS);\n> +\tdouble ySum = rSum * awb.gainR * .299 +\n> +\t\t      gSum * awb.gainG * .587 +\n> +\t\t      bSum * awb.gainB * .114;\n> +\treturn ySum / pixelSum / (1 << PIPELINE_BITS);\n>  }\n\n[snip]\n\n> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> index d4c934473832..a305237f31fb 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n\n[snip]\n\n> -double Awb::computeDelta2Sum(double gain_r, double gain_b)\n> +double Awb::computeDelta2Sum(double gainR, double gainB)\n>  {\n>  \t// Compute the sum of the squared colour error (non-greyness) as it\n>  \t// appears in the log likelihood equation.\n> -\tdouble delta2_sum = 0;\n> +\tdouble delta2Sum = 0;\n>  \tfor (auto &z : zones_) {\n> -\t\tdouble delta_r = gain_r * z.R - 1 - config_.whitepoint_r;\n> -\t\tdouble delta_b = gain_b * z.B - 1 - config_.whitepoint_b;\n> -\t\tdouble delta2 = delta_r * delta_r + delta_b * delta_b;\n> +\t\tdouble deltaR = gainR * z.R - 1 - config_.whitepointR;\n> +\t\tdouble deltaB = gainB * z.B - 1 - config_.whitepointB;\n> +\t\tdouble delta2 = deltaR * deltaR + deltaB * deltaB;\n>  \t\t//LOG(RPiAwb, Debug) << \"delta_r \" << delta_r << \" delta_b \" << delta_b << \" delta2 \" << delta2;\n\nThe variables should be updated here too.\n\n> -\t\tdelta2 = std::min(delta2, config_.delta_limit);\n> -\t\tdelta2_sum += delta2;\n> +\t\tdelta2 = std::min(delta2, config_.deltaLimit);\n> +\t\tdelta2Sum += delta2;\n>  \t}\n> -\treturn delta2_sum;\n> +\treturn delta2Sum;\n>  }\n\n[snip]\n\n> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> index ac3dca6f42fc..91251d6be2da 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n\n[snip]\n\n> @@ -141,22 +141,22 @@ private:\n>  \tStatisticsPtr statistics_;\n>  \tAwbMode *mode_;\n>  \tdouble lux_;\n> -\tAwbStatus async_results_;\n> +\tAwbStatus asyncResults_;\n>  \tvoid doAwb();\n>  \tvoid awbBayes();\n>  \tvoid awbGrey();\n>  \tvoid prepareStats();\n> -\tdouble computeDelta2Sum(double gain_r, double gain_b);\n> +\tdouble computeDelta2Sum(double gain_r, double gainB);\n\ns/gain_r/gainR/\n\n>  \tPwl interpolatePrior();\n>  \tdouble coarseSearch(Pwl const &prior);\n>  \tvoid fineSearch(double &t, double &r, double &b, Pwl const &prior);\n>  \tstd::vector<RGB> zones_;\n>  \tstd::vector<Pwl::Point> points_;\n>  \t// manual r setting\n> -\tdouble manual_r_;\n> +\tdouble manualR_;\n>  \t// manual b setting\n> -\tdouble manual_b_;\n> -\tbool first_switch_mode_; // is this the first call to SwitchMode?\n> +\tdouble manualB_;\n> +\tbool firstSwitchMode_; // is this the first call to SwitchMode?\n>  };\n\n[snip]\n\n> diff --git a/src/ipa/raspberrypi/md_parser_smia.cpp b/src/ipa/raspberrypi/md_parser_smia.cpp\n> index ea5eac414b36..9fab6594baac 100644\n> --- a/src/ipa/raspberrypi/md_parser_smia.cpp\n> +++ b/src/ipa/raspberrypi/md_parser_smia.cpp\n\n[snip]\n\n> @@ -76,74 +76,74 @@ MdParserSmia::ParseStatus MdParserSmia::findRegs(libcamera::Span<const uint8_t>\n>  {\n>  \tASSERT(offsets_.size());\n>  \n> -\tif (buffer[0] != LINE_START)\n> -\t\treturn NO_LINE_START;\n> +\tif (buffer[0] != LineStart)\n> +\t\treturn NoLineStart;\n>  \n> -\tunsigned int current_offset = 1; /* after the LINE_START */\n> -\tunsigned int current_line_start = 0, current_line = 0;\n> -\tunsigned int reg_num = 0, regs_done = 0;\n> +\tunsigned int currentOffset = 1; /* after the LineStart */\n> +\tunsigned int currentLineStart = 0, currentLine = 0;\n> +\tunsigned int regNum = 0, regsDone = 0;\n>  \n>  \twhile (1) {\n> -\t\tint tag = buffer[current_offset++];\n> -\n> -\t\tif ((bits_per_pixel_ == 10 &&\n> -\t\t     (current_offset + 1 - current_line_start) % 5 == 0) ||\n> -\t\t    (bits_per_pixel_ == 12 &&\n> -\t\t     (current_offset + 1 - current_line_start) % 3 == 0)) {\n> -\t\t\tif (buffer[current_offset++] != REG_SKIP)\n> -\t\t\t\treturn BAD_DUMMY;\n> +\t\tint tag = buffer[currentOffset++];\n> +\n> +\t\tif ((bitsPerPixel_ == 10 &&\n> +\t\t     (currentOffset + 1 - currentLineStart) % 5 == 0) ||\n> +\t\t    (bitsPerPixel_ == 12 &&\n> +\t\t     (currentOffset + 1 - currentLineStart) % 3 == 0)) {\n> +\t\t\tif (buffer[currentOffset++] != RegSkip)\n> +\t\t\t\treturn BadDummy;\n>  \t\t}\n>  \n> -\t\tint data_byte = buffer[current_offset++];\n> +\t\tint dataByte = buffer[currentOffset++];\n>  \n> -\t\tif (tag == LINE_END_TAG) {\n> -\t\t\tif (data_byte != LINE_END_TAG)\n> -\t\t\t\treturn BAD_LINE_END;\n> +\t\tif (tag == LineEndTag) {\n> +\t\t\tif (dataByte != LineEndTag)\n> +\t\t\t\treturn BadLineEnd;\n>  \n> -\t\t\tif (num_lines_ && ++current_line == num_lines_)\n> -\t\t\t\treturn MISSING_REGS;\n> +\t\t\tif (numLines_ && ++currentLine == numLines_)\n> +\t\t\t\treturn MissingRegs;\n>  \n> -\t\t\tif (line_length_bytes_) {\n> -\t\t\t\tcurrent_offset = current_line_start + line_length_bytes_;\n> +\t\t\tif (lineLengthBytes_) {\n> +\t\t\t\tcurrentOffset = currentLineStart + lineLengthBytes_;\n>  \n>  \t\t\t\t/* Require whole line to be in the buffer (if buffer size set). */\n>  \t\t\t\tif (buffer.size() &&\n> -\t\t\t\t    current_offset + line_length_bytes_ > buffer.size())\n> -\t\t\t\t\treturn MISSING_REGS;\n> +\t\t\t\t    currentOffset + lineLengthBytes_ > buffer.size())\n> +\t\t\t\t\treturn MissingRegs;\n>  \n> -\t\t\t\tif (buffer[current_offset] != LINE_START)\n> -\t\t\t\t\treturn NO_LINE_START;\n> +\t\t\t\tif (buffer[currentOffset] != LineStart)\n> +\t\t\t\t\treturn NoLineStart;\n>  \t\t\t} else {\n>  \t\t\t\t/* allow a zero line length to mean \"hunt for the next line\" */\n> -\t\t\t\twhile (current_offset < buffer.size() &&\n> -\t\t\t\t       buffer[current_offset] != LINE_START)\n> -\t\t\t\t\tcurrent_offset++;\n> +\t\t\t\twhile (currentOffset < buffer.size() &&\n> +\t\t\t\t       buffer[currentOffset] != LineStart)\n> +\t\t\t\t\tcurrentOffset++;\n>  \n> -\t\t\t\tif (current_offset == buffer.size())\n> -\t\t\t\t\treturn NO_LINE_START;\n> +\t\t\t\tif (currentOffset == buffer.size())\n> +\t\t\t\t\treturn NoLineStart;\n>  \t\t\t}\n>  \n> -\t\t\t/* inc current_offset to after LINE_START */\n> -\t\t\tcurrent_line_start = current_offset++;\n> +\t\t\t/* inc current_offset to after LineStart */\n\ns/current_offset/currentOffset/\n\n> +\t\t\tcurrentLineStart = currentOffset++;\n>  \t\t} else {\n> -\t\t\tif (tag == REG_HI_BITS)\n> -\t\t\t\treg_num = (reg_num & 0xff) | (data_byte << 8);\n> -\t\t\telse if (tag == REG_LOW_BITS)\n> -\t\t\t\treg_num = (reg_num & 0xff00) | data_byte;\n> -\t\t\telse if (tag == REG_SKIP)\n> -\t\t\t\treg_num++;\n> -\t\t\telse if (tag == REG_VALUE) {\n> -\t\t\t\tauto reg = offsets_.find(reg_num);\n> +\t\t\tif (tag == RegHiBits)\n> +\t\t\t\tregNum = (regNum & 0xff) | (dataByte << 8);\n> +\t\t\telse if (tag == RegLowBits)\n> +\t\t\t\tregNum = (regNum & 0xff00) | dataByte;\n> +\t\t\telse if (tag == RegSkip)\n> +\t\t\t\tregNum++;\n> +\t\t\telse if (tag == RegValue) {\n> +\t\t\t\tauto reg = offsets_.find(regNum);\n>  \n>  \t\t\t\tif (reg != offsets_.end()) {\n> -\t\t\t\t\toffsets_[reg_num] = current_offset - 1;\n> +\t\t\t\t\toffsets_[regNum] = currentOffset - 1;\n>  \n> -\t\t\t\t\tif (++regs_done == offsets_.size())\n> -\t\t\t\t\t\treturn PARSE_OK;\n> +\t\t\t\t\tif (++regsDone == offsets_.size())\n> +\t\t\t\t\t\treturn ParseOk;\n>  \t\t\t\t}\n> -\t\t\t\treg_num++;\n> +\t\t\t\tregNum++;\n>  \t\t\t} else\n> -\t\t\t\treturn ILLEGAL_TAG;\n> +\t\t\t\treturn IllegalTag;\n>  \t\t}\n>  \t}\n>  }\n\n[snip]\n\nI'll handle all these smalll issues when applying.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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 12CC7C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jul 2022 13:14:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3C2E963311;\n\tWed, 27 Jul 2022 15:14:25 +0200 (CEST)","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 1AEE763309\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jul 2022 15:14:24 +0200 (CEST)","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 8044B835;\n\tWed, 27 Jul 2022 15:14:23 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658927665;\n\tbh=KWDZfQXFUiU562W68LcB4UKBhvatBqc0jN3vmdINgYY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=YmVTPm5btDWCbJ/FHBew+wwY2tAC7fK7sgrsxDS2fMNIm8Tb3c9iwcydYTcDJ/6g4\n\tmrXkgkrMvSrXl9S3MyJvQEG9FI4fuLbWn895GbcyXCEfqHhDldwzdJn3Ze8PcEUqGJ\n\trF3GC97rMb5qdCsADoIObkadoVxG6hrOlYiXUr2DT9yLGB+TMb9O/pU7oVCkM2K4hq\n\tr2tAPcjuye84yX5JvZ/EilCGf5cDi0QMt6Ngxqj4n3R74OrkYSg7cr4EWkeDNFqoE5\n\tLFsIkbMwf0EUDZOocy+C+N8kkr9Vz/hKl90nmx7jaYieW5q8uDzMhi7Qxcs4dCpAGq\n\t23HDOuNmAPSJA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658927663;\n\tbh=KWDZfQXFUiU562W68LcB4UKBhvatBqc0jN3vmdINgYY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mhl4J2jKEaO30bLh3BTgXDlaFsZWJj5YSmZCVEK5hcivvbAkaHucFImuyo3ZHEkHw\n\tcXZj0stIF7mLHJbe0lPHNKuHtoJWWGvaYkslKwmSbsck4rxSMXxgQCFt4k3/pAUhXk\n\txR3gijLeIsVlN90QhtZJSZwn/Yd3uCi/dPmCwJIY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"mhl4J2jK\"; dkim-atps=neutral","Date":"Wed, 27 Jul 2022 16:14:21 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YuE6LZPrWT7OONPx@pendragon.ideasonboard.com>","References":"<20220727085524.13290-1-naush@raspberrypi.com>\n\t<20220727085524.13290-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220727085524.13290-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v3 1/8] ipa: raspberrypi: Code\n\trefactoring to match style guidelines","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24190,"web_url":"https://patchwork.libcamera.org/comment/24190/","msgid":"<CAEmqJPp6XnrTN29jehwEumfOCPJyCX+z6j=tjWnS7CKa-cpJKA@mail.gmail.com>","date":"2022-07-27T13:31:43","subject":"Re: [libcamera-devel] [PATCH v3 1/8] ipa: raspberrypi: Code\n\trefactoring to match style guidelines","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Wed, 27 Jul 2022 at 14:14, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> Thank you for the patch.\n>\n> On Wed, Jul 27, 2022 at 09:55:17AM +0100, Naushir Patuck wrote:\n> > Refactor all the source files in src/ipa/raspberrypi/ to match the\n> recommended\n> > formatting guidelines for the libcamera project. The vast majority of\n> changes\n> > in this commit comprise of switching from snake_case to CamelCase, and\n> starting\n> > class member functions with a lower case character.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  src/ipa/raspberrypi/cam_helper.cpp            |  88 +--\n> >  src/ipa/raspberrypi/cam_helper.hpp            |  40 +-\n> >  src/ipa/raspberrypi/cam_helper_imx219.cpp     |  34 +-\n> >  src/ipa/raspberrypi/cam_helper_imx290.cpp     |  32 +-\n> >  src/ipa/raspberrypi/cam_helper_imx296.cpp     |  24 +-\n> >  src/ipa/raspberrypi/cam_helper_imx477.cpp     |  72 +-\n> >  src/ipa/raspberrypi/cam_helper_imx519.cpp     |  70 +-\n> >  src/ipa/raspberrypi/cam_helper_ov5647.cpp     |  44 +-\n> >  src/ipa/raspberrypi/cam_helper_ov9281.cpp     |  28 +-\n> >  .../raspberrypi/controller/agc_algorithm.hpp  |  19 +-\n> >  src/ipa/raspberrypi/controller/agc_status.h   |  24 +-\n> >  src/ipa/raspberrypi/controller/algorithm.cpp  |  20 +-\n> >  src/ipa/raspberrypi/controller/algorithm.hpp  |  26 +-\n> >  .../raspberrypi/controller/awb_algorithm.hpp  |   6 +-\n> >  src/ipa/raspberrypi/controller/awb_status.h   |   8 +-\n> >  .../controller/black_level_status.h           |   6 +-\n> >  src/ipa/raspberrypi/controller/camera_mode.h  |  16 +-\n> >  .../raspberrypi/controller/ccm_algorithm.hpp  |   2 +-\n> >  .../controller/contrast_algorithm.hpp         |   4 +-\n> >  src/ipa/raspberrypi/controller/controller.cpp |  74 +-\n> >  src/ipa/raspberrypi/controller/controller.hpp |  22 +-\n> >  .../controller/denoise_algorithm.hpp          |   2 +-\n> >  .../raspberrypi/controller/denoise_status.h   |   4 +-\n> >  .../raspberrypi/controller/device_status.cpp  |  18 +-\n> >  .../raspberrypi/controller/device_status.h    |  16 +-\n> >  src/ipa/raspberrypi/controller/focus_status.h |   2 +-\n> >  src/ipa/raspberrypi/controller/histogram.cpp  |  34 +-\n> >  src/ipa/raspberrypi/controller/histogram.hpp  |  10 +-\n> >  src/ipa/raspberrypi/controller/metadata.hpp   |  16 +-\n> >  src/ipa/raspberrypi/controller/noise_status.h |   4 +-\n> >  src/ipa/raspberrypi/controller/pwl.cpp        | 130 ++--\n> >  src/ipa/raspberrypi/controller/pwl.hpp        |  48 +-\n> >  src/ipa/raspberrypi/controller/rpi/agc.cpp    | 732 +++++++++---------\n> >  src/ipa/raspberrypi/controller/rpi/agc.hpp    | 130 ++--\n> >  src/ipa/raspberrypi/controller/rpi/alsc.cpp   | 641 ++++++++-------\n> >  src/ipa/raspberrypi/controller/rpi/alsc.hpp   |  86 +-\n> >  src/ipa/raspberrypi/controller/rpi/awb.cpp    | 564 +++++++-------\n> >  src/ipa/raspberrypi/controller/rpi/awb.hpp    | 110 +--\n> >  .../controller/rpi/black_level.cpp            |  34 +-\n> >  .../controller/rpi/black_level.hpp            |  12 +-\n> >  src/ipa/raspberrypi/controller/rpi/ccm.cpp    |  84 +-\n> >  src/ipa/raspberrypi/controller/rpi/ccm.hpp    |  12 +-\n> >  .../raspberrypi/controller/rpi/contrast.cpp   | 118 ++-\n> >  .../raspberrypi/controller/rpi/contrast.hpp   |  30 +-\n> >  src/ipa/raspberrypi/controller/rpi/dpc.cpp    |  18 +-\n> >  src/ipa/raspberrypi/controller/rpi/dpc.hpp    |   6 +-\n> >  src/ipa/raspberrypi/controller/rpi/focus.cpp  |  14 +-\n> >  src/ipa/raspberrypi/controller/rpi/focus.hpp  |   4 +-\n> >  src/ipa/raspberrypi/controller/rpi/geq.cpp    |  48 +-\n> >  src/ipa/raspberrypi/controller/rpi/geq.hpp    |   6 +-\n> >  src/ipa/raspberrypi/controller/rpi/lux.cpp    |  70 +-\n> >  src/ipa/raspberrypi/controller/rpi/lux.hpp    |  22 +-\n> >  src/ipa/raspberrypi/controller/rpi/noise.cpp  |  38 +-\n> >  src/ipa/raspberrypi/controller/rpi/noise.hpp  |  14 +-\n> >  src/ipa/raspberrypi/controller/rpi/sdn.cpp    |  36 +-\n> >  src/ipa/raspberrypi/controller/rpi/sdn.hpp    |  10 +-\n> >  .../raspberrypi/controller/rpi/sharpen.cpp    |  42 +-\n> >  .../raspberrypi/controller/rpi/sharpen.hpp    |  14 +-\n> >  .../controller/sharpen_algorithm.hpp          |   2 +-\n> >  .../raspberrypi/controller/sharpen_status.h   |   2 +-\n> >  src/ipa/raspberrypi/md_parser.hpp             |  44 +-\n> >  src/ipa/raspberrypi/md_parser_smia.cpp        | 108 +--\n> >  src/ipa/raspberrypi/raspberrypi.cpp           | 272 +++----\n> >  63 files changed, 2099 insertions(+), 2167 deletions(-)\n>\n> [snip]\n>\n> > diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> > index f6a9cb0a2cd8..408ff9cf296d 100644\n> > --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> > +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n>\n> [snip]\n>\n> > -static double compute_initial_Y(bcm2835_isp_stats *stats, AwbStatus\n> const &awb,\n> > -                             double weights[], double gain)\n> > +static double computeInitialY(bcm2835_isp_stats *stats, AwbStatus const\n> &awb,\n> > +                           double weights[], double gain)\n> >  {\n> >       bcm2835_isp_stats_region *regions = stats->agc_stats;\n> >       // Note how the calculation below means that equal weights give you\n> >       // \"average\" metering (i.e. all pixels equally important).\n> > -     double R_sum = 0, G_sum = 0, B_sum = 0, pixel_sum = 0;\n> > +     double rSum = 0, gSum = 0, bSum = 0, pixelSum = 0;\n> >       for (int i = 0; i < AGC_STATS_SIZE; i++) {\n> >               double counted = regions[i].counted;\n> > -             double r_sum = std::min(regions[i].r_sum * gain, ((1 <<\n> PIPELINE_BITS) - 1) * counted);\n> > -             double g_sum = std::min(regions[i].g_sum * gain, ((1 <<\n> PIPELINE_BITS) - 1) * counted);\n> > -             double b_sum = std::min(regions[i].b_sum * gain, ((1 <<\n> PIPELINE_BITS) - 1) * counted);\n> > -             R_sum += r_sum * weights[i];\n> > -             G_sum += g_sum * weights[i];\n> > -             B_sum += b_sum * weights[i];\n> > -             pixel_sum += counted * weights[i];\n> > +             double rAcc = std::min(regions[i].r_sum * gain, ((1 <<\n> PIPELINE_BITS) - 1) * counted);\n> > +             double gAcc = std::min(regions[i].g_sum * gain, ((1 <<\n> PIPELINE_BITS) - 1) * counted);\n> > +             double bAcc = std::min(regions[i].b_sum * gain, ((1 <<\n> PIPELINE_BITS) - 1) * counted);\n> > +             rSum += rAcc * weights[i];\n> > +             gSum += gAcc * weights[i];\n> > +             bSum += bAcc * weights[i];\n> > +             pixelSum += counted * weights[i];\n> >       }\n> > -     if (pixel_sum == 0.0) {\n> > -             LOG(RPiAgc, Warning) << \"compute_initial_Y: pixel_sum is\n> zero\";\n> > +     if (pixelSum == 0.0) {\n> > +             LOG(RPiAgc, Warning) << \"computeInitialY: pixel_sum is\n> zero\";\n>\n> s/pixel_sum/pixelSum/\n>\n> >               return 0;\n> >       }\n> > -     double Y_sum = R_sum * awb.gain_r * .299 +\n> > -                    G_sum * awb.gain_g * .587 +\n> > -                    B_sum * awb.gain_b * .114;\n> > -     return Y_sum / pixel_sum / (1 << PIPELINE_BITS);\n> > +     double ySum = rSum * awb.gainR * .299 +\n> > +                   gSum * awb.gainG * .587 +\n> > +                   bSum * awb.gainB * .114;\n> > +     return ySum / pixelSum / (1 << PIPELINE_BITS);\n> >  }\n>\n> [snip]\n>\n> > diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> > index d4c934473832..a305237f31fb 100644\n> > --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> > +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n>\n> [snip]\n>\n> > -double Awb::computeDelta2Sum(double gain_r, double gain_b)\n> > +double Awb::computeDelta2Sum(double gainR, double gainB)\n> >  {\n> >       // Compute the sum of the squared colour error (non-greyness) as it\n> >       // appears in the log likelihood equation.\n> > -     double delta2_sum = 0;\n> > +     double delta2Sum = 0;\n> >       for (auto &z : zones_) {\n> > -             double delta_r = gain_r * z.R - 1 - config_.whitepoint_r;\n> > -             double delta_b = gain_b * z.B - 1 - config_.whitepoint_b;\n> > -             double delta2 = delta_r * delta_r + delta_b * delta_b;\n> > +             double deltaR = gainR * z.R - 1 - config_.whitepointR;\n> > +             double deltaB = gainB * z.B - 1 - config_.whitepointB;\n> > +             double delta2 = deltaR * deltaR + deltaB * deltaB;\n> >               //LOG(RPiAwb, Debug) << \"delta_r \" << delta_r << \" delta_b\n> \" << delta_b << \" delta2 \" << delta2;\n>\n> The variables should be updated here too.\n>\n> > -             delta2 = std::min(delta2, config_.delta_limit);\n> > -             delta2_sum += delta2;\n> > +             delta2 = std::min(delta2, config_.deltaLimit);\n> > +             delta2Sum += delta2;\n> >       }\n> > -     return delta2_sum;\n> > +     return delta2Sum;\n> >  }\n>\n> [snip]\n>\n> > diff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> > index ac3dca6f42fc..91251d6be2da 100644\n> > --- a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n> > +++ b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n>\n> [snip]\n>\n> > @@ -141,22 +141,22 @@ private:\n> >       StatisticsPtr statistics_;\n> >       AwbMode *mode_;\n> >       double lux_;\n> > -     AwbStatus async_results_;\n> > +     AwbStatus asyncResults_;\n> >       void doAwb();\n> >       void awbBayes();\n> >       void awbGrey();\n> >       void prepareStats();\n> > -     double computeDelta2Sum(double gain_r, double gain_b);\n> > +     double computeDelta2Sum(double gain_r, double gainB);\n>\n> s/gain_r/gainR/\n>\n> >       Pwl interpolatePrior();\n> >       double coarseSearch(Pwl const &prior);\n> >       void fineSearch(double &t, double &r, double &b, Pwl const &prior);\n> >       std::vector<RGB> zones_;\n> >       std::vector<Pwl::Point> points_;\n> >       // manual r setting\n> > -     double manual_r_;\n> > +     double manualR_;\n> >       // manual b setting\n> > -     double manual_b_;\n> > -     bool first_switch_mode_; // is this the first call to SwitchMode?\n> > +     double manualB_;\n> > +     bool firstSwitchMode_; // is this the first call to SwitchMode?\n> >  };\n>\n> [snip]\n>\n> > diff --git a/src/ipa/raspberrypi/md_parser_smia.cpp\n> b/src/ipa/raspberrypi/md_parser_smia.cpp\n> > index ea5eac414b36..9fab6594baac 100644\n> > --- a/src/ipa/raspberrypi/md_parser_smia.cpp\n> > +++ b/src/ipa/raspberrypi/md_parser_smia.cpp\n>\n> [snip]\n>\n> > @@ -76,74 +76,74 @@ MdParserSmia::ParseStatus\n> MdParserSmia::findRegs(libcamera::Span<const uint8_t>\n> >  {\n> >       ASSERT(offsets_.size());\n> >\n> > -     if (buffer[0] != LINE_START)\n> > -             return NO_LINE_START;\n> > +     if (buffer[0] != LineStart)\n> > +             return NoLineStart;\n> >\n> > -     unsigned int current_offset = 1; /* after the LINE_START */\n> > -     unsigned int current_line_start = 0, current_line = 0;\n> > -     unsigned int reg_num = 0, regs_done = 0;\n> > +     unsigned int currentOffset = 1; /* after the LineStart */\n> > +     unsigned int currentLineStart = 0, currentLine = 0;\n> > +     unsigned int regNum = 0, regsDone = 0;\n> >\n> >       while (1) {\n> > -             int tag = buffer[current_offset++];\n> > -\n> > -             if ((bits_per_pixel_ == 10 &&\n> > -                  (current_offset + 1 - current_line_start) % 5 == 0) ||\n> > -                 (bits_per_pixel_ == 12 &&\n> > -                  (current_offset + 1 - current_line_start) % 3 == 0)) {\n> > -                     if (buffer[current_offset++] != REG_SKIP)\n> > -                             return BAD_DUMMY;\n> > +             int tag = buffer[currentOffset++];\n> > +\n> > +             if ((bitsPerPixel_ == 10 &&\n> > +                  (currentOffset + 1 - currentLineStart) % 5 == 0) ||\n> > +                 (bitsPerPixel_ == 12 &&\n> > +                  (currentOffset + 1 - currentLineStart) % 3 == 0)) {\n> > +                     if (buffer[currentOffset++] != RegSkip)\n> > +                             return BadDummy;\n> >               }\n> >\n> > -             int data_byte = buffer[current_offset++];\n> > +             int dataByte = buffer[currentOffset++];\n> >\n> > -             if (tag == LINE_END_TAG) {\n> > -                     if (data_byte != LINE_END_TAG)\n> > -                             return BAD_LINE_END;\n> > +             if (tag == LineEndTag) {\n> > +                     if (dataByte != LineEndTag)\n> > +                             return BadLineEnd;\n> >\n> > -                     if (num_lines_ && ++current_line == num_lines_)\n> > -                             return MISSING_REGS;\n> > +                     if (numLines_ && ++currentLine == numLines_)\n> > +                             return MissingRegs;\n> >\n> > -                     if (line_length_bytes_) {\n> > -                             current_offset = current_line_start +\n> line_length_bytes_;\n> > +                     if (lineLengthBytes_) {\n> > +                             currentOffset = currentLineStart +\n> lineLengthBytes_;\n> >\n> >                               /* Require whole line to be in the buffer\n> (if buffer size set). */\n> >                               if (buffer.size() &&\n> > -                                 current_offset + line_length_bytes_ >\n> buffer.size())\n> > -                                     return MISSING_REGS;\n> > +                                 currentOffset + lineLengthBytes_ >\n> buffer.size())\n> > +                                     return MissingRegs;\n> >\n> > -                             if (buffer[current_offset] != LINE_START)\n> > -                                     return NO_LINE_START;\n> > +                             if (buffer[currentOffset] != LineStart)\n> > +                                     return NoLineStart;\n> >                       } else {\n> >                               /* allow a zero line length to mean \"hunt\n> for the next line\" */\n> > -                             while (current_offset < buffer.size() &&\n> > -                                    buffer[current_offset] !=\n> LINE_START)\n> > -                                     current_offset++;\n> > +                             while (currentOffset < buffer.size() &&\n> > +                                    buffer[currentOffset] != LineStart)\n> > +                                     currentOffset++;\n> >\n> > -                             if (current_offset == buffer.size())\n> > -                                     return NO_LINE_START;\n> > +                             if (currentOffset == buffer.size())\n> > +                                     return NoLineStart;\n> >                       }\n> >\n> > -                     /* inc current_offset to after LINE_START */\n> > -                     current_line_start = current_offset++;\n> > +                     /* inc current_offset to after LineStart */\n>\n> s/current_offset/currentOffset/\n>\n> > +                     currentLineStart = currentOffset++;\n> >               } else {\n> > -                     if (tag == REG_HI_BITS)\n> > -                             reg_num = (reg_num & 0xff) | (data_byte <<\n> 8);\n> > -                     else if (tag == REG_LOW_BITS)\n> > -                             reg_num = (reg_num & 0xff00) | data_byte;\n> > -                     else if (tag == REG_SKIP)\n> > -                             reg_num++;\n> > -                     else if (tag == REG_VALUE) {\n> > -                             auto reg = offsets_.find(reg_num);\n> > +                     if (tag == RegHiBits)\n> > +                             regNum = (regNum & 0xff) | (dataByte << 8);\n> > +                     else if (tag == RegLowBits)\n> > +                             regNum = (regNum & 0xff00) | dataByte;\n> > +                     else if (tag == RegSkip)\n> > +                             regNum++;\n> > +                     else if (tag == RegValue) {\n> > +                             auto reg = offsets_.find(regNum);\n> >\n> >                               if (reg != offsets_.end()) {\n> > -                                     offsets_[reg_num] = current_offset\n> - 1;\n> > +                                     offsets_[regNum] = currentOffset -\n> 1;\n> >\n> > -                                     if (++regs_done == offsets_.size())\n> > -                                             return PARSE_OK;\n> > +                                     if (++regsDone == offsets_.size())\n> > +                                             return ParseOk;\n> >                               }\n> > -                             reg_num++;\n> > +                             regNum++;\n> >                       } else\n> > -                             return ILLEGAL_TAG;\n> > +                             return IllegalTag;\n> >               }\n> >       }\n> >  }\n>\n> [snip]\n>\n> I'll handle all these smalll issues when applying.\n>\n\nGroan!  I'm sure there are still more lurking around...  :-(\nThanks for  the fixups!\n\nNaush\n\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 CDFACC3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jul 2022 13:32:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F368C63311;\n\tWed, 27 Jul 2022 15:32:01 +0200 (CEST)","from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com\n\t[IPv6:2a00:1450:4864:20::22b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 64A3663309\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jul 2022 15:32:00 +0200 (CEST)","by mail-lj1-x22b.google.com with SMTP id w18so8761344lje.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jul 2022 06:32:00 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658928722;\n\tbh=DMvMHw1lclNU4+TJxAT1L/PlStnTxgff411TMBpMwbQ=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=Cqx34PZ1eZ2OZYL5s98FqipfD4sKzX9q8y7GXV2KWs4cYch0QEJkm9Pwqr7a64qtv\n\tGbpWCzH3FgWhZUBiz+X+8upZURQW4yUzBf9Js8wWaBskFhHBb6f99oux+jhN+oIZMq\n\tjIelmSzdJerSQkf5kiWGPnOU1omEK9a1JbGQfJOTKM+yJtzBomKMAuamfOPJ62tNUH\n\ttGZ2uDNVrsRScJpMZ02kYmLFhJ6W6/cCGhMK26fUuuABwj7JdfSAg3D3YS5qZTOf+E\n\tXbNSDmF9kkkEHlv/fZxfNu+mPu/7VZLk7ZYkZNRImNedNFZ7FJogS9k4IwGiLFy/aA\n\tYbb0/obcozIew==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=QJI4x3ngUDbs4h48UBf+yZcprG2oDTlfAhnk13TLI6M=;\n\tb=CEY92ehP/htX0RPZYnw1X7dkWqqOyfzpA6GOURNTaOwGW3qJhmIu/mXgBffy5KSWnK\n\tDC7DJabPli6EL/V9dyxsf/DYYt6LO80RVtw78ccBOohTMoThxnMHUw/RSNiZjBuRVwH5\n\tTz90sslK0ifV8eVsCCDnyQJWA0DFx3T/A+IPFH8eaoBaFRWUCtHJjcTf2wZK0qEuMdiA\n\t9FsOi91jenXiVO27s/M4OtOCw0XDIhZ8WsAmZ72WVlltlrmHecvpK/EOIOalR9l59cbK\n\tG2acXCFYyhntzAwTxQsVF9B+/M0A74qytpJwss9bzFHOdFHdRZstdaPp14Lo0Efjbk86\n\toEhg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"CEY92ehP\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=QJI4x3ngUDbs4h48UBf+yZcprG2oDTlfAhnk13TLI6M=;\n\tb=aeP34xGaHNbKy65rsndDhEeYOvKb4PCnlJe7ZNJgJz4gS3H8cIDyaxWtIufTI2cz9N\n\tQMSLoIEhsFiT+tI7WYYPoesubgo2t1QHEnymY/0gAH77W0J6GONYoldJ390dSlPWWslf\n\t8DTkhry9nyvSt6J2vwDMxd86OvvJkbgbGlIQgobVnV6HBvm1y8DcrB1WrderRbvbgGPz\n\tO7cM19hiOiLbxzDpznw/Xkb9SM2DPcKOGhw/CjV9M3Hf4jjxmsdaA6ZaCGg1ufr8pKZw\n\tAmepfMgD/kTDNKqe8fBb4E8FMac+LP4RZV5Tyfr1LJlFearnHfuXRjeq51/mws69/2VK\n\tuA3g==","X-Gm-Message-State":"AJIora9q9oLN5QlNQ8NQvUFznoOwqKhzz5qGHUh+ObSXg5zcB0jizV1B\n\tvQcsQrOE2kPt7qvFAL175sICsY0E7yZXdoogdh+zHRQ+D+w=","X-Google-Smtp-Source":"AGRyM1sXVt9hV13lddAhD1BxC4WSx1rNxCBHjqcR8i+KXGGdXR55EnFqFqKnEJz5ir/p/hjn7QqXraUxR/t4PSpw13I=","X-Received":"by 2002:a2e:a7c8:0:b0:25e:200a:74cf with SMTP id\n\tx8-20020a2ea7c8000000b0025e200a74cfmr1582071ljp.271.1658928719304;\n\tWed, 27 Jul 2022 06:31:59 -0700 (PDT)","MIME-Version":"1.0","References":"<20220727085524.13290-1-naush@raspberrypi.com>\n\t<20220727085524.13290-2-naush@raspberrypi.com>\n\t<YuE6LZPrWT7OONPx@pendragon.ideasonboard.com>","In-Reply-To":"<YuE6LZPrWT7OONPx@pendragon.ideasonboard.com>","Date":"Wed, 27 Jul 2022 14:31:43 +0100","Message-ID":"<CAEmqJPp6XnrTN29jehwEumfOCPJyCX+z6j=tjWnS7CKa-cpJKA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"00000000000005aded05e4c971a6\"","Subject":"Re: [libcamera-devel] [PATCH v3 1/8] ipa: raspberrypi: Code\n\trefactoring to match style guidelines","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]