Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h264: Use asynchronous decoding when possible #1257

Merged
merged 3 commits into from
Jul 26, 2024

Conversation

Exzap
Copy link
Member

@Exzap Exzap commented Jul 15, 2024

By design h264.rpl exposes only a synchronous API where decoding only happens during H264DECExecute calls. However, if H264DEC runs in buffered mode we can use asynchronous decoding under the hood while still simulating a synchronous API on top of it. In most cases this lets us hide the latency of our software decoder which helps with games that are picky about decoding times.

Should help with #217

Marking this as draft for now since I still have to go through all the games with videos to make sure there are no regressions.

This allows us to hide the latency of the software decoder when operating in buffered mode which should help games that are picky about slow decoding times
@Adamillo
Copy link

Super Smash Bros For Wii U intro cutscene still gets easily stuck even with this PR

@Exzap
Copy link
Member Author

Exzap commented Jul 24, 2024

Thanks for testing this. Can you enable Debug -> CafeOS Modules logging -> h264 API and then upload log.txt after it freezes

@Adamillo
Copy link

log.txt

@Exzap
Copy link
Member Author

Exzap commented Jul 24, 2024

The good news is that from the log it looks like the PR is working and decoding times are very low. Bad news is that this means there are other factors outside the decoder itself that can trigger the freezes. Maybe slow file reading speed? I will do some digging when I get a chance

@Exzap Exzap marked this pull request as ready for review July 26, 2024 03:48
@Exzap Exzap merged commit f1685ea into cemu-project:main Jul 26, 2024
5 checks passed
@Exzap Exzap deleted the async-h264 branch August 7, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants