diff options
| author | 2015-04-30 19:36:24 +0000 | |
|---|---|---|
| committer | 2015-04-30 19:36:27 +0000 | |
| commit | adcb47a58571e1aa6ac829bf229409aef996942a (patch) | |
| tree | 3b06006683262ef3a35510671e69dc563a68d577 | |
| parent | ad61b8336aa9627a6ae19580bbdc370dc8bd6810 (diff) | |
| parent | 6c06ebe4aaa33528bc9da6b4ae13433e6ffc91f6 (diff) | |
Merge "Adjust display inversion matrix to account for luminance"
| -rw-r--r-- | services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java b/services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java index 38827d09c99f..d0b5898076fc 100644 --- a/services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java +++ b/services/accessibility/java/com/android/server/accessibility/DisplayAdjustmentUtils.java @@ -41,12 +41,18 @@ class DisplayAdjustmentUtils { 0, 0, 0, 1 }; - /** Matrix and offset used for value-only display inversion. */ + /** + * Matrix and offset used for luminance inversion. Represents a transform + * from RGB to YIQ color space, rotation around the Y axis by 180 degrees, + * transform back to RGB color space, and subtraction from 1. The last row + * represents a non-multiplied addition, see surfaceflinger's ProgramCache + * for full implementation details. + */ private static final float[] INVERSION_MATRIX_VALUE_ONLY = new float[] { - 0, -.5f, -.5f, 0, - -.5f, 0, -.5f, 0, - -.5f, -.5f, 0, 0, - 1, 1, 1, 1 + 0.402f, -0.598f, -0.599f, 0, + -1.174f, -0.174f, -1.175f, 0, + -0.228f, -0.228f, 0.772f, 0, + 1, 1, 1, 1 }; /** Default inversion mode for display color correction. */ |