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
This commit is contained in:
andrewlewis 2019-02-21 11:51:45 +00:00 committed by Andrew Lewis
parent 6b4c48a329
commit 8746d4a885
2 changed files with 3 additions and 16 deletions

View File

@ -80,6 +80,9 @@
([#5490](https://github.com/google/ExoPlayer/issues/5490)). ([#5490](https://github.com/google/ExoPlayer/issues/5490)).
* HLS: Fix transition to STATE_ENDED when playing fragmented mp4 in chunkless * HLS: Fix transition to STATE_ENDED when playing fragmented mp4 in chunkless
preparation ([#5524](https://github.com/google/ExoPlayer/issues/5524)). 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 ### ### 2.9.5 ###

View File

@ -1105,10 +1105,6 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
throws DecoderQueryException { throws DecoderQueryException {
int maxWidth = format.width; int maxWidth = format.width;
int maxHeight = format.height; int maxHeight = format.height;
if (codecNeedsMaxVideoSizeResetWorkaround(codecInfo.name)) {
maxWidth = Math.max(maxWidth, 1920);
maxHeight = Math.max(maxHeight, 1089);
}
int maxInputSize = getMaxInputSize(codecInfo, format); int maxInputSize = getMaxInputSize(codecInfo, format);
if (streamFormats.length == 1) { if (streamFormats.length == 1) {
// The single entry in streamFormats must correspond to the format for which the codec is // The single entry in streamFormats must correspond to the format for which the codec is
@ -1296,18 +1292,6 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
return "NVIDIA".equals(Util.MANUFACTURER); 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.
*
* <p>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: * TODO:
* *