DisplayLuts.Entry


public static class DisplayLuts.Entry
extends Object

java.lang.Object
   ↳ android.hardware.DisplayLuts.Entry


Summary

Public constructors

Entry(float[] buffer, int dimension, int samplingKey)

Create a Lut entry.

Public methods

float[] getBuffer()
int getDimension()
int getSamplingKey()
String toString()

Returns a string representation of the object.

Inherited methods

Public constructors

Entry

Added in API level 36
public Entry (float[] buffer, 
                int dimension, 
                int samplingKey)

Create a Lut entry.

1D Lut(s) are treated as gain curves.

3D Lut(s) are used for direct color manipulations.

For 3D Lut(s), the values should be normalized to the range 0.0 to 1.0, inclusive. And 1.0 is the maximum panel luminance. And If N is the size of each dimension, the data is arranged in RGB order:

 R(0, 0, 0), R(0, 0, 1), ..., R(0, 0, N - 1),
 R(0, 1, 0), ..., R(0, 1, N - 1), ..., R(0, N - 1, N - 1),
 R(1, 0, 0), ..., R(1, 0, N - 1), ..., R(1, N - 1, N - 1), ..., R(N - 1, N - 1, N - 1),
 G(0, 0, 0), ..., G(N - 1, N - 1, N - 1),
 B(0, 0, 0), ..., B(N - 1, N - 1, N - 1)
When a GPU shader samples 3D Lut data, it's accessed in a flat, one-dimensional arrangement. Assuming that we have a 3D array ORIGINAL[N][N][N], then
 FLAT[z + N * (y + N * x)] = ORIGINAL[x][y][z]

Parameters
buffer float: The raw lut data This value cannot be null.

dimension int: Either 1D or 3D Value is LutProperties.ONE_DIMENSION, or LutProperties.THREE_DIMENSION

samplingKey int: The sampling kay used for the Lut Value is LutProperties.SAMPLING_KEY_RGB, LutProperties.SAMPLING_KEY_MAX_RGB, or LutProperties.SAMPLING_KEY_CIE_Y

Public methods

getBuffer

Added in API level 36
public float[] getBuffer ()

Returns
float[] the lut raw data of the lut This value cannot be null.

getDimension

Added in API level 36
public int getDimension ()

Returns
int the dimension of the lut entry

getSamplingKey

Added in API level 36
public int getSamplingKey ()

Returns
int the sampling key used by the lut

toString

Added in API level 36
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.