RgbMatrix
@UnstableApi
public interface RgbMatrix extends GlEffect
Brightness |
Modifies brightness of an input frame. |
Contrast |
A |
RgbAdjustment |
Scales the red, green, and blue color channels of a frame. |
RgbFilter |
Provides common color filters. |
Specifies a 4x4 RGB color transformation matrix to apply to each frame in the fragment shader.
Summary
Public methods |
|
|---|---|
abstract float[] |
getMatrix(long presentationTimeUs, boolean useHdr)Returns the 4x4 RGB transformation |
default BaseGlShaderProgram |
toGlShaderProgram(Context context, boolean useHdr)Returns a |
Inherited methods |
||
|---|---|---|
|
||
Public methods
getMatrix
abstract float[] getMatrix(long presentationTimeUs, boolean useHdr)
Returns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp.
| Parameters | |
|---|---|
long presentationTimeUs |
The timestamp of the frame to apply the matrix on. |
boolean useHdr |
If |
| Returns | |
|---|---|
float[] |
The |
toGlShaderProgram
default BaseGlShaderProgram toGlShaderProgram(Context context, boolean useHdr)
Returns a GlShaderProgram that applies the effect.
| Parameters | |
|---|---|
Context context |
A |
boolean useHdr |
Whether input textures come from an HDR source. If |
| Throws | |
|---|---|
androidx.media3.common.VideoFrameProcessingException |
If an error occurs while creating the |