From cce2f5053e9582d6c4ceece01bf10357c1ef8480 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Tue, 2 Feb 2021 17:53:27 +0100 Subject: [PATCH] Colour propagation: reduce memory usage --- rtengine/hilite_recon.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rtengine/hilite_recon.cc b/rtengine/hilite_recon.cc index 331ea9db4..4902ad2c2 100644 --- a/rtengine/hilite_recon.cc +++ b/rtengine/hilite_recon.cc @@ -948,7 +948,6 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue array2D gbuf(W2, H2); array2D bbuf(W2, H2); array2D guide(W2, H2); - array2D Y(W2, H2); using rtengine::TMatrix; TMatrix ws = ICCStore::getInstance()->workingSpaceMatrix(params.icm.workingProfile); @@ -966,8 +965,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue #endif for (int y = 0; y < H2; ++y) { for (int x = 0; x < W2; ++x) { - Y[y][x] = rtengine::Color::rgbLuminance(static_cast(rbuf[y][x]), static_cast(gbuf[y][x]), static_cast(bbuf[y][x]), ws); - guide[y][x] = Color::igamma_srgb(Y[y][x]); + guide[y][x] = Color::igamma_srgb(Color::rgbLuminance(static_cast(rbuf[y][x]), static_cast(gbuf[y][x]), static_cast(bbuf[y][x]), ws)); } } }