Break out the Atrac3/Atrac3+ decoders from FFMPEG to a separate library#19033
Merged
Break out the Atrac3/Atrac3+ decoders from FFMPEG to a separate library#19033
Conversation
This reverts commit 14222f5.
c4be2f7 to
6ee008a
Compare
Owner
Author
|
Noticed a crash in crisis core, converting to draft. |
Buildfix UWP buildfix libretro buildfix
a0bd924 to
58cb2ba
Compare
Collaborator
|
Is the same planned to encoders?(Recording feature) |
Owner
Author
|
Encoders no, I think we'll still gonna use ffmpeg for that, or OS-native encoders - or remove encoding and leave it to OBS, although there are some arguments that we shouldn't - no decision there. There's nothing to stop us from still linking ffmpeg just for encoding features. And yes, getting rid of bugs and bug reports caused by weird combinations of system ffmpegs is definitely a big goal! But the biggest goal is to make debugging and working on decoder stuff easier. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Followup to #19026
I grabbed a chunk of ffmpeg, then pared it down to only contain the decoders themselves, plus some math utils and stuff.
This I put in /ext/at3_standalone, and it's exposed by a very simple interface in /ext/at3_standalone/at3_decoders.h
Also, we now use this instead of FFMPEG for decoding music in the menu, and wherever SimpleDecoder was previously used for AT3 playback (sceAudiocodec, MediaEngine video playback).
It's not yet used for background music in-game, porting sceAtrac to use this instead of ffmpeg will be a bigger job. But worthwhile, since we'll be able to debug much easier now.
This is one more step towards getting rid of our huge pre-built FFMPEG as a dependency. Much work remains. Also this isn't yet using SIMD so might be slightly slower than the ffmpeg build.
EDIT: Profiled a little bit, it's not really substantially slower. The functions
decode_qu_spectraandff_atrac3p_ipqfare the hotspot and the former is a huffman decoder, so not very easy to optimize. The latter though is very SIMD-able.