Stay organized with collections Save and categorize content based on your preferences.

ColorLut

@UnstableApi
public interface ColorLut extends GlEffect

Known direct subclasses
SingleColorLut

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


Specifies color transformations using color lookup tables to apply to each frame in the fragment shader.

Summary

Public methods

abstract int
getLength(long presentationTimeUs)

Returns the length N of the 3D N x N x N LUT cube with the given timestamp.

abstract int
getLutTextureId(long presentationTimeUs)

Returns the OpenGL texture ID of the LUT to apply to the pixels of the frame with the given timestamp.

abstract void

Releases the OpenGL texture of the LUT.

default SingleFrameGlTextureProcessor
@WorkerThread
toGlTextureProcessor(Context context, boolean useHdr)

This method must be executed on the same thread as other GL commands.

Public methods

getLength

abstract int getLength(long presentationTimeUs)

Returns the length N of the 3D N x N x N LUT cube with the given timestamp.

getLutTextureId

abstract int getLutTextureId(long presentationTimeUs)

Returns the OpenGL texture ID of the LUT to apply to the pixels of the frame with the given timestamp.

release

abstract void release()

Releases the OpenGL texture of the LUT.

Throws
androidx.media3.common.util.GlUtil.GlException androidx.media3.common.util.GlUtil.GlException

toGlTextureProcessor

@WorkerThread
default SingleFrameGlTextureProcessor toGlTextureProcessor(Context context, boolean useHdr)

This method must be executed on the same thread as other GL commands.

Throws
androidx.media3.common.FrameProcessingException androidx.media3.common.FrameProcessingException