Enable experimentalAdjustSurfaceTextureTransformationMatrix
PiperOrigin-RevId: 655231134
This commit is contained in:
parent
2793ba845e
commit
9a42d03466
@ -60,6 +60,10 @@
|
||||
([#3757](https://github.com/google/ExoPlayer/issues/3757)).
|
||||
* DRM:
|
||||
* Effect:
|
||||
* Add `DefaultVideoFrameProcessor` workaround for minor `SurfaceTexture`
|
||||
scaling. `SurfaceTexture` may include a small scaling that cuts off a
|
||||
1-texel border around the edge of a cropped buffer. This is now handled
|
||||
such that output is closer to expected.
|
||||
* Muxers:
|
||||
* IMA extension:
|
||||
* Fix bug where clearing the playlist may cause an
|
||||
|
@ -159,6 +159,7 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
|
||||
public Builder() {
|
||||
sdrWorkingColorSpace = WORKING_COLOR_SPACE_DEFAULT;
|
||||
requireRegisteringAllInputFrames = true;
|
||||
experimentalAdjustSurfaceTextureTransformationMatrix = true;
|
||||
}
|
||||
|
||||
private Builder(Factory factory) {
|
||||
@ -287,8 +288,13 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
|
||||
*
|
||||
* <p>When set, programs sampling GL_TEXTURE_EXTERNAL_OES from {@link SurfaceTexture} must not
|
||||
* attempt to access data in any cropped region, including via GL_LINEAR resampling filter.
|
||||
*
|
||||
* <p>Defaults to {@code true}.
|
||||
*
|
||||
* @deprecated This experimental method will be removed in a future release.
|
||||
*/
|
||||
@CanIgnoreReturnValue
|
||||
@Deprecated
|
||||
public Builder setExperimentalAdjustSurfaceTextureTransformationMatrix(
|
||||
boolean experimentalAdjustSurfaceTextureTransformationMatrix) {
|
||||
this.experimentalAdjustSurfaceTextureTransformationMatrix =
|
||||
|
@ -31,7 +31,6 @@ import androidx.media3.common.Effect;
|
||||
import androidx.media3.common.MediaItem;
|
||||
import androidx.media3.common.util.Clock;
|
||||
import androidx.media3.common.util.Util;
|
||||
import androidx.media3.effect.DefaultVideoFrameProcessor;
|
||||
import androidx.media3.effect.Presentation;
|
||||
import androidx.media3.exoplayer.mediacodec.MediaCodecInfo;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@ -209,9 +208,8 @@ public final class SequenceEffectTestUtil {
|
||||
/**
|
||||
* Creates a high quality {@link Transformer} instance.
|
||||
*
|
||||
* <p>The {@link Transformer} is configured to select a specific decoder, use experimental
|
||||
* high-quality {@link DefaultVideoFrameProcessor} configuration, and a large value for {@link
|
||||
* VideoEncoderSettings#bitrate}.
|
||||
* <p>The {@link Transformer} is configured to select a specific decoder and a large value for
|
||||
* {@link VideoEncoderSettings#bitrate}.
|
||||
*/
|
||||
public static Transformer createHqTransformer(
|
||||
Context context, MediaCodecInfo decoderMediaCodecInfo) {
|
||||
@ -223,10 +221,6 @@ public final class SequenceEffectTestUtil {
|
||||
.build();
|
||||
AssetLoader.Factory assetLoaderFactory =
|
||||
new DefaultAssetLoaderFactory(context, decoderFactory, Clock.DEFAULT);
|
||||
DefaultVideoFrameProcessor.Factory videoFrameProcessorFactory =
|
||||
new DefaultVideoFrameProcessor.Factory.Builder()
|
||||
.setExperimentalAdjustSurfaceTextureTransformationMatrix(true)
|
||||
.build();
|
||||
Codec.EncoderFactory encoderFactory =
|
||||
new DefaultEncoderFactory.Builder(context)
|
||||
.setRequestedVideoEncoderSettings(
|
||||
@ -234,7 +228,6 @@ public final class SequenceEffectTestUtil {
|
||||
.build();
|
||||
return new Transformer.Builder(context)
|
||||
.setAssetLoaderFactory(assetLoaderFactory)
|
||||
.setVideoFrameProcessorFactory(videoFrameProcessorFactory)
|
||||
.setEncoderFactory(new AndroidTestUtil.ForceEncodeEncoderFactory(encoderFactory))
|
||||
.build();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user