aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/opus.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/opus: Rename opus.c->opus_celt.c, opus_celt.c->opusdec_celt.cAndreas Rheinhardt2022-10-091-484/+0
| | | | | | | | | | Since commit 4fc2531fff112836026aad2bdaf128c9d15a72e3 opus.c contains only the celt stuff shared between decoder and encoder. meanwhile, opus_celt.c is decoder-only. So the new names reflect the actual content better than the current ones. 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-0/+1
| | | | | | | | 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>
* avcodec/opus: Move stuff shared by decoder and parser to a new fileAndreas Rheinhardt2022-10-051-442/+0
| | | | | | | | | | | | | | | | | opus.h (which is used by all the Opus code) currently includes several structures only used by the parser and the decoder; several elements of OpusContext are even only used by the decoder. This commit therefore moves the part of OpusContext that is shared between these two components (and used by ff_opus_parse_extradata()) out into a new structure and moves all the other accompanying structures and functions to a new header, opus_parse.h; the functions itself are also moved to a new file, opus_parse.c. (This also allows to remove several spurious dependencies of the Opus parser and encoder.) Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vorbis: Split data declarations out into new headerAndreas Rheinhardt2022-10-031-1/+1
| | | | | | | | | vorbis.h currently contains stuff only used by the native Vorbis codecs and some Vorbis tables, which are also used by Opus and libvorbis. Therefore split the data out into a header of its own. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/opus: always use ambisonic layout for mapping family 2James Almer2022-03-201-14/+3
| | | | | | | | | | | No need to use a Custom layout when the non diegetic channels can be described as a standard mask. This fixes: 45684/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-5039410989629440 Signed-off-by: James Almer <jamrial@gmail.com>
* opus: export mapping family 2 (Ambisonic) as Ambisonic layoutAnton Khirnov2022-03-151-3/+19
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* opus: convert to new channel layout APIAnton Khirnov2022-03-151-20/+37
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-201-1/+1
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-221-0/+1
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/opus: Reset alloc_trim when doing decoder bit-allocation.Carl Eugen Hoyos2020-05-021-0/+2
| | | | | Fixes ticket #8649. Reported-by: irc user Xogium
* avcodec/opus: check if internal is availablePaul B Mahol2018-11-281-1/+3
|
* avcodec/opus: set skip_samplesPaul B Mahol2018-11-281-1/+2
| | | | Also update fate test. Fixes #5258.
* avcodec/opus: Add {} over multiline if() bodyMichael Niedermayer2018-01-121-2/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* opus: merge encoder and decoder bitallocation functions into oneRostislav Pehlivanov2017-12-301-0/+348
| | | | | | There's no difference apart from which entropy coding functions get called. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus: fix hybrid folding indexing during band quantizationRostislav Pehlivanov2017-12-081-4/+3
| | | | | | | Resulted in valgrind errors due to uninitialized memory. Also updates fate and makes it use the tron sample result. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus_celt: deduplicate band quantization/dequantization functionRostislav Pehlivanov2017-12-041-1/+110
| | | | | | No point in having the same code twice to do exactly the same thing. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/opus: Check count of ambisonic channelsMichael Niedermayer2017-02-171-0/+4
| | | | | | | https://tools.ietf.org/html/draft-ietf-codec-ambisonics-01#section-3.1 specifies the maximum as 227 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libopus: decode ambisonics with non-diegetic sourcesFelicia2017-02-171-2/+4
| | | | | | | | | | | Channel mapping 2 additionally supports a non-diegetic stereo track appended to the end of a full-order ambisonics signal, such that the total channel count is either (n + 1) ^ 2, or (n + 1) ^ 2 + 2 where n is the ambisonics order Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* opus_parser: fix leaking channel_maps on errorAndreas Cadhalpun2016-12-101-0/+1
| | | | | | | | Make ff_opus_parse_extradata free allocated memory on error instead of expecting callers to free it in that case. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* libavcodec/opus: Add channel mapping 2 to extradata parserMichael Graczyk2016-09-011-1/+10
| | | | | | | | This allows libavcodec/opus to demux ambisonics in an ogg/opus container. Channel mapping family 2 is being added in this standards track IETF draft: tools.ietf.org/html/draft-ietf-codec-ambisonics-00 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/opus: Fix spelling in error messageMichael Graczyk2016-09-011-1/+1
|
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-2/+2
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-2/+2
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mpegts: add support for OpusKieran Kunhya2014-12-201-8/+3
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | all: move ff_exp10, ff_exp10f, ff_fast_powf to lavu/ffmath.hGanesh Ajjanagadde2016-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | The idea is to use ffmath.h for internal implementations of math functions. Currently, it is used for variants of libm functions, but is by no means limited to such things. Note that this is not exported; use lavu/mathematics for such purposes. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
* | lavc/opus: replace pow(10,x) by ff_exp10(x)Ganesh Ajjanagadde2015-12-251-1/+2
| | | | | | | | | | Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec: Add support for Opus in MPEG-TSKieran Kunhya2014-10-261-8/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b70d7a4ac72d23f3448f3b08b770fdf5f57de222'Michael Niedermayer2014-05-151-4/+4
|/ | | | | | | | | | | | | | | | | * commit 'b70d7a4ac72d23f3448f3b08b770fdf5f57de222': lavc: add a native Opus decoder. Conflicts: Changelog configure libavcodec/version.h Fate tests pass with both avresample as well as swresample based opus decoder, but are disabled (reference files are very large so i want to think a day or 2 about if theres an alternative or if they could be avoided, they also dont match the official samples) Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavc: add a native Opus decoder.Anton Khirnov2014-05-151-0/+428
Initial implementation by Andrew D'Addesio <modchipv12@gmail.com> during GSoC 2012. Completion by Anton Khirnov <anton@khirnov.net>, sponsored by the Mozilla Corporation. Further contributions by: Christophe Gisquet <christophe.gisquet@gmail.com> Janne Grunau <janne-libav@jannau.net> Luca Barbato <lu_zero@gentoo.org>