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)); } } }