Package com.google.android.exoplayer2.effect

## Class Contrast

- java.lang.Object
- - com.google.android.exoplayer2.effect.Contrast

- All Implemented Interfaces:
    `GlEffect`, `Effect`

      public class Contrast
      extends Object
      implements GlEffect

  A `GlEffect` to control the contrast of video frames.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `float` | `contrast` | Adjusts the contrast of video frames in the interval [-1, 1].

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Contrast​(float contrast)` | Creates a new instance for the given contrast value.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SingleFrameGlTextureProcessor` | `toGlTextureProcessor​(Context context, boolean useHdr)` | Returns a `SingleFrameGlTextureProcessor` that applies the effect.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### contrast

          public final float contrast

      Adjusts the contrast of video frames in the interval [-1, 1].

  - ### Constructor Detail

    - #### Contrast

          public Contrast​(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.

  - ### Method Detail

    - #### toGlTextureProcessor

          public SingleFrameGlTextureProcessor toGlTextureProcessor​(Context context,
                                                                    boolean useHdr)
                                                             throws FrameProcessingException

      Description copied from interface: `GlEffect`
      Returns a `SingleFrameGlTextureProcessor` that applies the effect.
      Specified by:
        `toGlTextureProcessor` in interface `GlEffect`
      Parameters:
        `context` - A `Context`.
        `useHdr` - Whether input textures come from an HDR source. If `true`, colors will be in linear RGB BT.2020. If `false`, colors will be in linear RGB BT.709.
      Throws:
        `FrameProcessingException`