Current OLED screens have a separate brightness control input to control brightness at the highest input signal. If we want to display white at a brightness of 20 cd/m2, we can do either of the following:
- Adjust the brightness control so that the brightness at the highest input signal is 20 cd/m2, then use the highest signal ("white") as input;
- With a higher brightness control input, say 160 cd/m2, use a lower signal ("gray") as input to produce 12.5% of maximum brightness (20 cd/m2 m2) output.
Some OLED screens use a higher PWM frequency and duty cycle in the latter case, which some users feel helps reduce discomfort when viewing the screen for a long time or in dark environments.
The relationship between signal level and output brightness is not linear, so the second method is not simply multiplying the signal by a factor. However, given the following premises, we can achieve precise control:
- The Android system assumes that the screen has an sRGB response curve;
- Based on the sRGB response curve, the system framework and HAL provide RGB matrix transformation in linear space;
- Starting from Android 12, the system framework and HAL interface support absolute brightness control in cd/m2 (or nits).