SeparableConvolution
@UnstableApi
public abstract class SeparableConvolution implements GlEffect
GaussianBlurWithFrameOverlaid |
A |
GaussianBlur |
A |
A GlEffect for performing separable convolutions.
A single 1D convolution function is applied horizontally on a first pass and vertically on a second pass.
Summary
Public constructors |
|---|
|
Creates an instance with |
SeparableConvolution(float scaleWidth, float scaleHeight)Creates an instance. |
Public methods |
|
|---|---|
abstract ConvolutionFunction1D |
getConvolution(long presentationTimeUs)Returns a |
GlShaderProgram |
toGlShaderProgram(Context context, boolean useHdr)Returns a |
Inherited methods |
||
|---|---|---|
|
||
Public constructors
SeparableConvolution
public SeparableConvolution()
Creates an instance with scaleWidth and scaleHeight set to 1.0f.
SeparableConvolution
public SeparableConvolution(float scaleWidth, float scaleHeight)
Creates an instance.
| Parameters | |
|---|---|
float scaleWidth |
The scaling factor used to determine the width of the output relative to the input. |
float scaleHeight |
The scaling factor used to determine the height of the output relative to the input. |
Public methods
getConvolution
public abstract ConvolutionFunction1D getConvolution(long presentationTimeUs)
Returns a 1D convolution function.
| Parameters | |
|---|---|
long presentationTimeUs |
The presentation timestamp of the input frame, in microseconds. |
toGlShaderProgram
public GlShaderProgram 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 |