Enable HEVC RFI on Fire TV and Chromecast devices

This commit is contained in:
Cameron Gutman
2022-10-12 21:50:40 -05:00
parent 1076b516d6
commit 3ea2aa1f74

View File

@@ -77,6 +77,12 @@ public class MediaCodecHelper {
refFrameInvalidationHevcPrefixes.add("omx.exynos"); refFrameInvalidationHevcPrefixes.add("omx.exynos");
refFrameInvalidationHevcPrefixes.add("c2.exynos"); refFrameInvalidationHevcPrefixes.add("c2.exynos");
// The Chromecast with Google TV 4K works well with HEVC RFI since we also use the
// vendor.low-latency.enable option.
if (Build.DEVICE.equalsIgnoreCase("sabrina")) {
refFrameInvalidationHevcPrefixes.add("omx.amlogic");
}
// Qualcomm and NVIDIA may be added at runtime // Qualcomm and NVIDIA may be added at runtime
} }
@@ -312,11 +318,13 @@ public class MediaCodecHelper {
if (context.getPackageManager().hasSystemFeature("amazon.hardware.fire_tv") || if (context.getPackageManager().hasSystemFeature("amazon.hardware.fire_tv") ||
Build.MANUFACTURER.equalsIgnoreCase("Amazon")) { Build.MANUFACTURER.equalsIgnoreCase("Amazon")) {
whitelistedHevcDecoders.add("omx.mtk"); whitelistedHevcDecoders.add("omx.mtk");
refFrameInvalidationHevcPrefixes.add("omx.mtk");
// This requires setting vdec-lowlatency on the Fire TV 3, otherwise the decoder // This requires setting vdec-lowlatency on the Fire TV 3, otherwise the decoder
// never produces any output frames. See comment above for details on why we only // never produces any output frames. See comment above for details on why we only
// do this for Fire TV devices. // do this for Fire TV devices.
whitelistedHevcDecoders.add("omx.amlogic"); whitelistedHevcDecoders.add("omx.amlogic");
refFrameInvalidationHevcPrefixes.add("omx.amlogic");
} }
ActivityManager activityManager = ActivityManager activityManager =