Skip to content
Permalink
Browse files

Added `shikigva=128` (repurposed) property to use hardware decoder fo…

…r FairPlay 1.0 (can be used as `shikigva=144`)

It seems that AMD decoder fails to decode iTunes trailers with FairPlay, so we have to use software decoding as usual.
Since older AMD GPUs were definitely able to do this, most likely this issue is GPU-dependent, thus separate this
option in two.
  • Loading branch information
vit9696 committed Nov 21, 2019
1 parent 7d30dd8 commit f92808088515101c914764ac4b8c2941bd93811d
Showing with 11 additions and 5 deletions.
  1. +1 −0 Changelog.md
  2. +8 −5 WhateverGreen/kern_shiki.cpp
  3. +2 −0 WhateverGreen/kern_shiki.hpp
@@ -11,6 +11,7 @@ WhateverGreen Changelog
- Added `applbkl-name` and `applbkl-data` IORegistry data keys to provide custom backlight data
- Fixed applying CoreFP patches on Apple firmware, when they are not needed
- Added `shikigva=16` (repurposed) property to use AMD hardware DRM decoder in select apps
- Added `shikigva=128` (repurposed) property to use hardware decoder for FairPlay 1.0 (can be used as `shikigva=144`)

#### v1.3.4
- Added support for disabled AppleGraphicsDevicePolicy in AMD drivers on 10.15.1
@@ -56,6 +56,7 @@ void SHIKI::processKernel(KernelPatcher &patcher, DeviceInfo *info) {
bool replaceBoardID = false;
bool unlockFP10Streaming = false;
bool useHwDrmDecoder = false;
bool useLegacyHwDrmDecoder = false;

cpuGeneration = CPUInfo::getGeneration();

@@ -95,6 +96,7 @@ void SHIKI::processKernel(KernelPatcher &patcher, DeviceInfo *info) {
useHwDrmDecoder = bootarg & UseHwDrmDecoder;
replaceBoardID = bootarg & ReplaceBoardID;
unlockFP10Streaming = bootarg & UnlockFP10Streaming;
useLegacyHwDrmDecoder = bootarg & UseLegacyHwDrmDecoder;

if (useHwDrmDecoder && (replaceBoardID || addExecutableWhitelist))
PANIC("shiki", "Hardware DRM decoder cannot be used with custom board or whitelist");
@@ -121,13 +123,14 @@ void SHIKI::processKernel(KernelPatcher &patcher, DeviceInfo *info) {
forceOnlineRenderer, allowNonBGRA, forceCompatibleRenderer, addExecutableWhitelist, replaceBoardID,
unlockFP10Streaming, useHwDrmDecoder);

if (useHwDrmDecoder) {
// We do not need NDRMI patches for AMD hardware decoder.
// Disable hardware decoder patches when unused
if (!useHwDrmDecoder)
disableSection(SectionHWDRMID);

// We do not need NDRMI patches when legacy hardware decoder works.
if (useLegacyHwDrmDecoder) {
disableSection(SectionNDRMI);
disableSection(SectionFCPUID);
} else {
// Otherwise we do not want hardware decoder.
disableSection(SectionHWDRMID);
}

// Disable unused sections
@@ -73,6 +73,8 @@ class SHIKI {
// similar to the one found in iTunes. Newer streaming services require FairPlay 2.0, which is hardware-only,
// so nothing could be done about them.
UnlockFP10Streaming = 64,
// Disables software decoder unlock patches for FairPlay 1.0.
UseLegacyHwDrmDecoder = 128
};

/**

0 comments on commit f928080

Please sign in to comment.
You can’t perform that action at this time.