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

Video: Enable threads for video decoding #9484

Merged
merged 1 commit into from
Mar 23, 2017

Conversation

unknownbrackets
Copy link
Collaborator

@unknownbrackets unknownbrackets commented Mar 23, 2017

Narrowing it down to #8867 really helped. This was previously getting (accidentally?) enabled by the call to avformat_find_stream_info(). We skip that now, so threads seem to be disabled. It's definitely using threads before that change.

Weirdly, all that function seems to do related to threads is to disable them for a separate, temporary codec used to detect things about the streams. Maybe there's some global state that's changed.

See #9262 - this fixes it for me, but want to let @zminhquanz confirm.

Also worth noting: we only call avformat_find_stream_info() here. I'm not sure if Atrac/PMP/recording/etc. might benefit from a similar change.

-[Unknown]

This was previously getting (accidentally?) enabled by the call to
`avformat_find_stream_info()`.  See hrydgard#9262.
@hrydgard
Copy link
Owner

hrydgard commented Mar 23, 2017

Wait, so setting "threads" to "0" helped? That seems like the opposite of what you'd want...

Oh, no, I'm wrong. "0" means "optimal" while "1" would have forced it to be single-threaded.

@hrydgard hrydgard merged commit 9e78e68 into hrydgard:master Mar 23, 2017
@hrydgard
Copy link
Owner

And yeah, it might make sense to set this for the other ways we use ffmpeg too...

@unknownbrackets unknownbrackets deleted the ffmpeg-threads branch March 23, 2017 14:06
@unknownbrackets
Copy link
Collaborator Author

I tried it for atrac, it doesn't seem like it uses any threads anyway.

-[Unknown]

@hrydgard
Copy link
Owner

Alright, well, we could do atrac on a thread on our own, similarly to sceSas I suppose, though not sure it's worth the trouble.

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