Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3bb40ad authored by Ram Mohan's avatar Ram Mohan Committed by Dichen Zhang
Browse files

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
parent 311c59bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ uint8_t encodeRecovery(float y_sdr, float y_hdr, float hdr_ratio) {

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) {