summaryrefslogtreecommitdiff
path: root/libavcodec/atrac9dec.c
Commit message (Collapse)AuthorAge
* atrac9dec: clean up code slightlyRostislav Pehlivanov2018-08-28
| | | | | | | Just remove some dead variable assignments, unneeded variables and change the FFMAX order to something more readable. Still identical. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* atrac9dec: implement LFE channel decodingRostislav Pehlivanov2018-08-27
| | | | | | | Much simpler than regular decoding, does allow for 5.1 and 7.1 streams to be decoded without desync. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* atrac9dec: relax gradient value requirementsRostislav Pehlivanov2018-08-27
| | | | | | | | Unlike the range, the gradient start value does not have to be lower than the end value. Does allow more files to be correctly decoded without errors. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* lavc: implement an ATRAC9 decoderRostislav Pehlivanov2018-07-03
This commit implements a full ATRAC9 decoder, a simple low-delay codec developed by Sony and used in most PSVita games, some PS3 games and some PS4 games. Its similar to AAC in that it uses Huffman coded scalefactors but instead of vector quantization it just Huffman codes the spectral coefficients (in a way similar to how Opus splits band energy coding into coarse and fine precision). It opts to write rather large Huffman codes by packing several small coefficients into one Huffman coded symbol, though I don't believe this increases efficiency at all. Band extension implements SBC in a simple way, first it mirrors the lower spectrum onto the higher frequencies and then it uses one of 5 filters to shape it. Noise substitution is implemented via 2 of them. Unlike previous ATRAC codecs, there's no QMF, this is a standard MDCT codec. Based off of the reverse engineering work of Alex Barney. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>