From a48a000a3304830e1ccbbc400209ba6e317b45c4 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 7 Apr 2021 15:48:59 +0300 Subject: libcamera: Rename 'method' to 'function' Usage of 'method' to refer to member functions comes from Java. The C++ standard uses the term 'function' only. Replace 'method' with 'function' or 'member function' through the whole code base and documentation. While at it, fix two typos (s/backeng/backend/). The BoundMethod and Object::invokeMethod() are left as-is here, and will be addressed separately. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Acked-by: Kieran Bingham --- src/ipa/ipu3/ipu3.cpp | 2 +- src/ipa/libipa/camera_sensor_helper.cpp | 2 +- src/ipa/raspberrypi/cam_helper.cpp | 4 ++-- src/ipa/raspberrypi/cam_helper.hpp | 14 +++++++------- src/ipa/raspberrypi/controller/controller.hpp | 4 ++-- src/ipa/raspberrypi/controller/rpi/alsc.hpp | 2 +- src/ipa/raspberrypi/controller/rpi/sharpen.cpp | 2 +- src/ipa/raspberrypi/md_parser.hpp | 4 ++-- src/ipa/raspberrypi/raspberrypi.cpp | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/ipa') diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 71698d36..9f6694ed 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -105,7 +105,7 @@ int IPAIPU3::start() } /** - * This method calculates a grid for the AWB algorithm in the IPU3 firmware. + * This function calculates a grid for the AWB algorithm in the IPU3 firmware. * Its input is the BDS output size calculated in the ImgU. * It is limited for now to the simplest method: find the lesser error * with the width/height and respective log2 width/height of the cells. diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 37f5f8cd..0b0eb503 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -41,7 +41,7 @@ namespace ipa { * \brief Construct a CameraSensorHelper instance * * CameraSensorHelper derived class instances shall never be constructed - * manually but always through the CameraSensorHelperFactory::create() method. + * manually but always through the CameraSensorHelperFactory::create() function. */ /** diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp index 8f64e014..74179399 100644 --- a/src/ipa/raspberrypi/cam_helper.cpp +++ b/src/ipa/raspberrypi/cam_helper.cpp @@ -117,7 +117,7 @@ void CamHelper::GetDelays(int &exposure_delay, int &gain_delay, { /* * These values are correct for many sensors. Other sensors will - * need to over-ride this method. + * need to over-ride this function. */ exposure_delay = 2; gain_delay = 1; @@ -133,7 +133,7 @@ double CamHelper::GetModeSensitivity([[maybe_unused]] const CameraMode &mode) co { /* * Most sensors have the same sensitivity in every mode, but this - * method can be overridden for those that do not. Note that it is + * function can be overridden for those that do not. Note that it is * called before mode_ is set, so it must return the sensitivity * of the mode that is passed in. */ diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp index 0643b77a..a776153f 100644 --- a/src/ipa/raspberrypi/cam_helper.hpp +++ b/src/ipa/raspberrypi/cam_helper.hpp @@ -34,25 +34,25 @@ namespace RPiController { // exposure time, and to convert between the sensor's gain codes and actual // gains. // -// A method to return the number of frames of delay between updating exposure, +// A function to return the number of frames of delay between updating exposure, // analogue gain and vblanking, and for the changes to take effect. For many // sensors these take the values 2, 1 and 2 respectively, but sensors that are -// different will need to over-ride the default method provided. +// different will need to over-ride the default function provided. // -// A method to query if the sensor outputs embedded data that can be parsed. +// A function to query if the sensor outputs embedded data that can be parsed. // -// A method to return the sensitivity of a given camera mode. +// A function to return the sensitivity of a given camera mode. // // A parser to parse the embedded data buffers provided by some sensors (for // example, the imx219 does; the ov5647 doesn't). This allows us to know for // sure the exposure and gain of the frame we're looking at. CamHelper -// provides methods for converting analogue gains to and from the sensor's +// provides functions for converting analogue gains to and from the sensor's // native gain codes. // -// Finally, a set of methods that determine how to handle the vagaries of +// Finally, a set of functions that determine how to handle the vagaries of // different camera modules on start-up or when switching modes. Some // modules may produce one or more frames that are not yet correctly exposed, -// or where the metadata may be suspect. We have the following methods: +// or where the metadata may be suspect. We have the following functions: // HideFramesStartup(): Tell the pipeline handler not to return this many // frames at start-up. This can also be used to hide initial frames // while the AGC and other algorithms are sorting themselves out. diff --git a/src/ipa/raspberrypi/controller/controller.hpp b/src/ipa/raspberrypi/controller/controller.hpp index 49b1a551..3b50ae77 100644 --- a/src/ipa/raspberrypi/controller/controller.hpp +++ b/src/ipa/raspberrypi/controller/controller.hpp @@ -27,8 +27,8 @@ typedef std::shared_ptr StatisticsPtr; // The Controller holds a pointer to some global_metadata, which is how // different controllers and control algorithms within them can exchange -// information. The Prepare method returns a pointer to metadata for this -// specific image, and which should be passed on to the Process method. +// information. The Prepare function returns a pointer to metadata for this +// specific image, and which should be passed on to the Process function. class Controller { diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.hpp b/src/ipa/raspberrypi/controller/rpi/alsc.hpp index 13d1ba54..9616b99e 100644 --- a/src/ipa/raspberrypi/controller/rpi/alsc.hpp +++ b/src/ipa/raspberrypi/controller/rpi/alsc.hpp @@ -82,7 +82,7 @@ private: int frame_phase_; // counts up to startup_frames int frame_count_; - // counts up to startup_frames for Process method + // counts up to startup_frames for Process function int frame_count2_; double sync_results_[3][ALSC_CELLS_Y][ALSC_CELLS_X]; double prev_sync_results_[3][ALSC_CELLS_Y][ALSC_CELLS_X]; diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp index b0c2e00a..18825a43 100644 --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp @@ -50,7 +50,7 @@ void Sharpen::Read(boost::property_tree::ptree const ¶ms) void Sharpen::SetStrength(double strength) { - // Note that this method is how an application sets the overall + // Note that this function is how an application sets the overall // sharpening "strength". We call this the "user strength" field // as there already is a strength_ field - being an internal gain // parameter that gets passed to the ISP control code. Negative diff --git a/src/ipa/raspberrypi/md_parser.hpp b/src/ipa/raspberrypi/md_parser.hpp index e3e27385..d32d0f54 100644 --- a/src/ipa/raspberrypi/md_parser.hpp +++ b/src/ipa/raspberrypi/md_parser.hpp @@ -113,8 +113,8 @@ protected: /* * This isn't a full implementation of a metadata parser for SMIA sensors, - * however, it does provide the findRegs method which will prove useful and make - * it easier to implement parsers for other SMIA-like sensors (see + * however, it does provide the findRegs function which will prove useful and + * make it easier to implement parsers for other SMIA-like sensors (see * md_parser_imx219.cpp for an example). */ diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 48e11c69..69d36b7d 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -741,7 +741,7 @@ void IPARPi::queueRequest(const ControlList &controls) } /* - * The SetEv() method takes in a direct exposure multiplier. + * The SetEv() function takes in a direct exposure multiplier. * So convert to 2^EV */ double ev = pow(2.0, ctrl.second.get()); -- cgit v1.2.1