libjpegrecoverymapmath: simplify applyRecovery expression
Bug: 261877699
Test: push files from tests/data to /sdcard/Documents and then \
atest libjpegdecoder_test libjpegencoder_test libjpegrecoverymap_test
Change-Id: I1871f830b226e4ad89b82fdae7fed9618739c7aa
diff --git a/libs/jpegrecoverymap/recoverymapmath.cpp b/libs/jpegrecoverymap/recoverymapmath.cpp
index 9ed2949..df7ab3d 100644
--- a/libs/jpegrecoverymap/recoverymapmath.cpp
+++ b/libs/jpegrecoverymap/recoverymapmath.cpp
@@ -296,7 +296,7 @@
static float applyRecovery(float e, float recovery, float hdr_ratio) {
if (e <= 0.0f) return 0.0f;
- return exp2(log2(e) + recovery * log2(hdr_ratio));
+ return e * pow(hdr_ratio, recovery);
}
Color applyRecovery(Color e, float recovery, float hdr_ratio) {