From 6e8a5f78ddc7652f6e03db3aa9f6a8681f617e58 Mon Sep 17 00:00:00 2001 From: andrewlewis Date: Thu, 21 Feb 2019 11:51:45 +0000 Subject: [PATCH] Automated g4 rollback of changelist 230206675. *** Reason for rollback *** Reverting as this may break playback on other Amlogic devices and/or playback of non-interlaced content. *** Original change description *** Add max video size workaround for Amlogic decoder. The Amlogic awesome decoder reduces the video size of interlaced videos by half if the internal configuration isn't force reset with new maximum input size values. The product of these new values must exceed 1920x1088 to force the reset. Issue:#5003 *** PiperOrigin-RevId: 234967314 --- RELEASENOTES.md | 3 +++ .../video/MediaCodecVideoRenderer.java | 16 ---------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index ea662be8acd..6c87dd02b4b 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -19,6 +19,9 @@ ([#5490](https://github.com/google/ExoPlayer/issues/5490)). * HLS: Fix transition to STATE_ENDED when playing fragmented mp4 in chunkless preparation ([#5524](https://github.com/google/ExoPlayer/issues/5524)). +* Revert workaround for video quality problems with Amlogic decoders, as this + may cause problems for some devices and/or non-interlaced content + ([#5003](https://github.com/google/ExoPlayer/issues/5003)). ### 2.9.5 ### diff --git a/library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java b/library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java index 5b35ee946aa..3e262a567d4 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java @@ -1087,10 +1087,6 @@ protected CodecMaxValues getCodecMaxValues( throws DecoderQueryException { int maxWidth = format.width; int maxHeight = format.height; - if (codecNeedsMaxVideoSizeResetWorkaround(codecInfo.name)) { - maxWidth = Math.max(maxWidth, 1920); - maxHeight = Math.max(maxHeight, 1089); - } int maxInputSize = getMaxInputSize(codecInfo, format); if (streamFormats.length == 1) { // The single entry in streamFormats must correspond to the format for which the codec is @@ -1278,18 +1274,6 @@ private static boolean deviceNeedsNoPostProcessWorkaround() { return "NVIDIA".equals(Util.MANUFACTURER); } - /** - * Returns whether the codec is known to have problems with the configuration for interlaced - * content and needs minimum values for the maximum video size to force reset the configuration. - * - *

See https://github.com/google/ExoPlayer/issues/5003. - * - * @param name The name of the codec. - */ - private static boolean codecNeedsMaxVideoSizeResetWorkaround(String name) { - return "OMX.amlogic.avc.decoder.awesome".equals(name) && Util.SDK_INT <= 25; - } - /* * TODO: *