Skip to content

Commit

Permalink
Add workaround for wrong PerformancePoints on some devices.
Browse files Browse the repository at this point in the history
Some devices were reported to have wrong PerformancePoint sets
that cause 60 fps to be marked as unsupported even though they
are supported.

Issue: google/ExoPlayer#10898

#minor-release

PiperOrigin-RevId: 512580395
  • Loading branch information
tonihei committed Feb 27, 2023
1 parent 7ffcc6f commit d0cbf0f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
* Video:
* Map HEVC HDR10 format to `HEVCProfileMain10HDR10` instead of
`HEVCProfileMain10`.
* Add workaround for a device issue on Chromecast with Google TV and
Lenovo M10 FHD Plus that causes 60fps AVC streams to be marked as
unsupported
([#10898](https://github.com/google/ExoPlayer/issues/10898)).
* DASH:
* Add full parsing for image adaptation sets, including tile counts
([#3752](https://github.com/google/ExoPlayer/issues/3752)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ private static boolean needsAdaptationFlushWorkaround(String mimeType) {
* @param name The name of the codec.
* @return Whether to enable the workaround.
*/
private static final boolean needsRotatedVerticalResolutionWorkaround(String name) {
private static boolean needsRotatedVerticalResolutionWorkaround(String name) {
if ("OMX.MTK.VIDEO.DECODER.HEVC".equals(name) && "mcv5a".equals(Util.DEVICE)) {
// See https://github.com/google/ExoPlayer/issues/6612.
return false;
Expand All @@ -876,6 +876,17 @@ private static boolean needsProfileExcludedWorkaround(String mimeType, int profi
&& ("sailfish".equals(Util.DEVICE) || "marlin".equals(Util.DEVICE));
}

/** Whether the device is known to have wrong {@link PerformancePoint} declarations. */
private static boolean needsIgnorePerformancePointsWorkaround() {
// See https://github.com/google/ExoPlayer/issues/10898 and [internal ref: b/267324685].
return /* Chromecast with Google TV */ Util.DEVICE.equals("sabrina")
|| Util.DEVICE.equals("boreal")
/* Lenovo Tablet M10 FHD Plus */
|| Util.MODEL.startsWith("Lenovo TB-X605")
|| Util.MODEL.startsWith("Lenovo TB-X606")
|| Util.MODEL.startsWith("Lenovo TB-X616");
}

/** Possible outcomes of evaluating PerformancePoint coverage */
@Documented
@Retention(RetentionPolicy.SOURCE)
Expand All @@ -900,7 +911,9 @@ private static final class Api29 {
VideoCapabilities videoCapabilities, int width, int height, double frameRate) {
List<PerformancePoint> performancePointList =
videoCapabilities.getSupportedPerformancePoints();
if (performancePointList == null || performancePointList.isEmpty()) {
if (performancePointList == null
|| performancePointList.isEmpty()
|| needsIgnorePerformancePointsWorkaround()) {
return COVERAGE_RESULT_NO_EMPTY_LIST;
}

Expand Down

0 comments on commit d0cbf0f

Please sign in to comment.