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

Commit eed52b3e authored by John Reck's avatar John Reck Committed by Automerger Merge Worker
Browse files

Merge "Use highp to avoid float overflow in expression" am: a910a7f0 am:...

Merge "Use highp to avoid float overflow in expression" am: a910a7f0 am: 5b007cc9 am: 7de4e66d am: 6bf33d4d

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2146965



Change-Id: Ie2ad5181e3eff500cdd8c4c501bd1e6cac3b9fda
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fec0bc46 6bf33d4d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -373,7 +373,11 @@ void ProgramCache::generateToneMappingProcess(Formatter& fs, const Key& needs) {
                                    return color * slope;
                                } else if (nits < x1) {
                                    // scale [x0, x1] to [y0, y1] linearly
                                    float slope = (y1 - y0) / (x1 - x0);
                                    // Use highp since some compilers may do this
                                    // operation as reciprocal multiplication with
                                    // re-association that could exceed the range
                                    // of mediump float.
                                    highp float slope = (y1 - y0) / (x1 - x0);
                                    nits = y0 + (nits - x0) * slope;
                                } else if (nits < x2) {
                                    // scale [x1, x2] to [y1, y2] using Hermite interp