mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 03:23:07 +00:00
Revert "Blacklist the whole device from HEVC decoding if Qualcomm's HEVC hybrid decoder is found"
This reverts commit 3c2dd88fd38ab26d8a93f154ba63bb737d2d4c16.
This commit is contained in:
parent
1def825c7f
commit
ed8305b199
@ -29,7 +29,6 @@ public class MediaCodecHelper {
|
|||||||
private static final List<String> directSubmitPrefixes;
|
private static final List<String> directSubmitPrefixes;
|
||||||
private static final List<String> constrainedHighProfilePrefixes;
|
private static final List<String> constrainedHighProfilePrefixes;
|
||||||
private static final List<String> whitelistedHevcDecoders;
|
private static final List<String> whitelistedHevcDecoders;
|
||||||
private static final List<String> hevcDeviceBlacklistingDecoderPrefixes;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
directSubmitPrefixes = new LinkedList<String>();
|
directSubmitPrefixes = new LinkedList<String>();
|
||||||
@ -45,18 +44,6 @@ public class MediaCodecHelper {
|
|||||||
directSubmitPrefixes.add("omx.arc");
|
directSubmitPrefixes.add("omx.arc");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
|
||||||
// If we find these decoders present at all, we don't enable HEVC
|
|
||||||
hevcDeviceBlacklistingDecoderPrefixes = new LinkedList<>();
|
|
||||||
|
|
||||||
// This decoder appears on some Qualcomm devices prior to Snapdragon 805. It appears
|
|
||||||
// to be so broken that it crashes some devices or at best shows no video. On these devices
|
|
||||||
// Qualcomm thought they'd be clever and also expose omx.qcom.video.decoder.hevc (same as
|
|
||||||
// real hw acceleration SoCs like 805). As a result, we need to blacklist HEVC for ALL codecs
|
|
||||||
// if we see this codec in the list.
|
|
||||||
hevcDeviceBlacklistingDecoderPrefixes.add("omx.qcom.video.decoder.hevchybrid");
|
|
||||||
}
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
preferredDecoders = new LinkedList<String>();
|
preferredDecoders = new LinkedList<String>();
|
||||||
}
|
}
|
||||||
@ -176,11 +163,6 @@ public class MediaCodecHelper {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for indications that this device has a broken HEVC codec
|
|
||||||
if (deviceIsHevcBlacklisted()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return isDecoderInList(whitelistedHevcDecoders, decoderName);
|
return isDecoderInList(whitelistedHevcDecoders, decoderName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,18 +229,6 @@ public class MediaCodecHelper {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean deviceIsHevcBlacklisted() {
|
|
||||||
for (MediaCodecInfo codecInfo : getMediaCodecList()) {
|
|
||||||
// Check for device-blacklisting codecs
|
|
||||||
if (isDecoderInList(hevcDeviceBlacklistingDecoderPrefixes, codecInfo.getName())) {
|
|
||||||
LimeLog.info("Decoder blacklists HEVC on entire device! "+codecInfo.getName());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static MediaCodecInfo findFirstDecoder(String mimeType) {
|
public static MediaCodecInfo findFirstDecoder(String mimeType) {
|
||||||
for (MediaCodecInfo codecInfo : getMediaCodecList()) {
|
for (MediaCodecInfo codecInfo : getMediaCodecList()) {
|
||||||
// Skip encoders
|
// Skip encoders
|
||||||
|
Loading…
x
Reference in New Issue
Block a user