Class SingleColorLut
- java.lang.Object
-
- com.google.android.exoplayer2.effect.SingleColorLut
-
@Deprecated public class SingleColorLut extends Object implements ColorLut
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 aftertoGlShaderProgram(Context, boolean)
.void
release()
Deprecated.Releases the OpenGL texture of the LUT.SingleFrameGlShaderProgram
toGlShaderProgram(Context context, boolean useHdr)
Deprecated.Returns aGlShaderProgram
that applies the effect.
-
-
-
Method Detail
-
createFromCube
public static SingleColorLut createFromCube(int[][][] lutCube)
Deprecated.Creates a new instance.lutCube
needs to be aN x N x N
cube and each element is an integer representing a color using theBitmap.Config.ARGB_8888
format.
-
createFromBitmap
public static SingleColorLut createFromBitmap(Bitmap lut)
Deprecated.Creates a new instance.LUT needs to be a Bitmap of a flattened HALD image of width
N
and heightN^2
. Each element must be an integer representing a color using theBitmap.Config.ARGB_8888
format.
-
getLutTextureId
public int getLutTextureId(long presentationTimeUs)
Deprecated.Must be called aftertoGlShaderProgram(Context, boolean)
.- Specified by:
getLutTextureId
in interfaceColorLut
-
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.
-
release
public void release() throws GlUtil.GlException
Deprecated.Description copied from interface:ColorLut
Releases the OpenGL texture of the LUT.- Specified by:
release
in interfaceColorLut
- Throws:
GlUtil.GlException
-
toGlShaderProgram
public SingleFrameGlShaderProgram toGlShaderProgram(Context context, boolean useHdr) throws VideoFrameProcessingException
Deprecated.Description copied from interface:GlEffect
Returns aGlShaderProgram
that applies the effect.- Specified by:
toGlShaderProgram
in interfaceColorLut
- Specified by:
toGlShaderProgram
in interfaceGlEffect
- Parameters:
context
- AContext
.useHdr
- Whether input textures come from an HDR source. Iftrue
, colors will be in linear RGB BT.2020. Iffalse
, colors will be in linear RGB BT.709.- Throws:
VideoFrameProcessingException
- If an error occurs while creating theGlShaderProgram
.
-
-