DXVA2: adjust memory limit for 4K decoding from 3000 MB to 2960 MB #18980
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Motivation and Context
Try to improve some situations where the hardware is at the limit to be able or not to use DXVA2 HEVC 4K decoding:
See https://forum.kodi.tv/showthread.php?tid=359216 This system has really 3 GB video memory: 2 GB dedicated (GT 1030) 1 GB shared (only 2GB system RAM).... number reported is 2989 MB and should be considered 3 GB.
See https://forum.kodi.tv/showthread.php?tid=359247 This system has only 4 GB RAM and no dedicated video memory and Celeron J3455 has not power enough for SW HEVC decoding. The only possibility is limiting decoder surfaces to 16 as Intel video driver does not use additional refs by CPU cores and HEVC files never has more than 8 refs frames. Maybe on other cases does not work but is better that nothing (SW on 4K).
These changes are safe to merge because on more habitual systems (+3 GB video memory or +4 GB RAM) nothing changes.
How Has This Been Tested?
Tested on ASUS ZenBook UX305UA (4 GB RAM, Intel HD graphics 520) limiting decoder surfaces to 16 works pretty well on this system and able to use DXVA2 HEVC 4K decoding. Only observed some green glitch when seek to random point and it normalizes after a few seconds playing.
Waiting feedback from forum users....
Screenshots (if appropriate):
Types of change
Checklist: