From 04c78a99f0b0dc68c6140f5afffe016e42a3a519 Mon Sep 17 00:00:00 2001 From: Anthony Han Date: Fri, 3 May 2019 13:34:57 -0700 Subject: Interpolate low light white balance Instead of setting color temperature to a default in low lux conditions, add a spline to interpolate from color temperature that reflects the ambient to a default. Bug: 131259669 Test: atest AmbientLuxTest Change-Id: I623190b796c67bab88e2eea3b4cf5a5b9ba14ae2 --- core/res/res/values/config.xml | 25 +- core/res/res/values/symbols.xml | 3 +- .../server/display/whitebalance/AmbientFilter.java | 4 +- .../DisplayWhiteBalanceController.java | 61 +++-- .../whitebalance/DisplayWhiteBalanceFactory.java | 12 +- .../display/whitebalance/AmbientLuxTest.java | 299 +++++++++++++++++++++ 6 files changed, 376 insertions(+), 28 deletions(-) create mode 100644 services/tests/servicestests/src/com/android/server/display/whitebalance/AmbientLuxTest.java diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index a467f40949dd..768eb5a1db2a 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -4017,9 +4017,28 @@ - 10.0 + A float array containing a list of ambient brightnesses, in Lux. This array, + together with config_displayWhiteBalanceLowLightAmbientBiases, is used to generate a + lookup table used in DisplayWhiteBalanceController. This lookup table is used to map + ambient brightness readings to a bias, where the bias is used to linearly interpolate + between ambient color temperature and + config_displayWhiteBalanceLowLightAmbientColorTemperature. + This table is optional. If used, this array must, + 1) Contain at least two entries + 2) Be the same length as config_displayWhiteBalanceLowLightAmbientBiases. --> + + 10.0 + 10.0 + + + + + 0.0 + 1.0 +