From 1dfbd0de5073ec9f787dbf7f28b2c372ed0c9777 Mon Sep 17 00:00:00 2001 From: huangdarwin Date: Thu, 26 Jan 2023 11:20:12 +0000 Subject: [PATCH] Effect: Clarify that padding is added in ScaleToFitTransformation. PiperOrigin-RevId: 504796380 --- .../android/exoplayer2/effect/GlMatrixTransformation.java | 2 +- .../android/exoplayer2/effect/ScaleToFitTransformation.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/effect/src/main/java/com/google/android/exoplayer2/effect/GlMatrixTransformation.java b/library/effect/src/main/java/com/google/android/exoplayer2/effect/GlMatrixTransformation.java index 7acb47c8bc..c2819818d7 100644 --- a/library/effect/src/main/java/com/google/android/exoplayer2/effect/GlMatrixTransformation.java +++ b/library/effect/src/main/java/com/google/android/exoplayer2/effect/GlMatrixTransformation.java @@ -22,7 +22,7 @@ import com.google.android.exoplayer2.util.Size; import com.google.common.collect.ImmutableList; /** - * Specifies a 4x4 transformation {@link Matrix} to apply in the vertex shader for each frame. + * Specifies a 4x4 transformation {@link Matrix} to apply in the vertex shader for each input frame. * *

The matrix is applied to points given in normalized device coordinates (-1 to 1 on x, y, and z * axes). Transformed pixels that are moved outside of the normal device coordinate range are diff --git a/library/effect/src/main/java/com/google/android/exoplayer2/effect/ScaleToFitTransformation.java b/library/effect/src/main/java/com/google/android/exoplayer2/effect/ScaleToFitTransformation.java index e62892acfc..f7a34f89b3 100644 --- a/library/effect/src/main/java/com/google/android/exoplayer2/effect/ScaleToFitTransformation.java +++ b/library/effect/src/main/java/com/google/android/exoplayer2/effect/ScaleToFitTransformation.java @@ -72,9 +72,9 @@ public final class ScaleToFitTransformation implements MatrixTransformation { * *

The default value, 0, corresponds to not applying any rotation. * - *

The output frame's width and height are automatically adjusted to preserve all input - * pixels. The rotated input frame is fitted inside an enclosing black rectangle if its edges - * aren't parallel to the x and y axes. + *

The output frame's width and height are adjusted to preserve all input pixels. The rotated + * input frame is fitted inside an enclosing black rectangle if its edges aren't parallel to the + * x and y axes, to form the output frame. * * @param rotationDegrees The counterclockwise rotation, in degrees. * @return This builder.