Back to Exoplayer

SingleColorLut (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/effect/SingleColorLut.html

latest5.9 KB
Original Source

Package com.google.android.exoplayer2.effect

Class SingleColorLut

  • java.lang.Object

    • com.google.android.exoplayer2.effect.SingleColorLut
  • All Implemented Interfaces:ColorLut, GlEffect, Effect


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classSingleColorLutextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[ColorLut](ColorLut.html "interface in com.google.android.exoplayer2.effect")

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.

Transforms the colors of a frame by applying the same color lookup table to each frame.

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | static SingleColorLut | createFromBitmap​(Bitmap lut) | Deprecated.

Creates a new instance. | | static SingleColorLut | createFromCube​(int[][][] lutCube) | Deprecated.

Creates a new instance. | | int | getLength​(long presentationTimeUs) | Deprecated.

Returns the length N of the 3D N x N x N LUT cube with the given timestamp. | | int | getLutTextureId​(long presentationTimeUs) | Deprecated.

Must be called after toGlShaderProgram(Context, boolean). | | void | release() | Deprecated.

Releases the OpenGL texture of the LUT. | | SingleFrameGlShaderProgram | toGlShaderProgram​(Context context, boolean useHdr) | Deprecated.

Returns a GlShaderProgram that applies the effect. |

- 

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.GlEffect

isNoOp

Method Detail

- 

createFromCube

public static[SingleColorLut](SingleColorLut.html "class in com.google.android.exoplayer2.effect")createFromCube​(int[][][] lutCube)

Deprecated.

Creates a new instance.

lutCube needs to be a N x N x N cube and each element is an integer representing a color using the Bitmap.Config.ARGB_8888 format.

- 

createFromBitmap

public static[SingleColorLut](SingleColorLut.html "class in com.google.android.exoplayer2.effect")createFromBitmap​([Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")lut)

Deprecated.

Creates a new instance.

LUT needs to be a Bitmap of a flattened HALD image of width N and height N^2. Each element must be an integer representing a color using the Bitmap.Config.ARGB_8888 format.

- 

getLutTextureId

public int getLutTextureId​(long presentationTimeUs)

Deprecated.

Must be called after toGlShaderProgram(Context, boolean). Specified by:getLutTextureId in interface ColorLut

- 

getLength

public int getLength​(long presentationTimeUs)

Deprecated.

Description copied from interface: ColorLut

Returns the length N of the 3D N x N x N LUT cube with the given timestamp. Specified by:getLength in interface ColorLut

- 

release

public void release()
             throws[GlUtil.GlException](../util/GlUtil.GlException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Description copied from interface: ColorLut

Releases the OpenGL texture of the LUT. Specified by:release in interface ColorLutThrows:GlUtil.GlException

- 

toGlShaderProgram

public[SingleFrameGlShaderProgram](SingleFrameGlShaderProgram.html "class in com.google.android.exoplayer2.effect")toGlShaderProgram​([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,
                                                    boolean useHdr)
                                             throws[VideoFrameProcessingException](../util/VideoFrameProcessingException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Description copied from interface: GlEffect

Returns a GlShaderProgram that applies the effect. Specified by:toGlShaderProgram in interface ColorLutSpecified by:toGlShaderProgram in interface GlEffectParameters: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:VideoFrameProcessingException - If an error occurs while creating the GlShaderProgram.