diff options
Diffstat (limited to 'src/ipa/raspberrypi/cam_helper_imx219.cpp')
-rw-r--r-- | src/ipa/raspberrypi/cam_helper_imx219.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipa/raspberrypi/cam_helper_imx219.cpp b/src/ipa/raspberrypi/cam_helper_imx219.cpp index 566ecbca..e550fba6 100644 --- a/src/ipa/raspberrypi/cam_helper_imx219.cpp +++ b/src/ipa/raspberrypi/cam_helper_imx219.cpp @@ -29,7 +29,7 @@ class MdParserImx219 : public MdParserSmia { public: MdParserImx219(); - Status Parse(void *data) override; + Status Parse(libcamera::Span<const uint8_t> buffer) override; Status GetExposureLines(unsigned int &lines) override; Status GetGainCode(unsigned int &gain_code) override; private: @@ -118,7 +118,7 @@ MdParserImx219::MdParserImx219() reg_offsets_[0] = reg_offsets_[1] = reg_offsets_[2] = -1; } -MdParser::Status MdParserImx219::Parse(void *data) +MdParser::Status MdParserImx219::Parse(libcamera::Span<const uint8_t> buffer) { bool try_again = false; @@ -132,7 +132,7 @@ MdParser::Status MdParserImx219::Parse(void *data) /* Need to be ordered */ uint32_t regs[3] = { GAIN_REG, EXPHI_REG, EXPLO_REG }; reg_offsets_[0] = reg_offsets_[1] = reg_offsets_[2] = -1; - int ret = static_cast<int>(findRegs(static_cast<uint8_t *>(data), + int ret = static_cast<int>(findRegs(buffer, regs, reg_offsets_, 3)); /* * > 0 means "worked partially but parse again next time", @@ -148,7 +148,7 @@ MdParser::Status MdParserImx219::Parse(void *data) if (reg_offsets_[i] == -1) continue; - reg_values_[i] = static_cast<uint8_t *>(data)[reg_offsets_[i]]; + reg_values_[i] = buffer[reg_offsets_[i]]; } /* Re-parse next time if we were unhappy in some way. */ |