Only enable RFI at resolutions at or below 1080p due to bugs

This commit is contained in:
Cameron Gutman 2022-09-28 17:59:18 -05:00
parent 842b6b3c76
commit f99381df81

View File

@ -436,15 +436,17 @@ void ClSetHdrMode(bool enabled)
_drCallbacks.start = DrStart;
_drCallbacks.stop = DrStop;
_drCallbacks.capabilities = CAPABILITY_PULL_RENDERER;
#if !TARGET_OS_TV
// RFI doesn't work properly with HEVC on iOS 11 with an iPhone SE (at least)
// It doesnt work on macOS either, tested with Network Link Conditioner.
// RFI seems to be broken at all resolutions on the Apple TV 4K (1st gen)
// on tvOS 14.5.
_drCallbacks.capabilities =
#if !TARGET_OS_TV
CAPABILITY_REFERENCE_FRAME_INVALIDATION_AVC |
// on tvOS 14.5 and above resolutions around 1080p on recent GFE versions.
if (config.width * config.height <= 1920 * 1080) {
_drCallbacks.capabilities |= CAPABILITY_REFERENCE_FRAME_INVALIDATION_AVC;
}
#endif
CAPABILITY_PULL_RENDERER;
LiInitializeAudioCallbacks(&_arCallbacks);
_arCallbacks.init = ArInit;