Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
isp:sample_awb_implementation_in_c [2018/06/14 23:12] – [Helper one-liners] Igor Yefmov | isp:sample_awb_implementation_in_c [2018/06/16 03:40] – [AWB::_resetRed()] Igor Yefmov | ||
---|---|---|---|
Line 7: | Line 7: | ||
* '' | * '' | ||
- | The code below conforms to C++14 standard | + | The code below conforms to C++17 standard |
====== Helper one-liners ====== | ====== Helper one-liners ====== | ||
Line 123: | Line 123: | ||
===== Constructor AWB::AWB ===== | ===== Constructor AWB::AWB ===== | ||
- | A bulk of (quite simplistic) calculations is performed with data in '' | + | A bulk of (quite simplistic) calculations is performed with data in '' |
<code c++> | <code c++> | ||
Line 194: | Line 194: | ||
<code c++>void AWB:: | <code c++>void AWB:: | ||
{ | { | ||
- | const int gainG = m_ov[Val::GAIN_G]; | + | const int gainG = m_ov[Val::gain_g]; |
- | const int gainR = m_ov[Val::GAIN_R]; | + | const int gainR = m_ov[Val::gain_r]; |
if(gainR > gainG){ | if(gainR > gainG){ | ||
const auto diff = (gainG - gainR) * 5 / 8; // 62.5% closer to green gain value | const auto diff = (gainG - gainR) * 5 / 8; // 62.5% closer to green gain value | ||
- | m_ov[Val::GAIN_R] = gainR + diff; | + | m_ov[Val::gain_r] = gainR + diff; |
} | } | ||
}</ | }</ |