Interface RgbMatrix
-
- All Known Implementing Classes:
RgbAdjustment,RgbFilter
public interface RgbMatrix extends GlEffect
Specifies a 4x4 RGB color transformation matrix to apply to each frame in the fragment shader.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description 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.default SingleFrameGlTextureProcessortoGlTextureProcessor(Context context, boolean useHdr)Returns aSingleFrameGlTextureProcessorthat applies the effect.
-
-
-
Method Detail
-
getMatrix
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:
presentationTimeUs- The timestamp of the frame to apply the matrix on.useHdr- Iftrue, colors will be in linear RGB BT.2020. Iffalse, colors will be in linear RGB BT.709. Must be consistent withuseHdrintoGlTextureProcessor(Context, boolean).- Returns:
- The
RgbMatrixto apply to the frame.
-
toGlTextureProcessor
default SingleFrameGlTextureProcessor toGlTextureProcessor(Context context, boolean useHdr) throws FrameProcessingException
Description copied from interface:GlEffectReturns aSingleFrameGlTextureProcessorthat applies the effect.- Specified by:
toGlTextureProcessorin 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:
FrameProcessingException
-
-