Class RgbAdjustment

  • All Implemented Interfaces:
    GlEffect, RgbMatrix, Effect

    @Deprecated
    public final class RgbAdjustment
    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.
    Scales the red, green, and blue color channels of a frame.
    • 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 interface RgbMatrix
        Parameters:
        presentationTimeUs - The timestamp of the frame to apply the matrix on.
        useHdr - If true, colors will be in linear RGB BT.2020. If false, colors will be in linear RGB BT.709. Must be consistent with useHdr in RgbMatrix.toGlShaderProgram(Context, boolean).
        Returns:
        The RgbMatrix to apply to the frame.
      • isNoOp

        public boolean isNoOp​(int inputWidth,
                              int inputHeight)
        Deprecated.
        Description copied from interface: GlEffect
        Returns whether a GlEffect applies no change at every timestamp.

        This can be used as a hint to skip this instance.

        Specified by:
        isNoOp in interface GlEffect
        Parameters:
        inputWidth - The input frame width, in pixels.
        inputHeight - The input frame height, in pixels.