summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3/algorithms
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/ipu3/algorithms')
-rw-r--r--src/ipa/ipu3/algorithms/tone_mapping.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp
index 3af96261..40337f9d 100644
--- a/src/ipa/ipu3/algorithms/tone_mapping.cpp
+++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp
@@ -43,6 +43,9 @@ void ToneMapping::process([[maybe_unused]] IPAContext &context,
*/
gamma_ = 1.1;
+ if (context.frameContext.toneMapping.gamma == gamma_)
+ return;
+
struct ipu3_uapi_gamma_corr_lut &lut =
context.frameContext.toneMapping.gammaCorrection;
@@ -53,6 +56,8 @@ void ToneMapping::process([[maybe_unused]] IPAContext &context,
/* The output value is expressed on 13 bits. */
lut.lut[i] = gamma * 8191;
}
+
+ context.frameContext.toneMapping.gamma = gamma_;
}
} /* namespace ipa::ipu3::algorithms */