summaryrefslogtreecommitdiff
path: root/libavcodec/opus_celt.h
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/opus: Move defines to better placesAndreas Rheinhardt2022-10-051-2/+8
| | | | | | | | | Move ROUND_MUL* macros to their only users and the Celt macros to opus_celt.h. Also improve the other headers a bit while at it. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/opus: Move remaining celt declarations to opus_celt.hAndreas Rheinhardt2022-10-051-3/+10
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/opus_celt, opus_pvq: Move CeltPVQ typedef to opus_pvq.hAndreas Rheinhardt2022-10-051-3/+1
| | | | | | | It is more natural that way. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/opus_celt: Break cyclic inlusion of opus_celt.h<->opus_pvq.hAndreas Rheinhardt2022-10-051-1/+0
| | | | | | | | Simply don't include opus_pvq.h in opus_celt.h: The latter only uses pointers to CeltPVQ. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* opus: convert encoder and decoder to lavu/txLynne2022-09-261-2/+3
| | | | | This commit changes both the encoder and decoder to use the new lavu/tx code, which has faster C transforms and more assembly optimizations.
* lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov2021-01-011-0/+1
| | | | They are not properly namespaced and not intended for public use.
* opusdsp: create and move deemphasis and postfiltering from opus_celtLynne2019-04-011-1/+2
|
* opus: add an option to toggle intensity stereo phase inversionRostislav Pehlivanov2017-12-041-1/+3
| | | | | | | | | Due to a somewhat high volume of complains, phase inversion has been made optional with RFC8251. This allows for better bass frequency response when partially downmixing to play on systems with an LFE speaker. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opusenc: implement a psychoacoustic systemRostislav Pehlivanov2017-09-231-0/+6
| | | | | | | | | | | | | | This commit implements a psychoacoustic system for the native Opus encoder. Its unlike any other psychoacoustic system known since its capable of using a lookahead to make better choices on how to treat the current frame and how many bits to allocate for it (and future frames). Also, whilst the main bulk of the analysis function has to run in a single thread, the per-frame anaylsis functions does not modify the main psychoacoustic context, so in the future it will be fairly trivial to run those as slice threads. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opusenc: use float_dsp for transient mdctsRostislav Pehlivanov2017-07-131-2/+2
| | | | | | vector_fmul_reverse requires padding the window at the front Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus_pvq: port to allow for SIMD functionsRostislav Pehlivanov2017-05-161-2/+4
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opusenc: switch between intra/inter mode for coarse energyRostislav Pehlivanov2017-04-081-1/+0
| | | | | | Saves around 5kbps. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opusenc: remove unused header entries and simplify normalizationRostislav Pehlivanov2017-04-081-3/+0
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus: add a native Opus encoderRostislav Pehlivanov2017-02-141-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This marks the first time anyone has written an Opus encoder without using any libopus code. The aim of the encoder is to prove how far the format can go by writing the craziest encoder for it. Right now the encoder's basic, it only supports CBR encoding, however internally every single feature the CELT layer has is implemented (except the pitch pre-filter which needs to work well with the rest of whatever gets implemented). Psychoacoustic and rate control systems are under development. The encoder takes in frames of 120 samples and depending on the value of opus_delay the plan is to use the extra buffered frames as lookahead. Right now the encoder will pick the nearest largest legal frame size and won't use the lookahead, but that'll change once there's a psychoacoustic system. Even though its a pretty basic encoder its already outperforming any other native encoder FFmpeg has by a huge amount. The PVQ search algorithm is faster and more accurate than libopus's algorithm so the encoder's performance is close to that of libopus at zero complexity (libopus has more SIMD). The algorithm might be ported to libopus or other codecs using PVQ in the future. The encoder still has a few minor bugs, like desyncs at ultra low bitrates (below 9kbps with 20ms frames). Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus_celt: rename structures to better names and reorganize themRostislav Pehlivanov2017-02-141-37/+52
| | | | | | | | | | | | | | | | | | | | This is meant to be applied on top of my previous patch which split PVQ into celt_pvq.c and made opus_celt.h Essentially nothing has been changed other than renaming CeltFrame to CeltBlock (CeltFrame had absolutely nothing at all to do with a frame) and CeltContext to CeltFrame. 3 variables have been put in CeltFrame as they make more sense there rather than being passed around as arguments. The coefficients have been moved to the CeltBlock structure (why the hell were they in CeltContext and not in CeltFrame??). Now the encoder would be able to use the exact context the decoder uses (plus a couple of extra fields in there). FATE passes, no slowdowns, etc. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus_celt: move quantization and band decoding to opus_pvq.cRostislav Pehlivanov2017-02-141-0/+133
A huge amount can be reused by the encoder, as the only thing which needs to be done would be to add a 10 line celt_icwrsi, a wrapper around it (celt_alg_quant) and templating the ff_celt_decode_band to replace entropy decoding functions with entropy encoding. There is no performance loss but in fact a performance gain of around 6% which is caused by the compiler being able to optimize the decoding more efficiently. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>