<div dir="ltr"><div dir="ltr">Hi David,<div><br></div><div>Thank you for your patch.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 25 Feb 2021 at 17:01, David Plowman <<a href="mailto:david.plowman@raspberrypi.com">david.plowman@raspberrypi.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Some more code from pre-libcamera versions is removed. There is no<br>
functional change.<br>
<br>
Signed-off-by: David Plowman <<a href="mailto:david.plowman@raspberrypi.com" target="_blank">david.plowman@raspberrypi.com</a>><br></blockquote><div><br></div><div>Reviewed-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com">naush@raspberrypi.com</a>></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
src/ipa/raspberrypi/controller/rpi/awb.cpp | 4 +---<br>
src/ipa/raspberrypi/controller/rpi/awb.hpp | 7 +------<br>
2 files changed, 2 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp<br>
index bb637f10..791a7039 100644<br>
--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp<br>
+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp<br>
@@ -21,8 +21,6 @@ LOG_DEFINE_CATEGORY(RPiAwb)<br>
#define AWB_STATS_SIZE_X DEFAULT_AWB_REGIONS_X<br>
#define AWB_STATS_SIZE_Y DEFAULT_AWB_REGIONS_Y<br>
<br>
-const double Awb::RGB::INVALID = -1.0;<br>
-<br>
// todo - the locking in this algorithm needs some tidying up as has been done<br>
// elsewhere (ALSC and AGC).<br>
<br>
@@ -340,7 +338,7 @@ static void generate_stats(std::vector<Awb::RGB> &zones,<br>
double min_G)<br>
{<br>
for (int i = 0; i < AWB_STATS_SIZE_X * AWB_STATS_SIZE_Y; i++) {<br>
- Awb::RGB zone; // this is "invalid", unless R gets overwritten later<br>
+ Awb::RGB zone;<br>
double counted = stats[i].counted;<br>
if (counted >= min_pixels) {<br>
zone.G = stats[i].g_sum / counted;<br>
diff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp b/src/ipa/raspberrypi/controller/rpi/awb.hpp<br>
index 45ba9e25..2fe59c37 100644<br>
--- a/src/ipa/raspberrypi/controller/rpi/awb.hpp<br>
+++ b/src/ipa/raspberrypi/controller/rpi/awb.hpp<br>
@@ -90,21 +90,16 @@ public:<br>
void Prepare(Metadata *image_metadata) override;<br>
void Process(StatisticsPtr &stats, Metadata *image_metadata) override;<br>
struct RGB {<br>
- RGB(double _R = INVALID, double _G = INVALID,<br>
- double _B = INVALID)<br>
+ RGB(double _R = -1.0, double _G = -1.0, double _B = -1.0)<br>
: R(_R), G(_G), B(_B)<br>
{<br>
}<br>
double R, G, B;<br>
- static const double INVALID;<br>
- bool Valid() const { return G != INVALID; }<br>
- bool Invalid() const { return G == INVALID; }<br>
RGB &operator+=(RGB const &other)<br>
{<br>
R += other.R, G += other.G, B += other.B;<br>
return *this;<br>
}<br>
- RGB Square() const { return RGB(R * R, G * G, B * B); }<br>
};<br>
<br>
private:<br>
-- <br>
2.20.1<br>
<br>
_______________________________________________<br>
libcamera-devel mailing list<br>
<a href="mailto:libcamera-devel@lists.libcamera.org" target="_blank">libcamera-devel@lists.libcamera.org</a><br>
<a href="https://lists.libcamera.org/listinfo/libcamera-devel" rel="noreferrer" target="_blank">https://lists.libcamera.org/listinfo/libcamera-devel</a><br>
</blockquote></div></div>