Class Contrast
- java.lang.Object
-
- com.google.android.exoplayer2.effect.Contrast
-
@Deprecated public class Contrast extends Object implements RgbMatrix
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.ARgbMatrix
to control the contrast of video frames.
-
-
Constructor Summary
Constructors Constructor Description Contrast(float contrast)
Deprecated.Creates a new instance for the given contrast value.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description float[]
getMatrix(long presentationTimeUs, boolean useHdr)
Deprecated.Returns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp.boolean
isNoOp(int inputWidth, int inputHeight)
Deprecated.Returns whether aGlEffect
applies no change at every timestamp.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.android.exoplayer2.effect.RgbMatrix
toGlShaderProgram
-
-
-
-
Constructor Detail
-
Contrast
public Contrast(@FloatRange(from=-1.0,to=1.0) float contrast)
Deprecated.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.
-
-
Method Detail
-
getMatrix
public float[] getMatrix(long presentationTimeUs, boolean useHdr)
Deprecated.Description copied from interface:RgbMatrix
Returns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp.- Specified by:
getMatrix
in interfaceRgbMatrix
- Parameters:
presentationTimeUs
- The timestamp of the frame to apply the matrix on.useHdr
- Iftrue
, colors will be in linear RGB BT.2020. Iffalse
, colors will be in linear RGB BT.709. Must be consistent withuseHdr
inRgbMatrix.toGlShaderProgram(Context, boolean)
.- Returns:
- The
RgbMatrix
to apply to the frame.
-
-