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 SingleColorLutcreateFromBitmap(Bitmap lut)Deprecated.Creates a new instance.static SingleColorLutcreateFromCube(int[][][] lutCube)Deprecated.Creates a new instance.intgetLength(long presentationTimeUs)Deprecated.Returns the length N of the 3D N x N x N LUT cube with the given timestamp.intgetLutTextureId(long presentationTimeUs)Deprecated.Must be called aftertoGlShaderProgram(Context, boolean).voidrelease()Deprecated.Releases the OpenGL texture of the LUT.SingleFrameGlShaderProgramtoGlShaderProgram(Context context, boolean useHdr)Deprecated.Returns aGlShaderProgramthat applies the effect.
-
-
-
Method Detail
-
createFromCube
public static SingleColorLut createFromCube(int[][][] lutCube)
Deprecated.Creates a new instance.lutCubeneeds to be aN x N x Ncube and each element is an integer representing a color using theBitmap.Config.ARGB_8888format.
-
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
Nand heightN^2. Each element must be an integer representing a color using theBitmap.Config.ARGB_8888format.
-
getLutTextureId
public int getLutTextureId(long presentationTimeUs)
Deprecated.Must be called aftertoGlShaderProgram(Context, boolean).- Specified by:
getLutTextureIdin interfaceColorLut
-
getLength
public int getLength(long presentationTimeUs)
Deprecated.Description copied from interface:ColorLutReturns the length N of the 3D N x N x N LUT cube with the given timestamp.
-
release
public void release() throws GlUtil.GlExceptionDeprecated.Description copied from interface:ColorLutReleases the OpenGL texture of the LUT.- Specified by:
releasein interfaceColorLut- Throws:
GlUtil.GlException
-
toGlShaderProgram
public SingleFrameGlShaderProgram toGlShaderProgram(Context context, boolean useHdr) throws VideoFrameProcessingException
Deprecated.Description copied from interface:GlEffectReturns aGlShaderProgramthat applies the effect.- Specified by:
toGlShaderProgramin interfaceColorLut- Specified by:
toGlShaderProgramin 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.
-
-