diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2022-07-27 09:55:17 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-07-27 18:12:12 +0300 |
commit | 177df04d2b7f357ebe41f1a9809ab68b6f948082 (patch) | |
tree | 062bc7f480d96629461487c63b4762936a7dcb22 /src/ipa/raspberrypi/md_parser.hpp | |
parent | b4a3eb6b98ce65a6c9323368fa0afcb887739628 (diff) |
ipa: raspberrypi: Code refactoring to match style guidelines
Refactor all the source files in src/ipa/raspberrypi/ to match the recommended
formatting guidelines for the libcamera project. The vast majority of changes
in this commit comprise of switching from snake_case to CamelCase, and starting
class member functions with a lower case character.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/md_parser.hpp')
-rw-r--r-- | src/ipa/raspberrypi/md_parser.hpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/ipa/raspberrypi/md_parser.hpp b/src/ipa/raspberrypi/md_parser.hpp index d32d0f54..298d5181 100644 --- a/src/ipa/raspberrypi/md_parser.hpp +++ b/src/ipa/raspberrypi/md_parser.hpp @@ -75,40 +75,40 @@ public: }; MdParser() - : reset_(true), bits_per_pixel_(0), num_lines_(0), line_length_bytes_(0) + : reset_(true), bitsPerPixel_(0), numLines_(0), lineLengthBytes_(0) { } virtual ~MdParser() = default; - void Reset() + void reset() { reset_ = true; } - void SetBitsPerPixel(int bpp) + void setBitsPerPixel(int bpp) { - bits_per_pixel_ = bpp; + bitsPerPixel_ = bpp; } - void SetNumLines(unsigned int num_lines) + void setNumLines(unsigned int numLines) { - num_lines_ = num_lines; + numLines_ = numLines; } - void SetLineLengthBytes(unsigned int num_bytes) + void setLineLengthBytes(unsigned int numBytes) { - line_length_bytes_ = num_bytes; + lineLengthBytes_ = numBytes; } - virtual Status Parse(libcamera::Span<const uint8_t> buffer, + virtual Status parse(libcamera::Span<const uint8_t> buffer, RegisterMap ®isters) = 0; protected: bool reset_; - int bits_per_pixel_; - unsigned int num_lines_; - unsigned int line_length_bytes_; + int bitsPerPixel_; + unsigned int numLines_; + unsigned int lineLengthBytes_; }; /* @@ -123,7 +123,7 @@ class MdParserSmia final : public MdParser public: MdParserSmia(std::initializer_list<uint32_t> registerList); - MdParser::Status Parse(libcamera::Span<const uint8_t> buffer, + MdParser::Status parse(libcamera::Span<const uint8_t> buffer, RegisterMap ®isters) override; private: @@ -133,18 +133,18 @@ private: /* * Note that error codes > 0 are regarded as non-fatal; codes < 0 * indicate a bad data buffer. Status codes are: - * PARSE_OK - found all registers, much happiness - * MISSING_REGS - some registers found; should this be a hard error? + * ParseOk - found all registers, much happiness + * MissingRegs - some registers found; should this be a hard error? * The remaining codes are all hard errors. */ enum ParseStatus { - PARSE_OK = 0, - MISSING_REGS = 1, - NO_LINE_START = -1, - ILLEGAL_TAG = -2, - BAD_DUMMY = -3, - BAD_LINE_END = -4, - BAD_PADDING = -5 + ParseOk = 0, + MissingRegs = 1, + NoLineStart = -1, + IllegalTag = -2, + BadDummy = -3, + BadLineEnd = -4, + BadPadding = -5 }; ParseStatus findRegs(libcamera::Span<const uint8_t> buffer); |