Add vendor low latency option for Exynos

This commit is contained in:
Cameron Gutman 2021-04-18 14:17:26 -05:00
parent 699cc361a2
commit fc5495f1ec

View File

@ -41,6 +41,7 @@ public class MediaCodecHelper {
private static final List<String> blacklisted59FpsDecoderPrefixes;
private static final List<String> qualcommDecoderPrefixes;
private static final List<String> kirinDecoderPrefixes;
private static final List<String> exynosDecoderPrefixes;
public static final boolean IS_EMULATOR = Build.HARDWARE.equals("ranchu") || Build.HARDWARE.equals("cheets");
@ -214,6 +215,12 @@ public class MediaCodecHelper {
kirinDecoderPrefixes.add("omx.hisi");
}
static {
exynosDecoderPrefixes = new LinkedList<>();
exynosDecoderPrefixes.add("omx.exynos");
}
private static boolean isPowerVR(String glRenderer) {
return glRenderer.toLowerCase().contains("powervr");
}
@ -416,6 +423,10 @@ public class MediaCodecHelper {
videoFormat.setInteger("vendor.hisi-ext-low-latency-video-dec.video-scene-for-low-latency-req", 1);
videoFormat.setInteger("vendor.hisi-ext-low-latency-video-dec.video-scene-for-low-latency-rdy", -1);
}
else if (isDecoderInList(exynosDecoderPrefixes, decoderInfo.getName())) {
// Exynos low latency option (I think...)
videoFormat.setInteger("vendor.rtc-ext-dec-low-latency.enable", 1);
}
}
else if (isDecoderInList(qualcommDecoderPrefixes, decoderInfo.getName())) {
// This is an older low latency option used on some Qualcomm devices