# GaussianBlurWithFrameOverlaid

Artifact: [androidx.media3:media3-effect](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/effect/GaussianBlurWithFrameOverlaid.java+class:androidx.media3.effect.GaussianBlurWithFrameOverlaid)

*** ** * ** ***


```
@UnstableApi
public final class GaussianBlurWithFrameOverlaid extends SeparableConvolution
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.media3.effect.SeparableConvolution](https://developer.android.com/reference/androidx/media3/effect/SeparableConvolution) ||
|   | ↳ | [androidx.media3.effect.GaussianBlurWithFrameOverlaid](https://developer.android.com/reference/androidx/media3/effect/GaussianBlurWithFrameOverlaid) |

*** ** * ** ***

A `https://developer.android.com/reference/androidx/media3/effect/SeparableConvolution` to apply a Gaussian blur on image data.

The width of the blur is specified in pixels and applied symmetrically.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/effect/GaussianBlurWithFrameOverlaid#GaussianBlurWithFrameOverlaid(float,float,float)( float sigma, float scaleSharpX, float scaleSharpY )` Creates an instance with `numStandardDeviations` set to `2.0f`. |
| `https://developer.android.com/reference/androidx/media3/effect/GaussianBlurWithFrameOverlaid#GaussianBlurWithFrameOverlaid(float,float,float,float)( @https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false) float sigma, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false) float numStandardDeviations, float scaleSharpX, float scaleSharpY )` Creates an instance. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/effect/ConvolutionFunction1D` | `https://developer.android.com/reference/androidx/media3/effect/GaussianBlurWithFrameOverlaid#getConvolution(long)(long presentationTimeUs)` Returns a `https://developer.android.com/reference/androidx/media3/effect/ConvolutionFunction1D`. |
| `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` | `https://developer.android.com/reference/androidx/media3/effect/GaussianBlurWithFrameOverlaid#toGlShaderProgram(android.content.Context,boolean)(https://developer.android.com/reference/android/content/Context.html context, boolean useHdr)` Returns a `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` that applies the effect. |

| ### Inherited methods |
|---|
| From [androidx.media3.common.Effect](https://developer.android.com/reference/androidx/media3/common/Effect) |---|---| | `long` | `https://developer.android.com/reference/androidx/media3/common/Effect#getDurationAfterEffectApplied(long)(long durationUs)` Returns the expected duration of the output stream when the effect is applied given a input `durationUs`. | |
| From [androidx.media3.effect.GlEffect](https://developer.android.com/reference/androidx/media3/effect/GlEffect) |---|---| | `boolean` | `https://developer.android.com/reference/androidx/media3/effect/GlEffect#isNoOp(int,int)(int inputWidth, int inputHeight)` Returns whether a `https://developer.android.com/reference/androidx/media3/effect/GlEffect` applies no change at every timestamp. | |

## Public constructors

### GaussianBlurWithFrameOverlaid

```
public GaussianBlurWithFrameOverlaid(
    float sigma,
    float scaleSharpX,
    float scaleSharpY
)
```

Creates an instance with `numStandardDeviations` set to `2.0f`.

| Parameters |
|---|---|
| `float sigma` | The half-width of 1 standard deviation, in pixels. |
| `float scaleSharpX` | The scaling factor used to determine the size of the sharp image in the output frame relative to the whole output frame in the horizontal direction. |
| `float scaleSharpY` | The scaling factor used to determine the size of the sharp image in the output frame relative to the whole output frame in the vertical direction. |

### GaussianBlurWithFrameOverlaid

```
public GaussianBlurWithFrameOverlaid(
    @FloatRange(from = 0.0, fromInclusive = false) float sigma,
    @FloatRange(from = 0.0, fromInclusive = false) float numStandardDeviations,
    float scaleSharpX,
    float scaleSharpY
)
```

Creates an instance.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false) float sigma` | The half-width of 1 standard deviation, in pixels. |
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, fromInclusive = false) float numStandardDeviations` | The size of function domain, measured in the number of standard deviations. |
| `float scaleSharpX` | The scaling factor used to determine the size of the sharp image in the output frame relative to the whole output frame in the horizontal direction. |
| `float scaleSharpY` | The scaling factor used to determine the size of the sharp image in the output frame relative to the whole output frame in the vertical direction. |

## Public methods

### getConvolution

```
public ConvolutionFunction1D getConvolution(long presentationTimeUs)
```

Returns a `https://developer.android.com/reference/androidx/media3/effect/ConvolutionFunction1D`.

| Parameters |
|---|---|
| `long presentationTimeUs` | The presentation timestamp of the input frame, in microseconds. |

### toGlShaderProgram

```
public GlShaderProgram toGlShaderProgram(Context context, boolean useHdr)
```

Returns a `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` that applies the effect.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/content/Context.html context` | A `https://developer.android.com/reference/android/content/Context.html`. |
| `boolean useHdr` | Whether input textures come from an HDR source. If `true`, colors will be in linear RGB BT.2020. If `false`, colors will be in linear RGB BT.709. |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessingException` | If an error occurs while creating the `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram`. |