Contrast
@UnstableApi
public final class Contrast implements RgbMatrix
A RgbMatrix to control the contrast of video frames.
Summary
Public constructors |
|---|
Contrast(@FloatRange(from = "-1", to = 1) float contrast)Creates a new instance for the given contrast value. |
Public methods |
|
|---|---|
float[] |
getMatrix(long presentationTimeUs, boolean useHdr)Returns the 4x4 RGB transformation |
boolean |
isNoOp(int inputWidth, int inputHeight)Returns whether a |
Inherited methods |
||
|---|---|---|
|
||
|
||
|
Public constructors
Contrast
public Contrast(@FloatRange(from = "-1", to = 1) float contrast)
Creates a new instance for the given contrast value.
Contrast values range from -1 (all gray pixels) to 1 (maximum difference of colors). 0 means to add no contrast and leaves the frames unchanged.
Public methods
getMatrix
public float[] getMatrix(long presentationTimeUs, boolean useHdr)
Returns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp.
| Parameters | |
|---|---|
long presentationTimeUs |
The timestamp of the frame to apply the matrix on. |
boolean useHdr |
If |
| Returns | |
|---|---|
float[] |
The |