Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-06aacsbr: convert to lavu/txLynne
2022-11-06aacdec: convert to lavu/tx and support fixed-point 960-sample decodingLynne
This patch replaces the transform used in AAC with lavu/tx and removes the limitation on only being able to decode 960-sample files with the float decoder. This commit also removes a whole bunch of unnecessary and slow lifting steps the decoder did to compensate for the poor accuracy of the old integer transformation code. Overall float decoder speedup on Zen 3 for 64kbps: 32%
2022-11-04avcodec/aacdec: refactor the channel layout derivation codeJames Almer
Generalize the checks for channels in all positions, and properly support the three height groups (normal, top, bottom) instead of manually setting the relevant channels for the latter two after the normal height tags were parsed. Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-04avcodec/aacdec: don't force a layout when a channel position is unknownJames Almer
If PCE defines channels not covered by those in the standard configurations then don't try to come up with some made up layout and just return them in the coded order. Fixes al08_44.mp4 from the conformance suite, now reporting and decoding all 48 channels instead of 10. Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-04avcodec/aacdec: add support for channel configuration 14James Almer
It corresponds to the 7.1(top) layout. Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-04avcodec/aacdec: fix parsing streams with channel configuration 11James Almer
Set the correct amount of tags in tags_per_config[]. Also, there are no channels that correspond to a side element in this configuration, so reflect this in the list of known/supported channel layouts. Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-27avcodec/internal: Move ff_get_buffer() to decode.hAndreas Rheinhardt
Only used by decoders (encoders have ff_encode_alloc_frame()). Also clean up the other headers a bit while removing now redundant internal.h inclusions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02avcodec/aacdec_fixed: also clip samples on the second channel for stereo HE-AACJames Almer
Fixes outputting silence on the second channel when decoding Parametic Stereo HE-AAC. Closes ticekt #3361. Signed-off-by: James Almer <jamrial@gmail.com>
2022-07-30avcodec/aacdec: print a log message when treating mono HE-AAC as stereoJames Almer
Since this behavior is intentional, use the VERBOSE level instead of WARNING as it's nothing the user should worry about. Signed-off-by: James Almer <jamrial@gmail.com>
2022-07-22avcodec/aacdec: remove skip samples multiplierJames Almer
The amount of padding samples reported by containers take into account the extended samplerate in HE-AAC. Fixes ticket #9671. Signed-off-by: James Almer <jamrial@gmail.com>
2022-07-08avcodec/aacdec: fix parsing of dual mono filesJames Almer
Dual mono files report a channel count of 2 with each individual channel in its own SCE, instead of both in a single CPE as is the case with standard stereo. This commit handles this non default channel configuration scenario. Fixes ticket #1614 Signed-off-by: James Almer <jamrial@gmail.com>
2022-06-17avcodec/vlc: Use structure instead of VLC_TYPE array as VLC elementAndreas Rheinhardt
In C, qualifiers for arrays are broken: const VLC_TYPE (*foo)[2] is a pointer to an array of two const VLC_TYPE elements and unfortunately this is not compatible with a pointer to a const array of two VLC_TYPE, because the latter does not exist as array types are never qualified (the qualifier applies to the base type instead). This is the reason why get_vlc2() doesn't accept a const VLC table despite not modifying the table at all, as there is no automatic conversion from VLC_TYPE (*)[2] to const VLC_TYPE (*)[2]. Fix this by using a structure VLCElem for the VLC table. This also has the advantage of making it clear which element is which. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-15all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt
This is more spec-compliant because it does not rely on dead-code elimination by the compiler. Especially MSVC has problems with this, as can be seen in https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html or https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html This commit does not eliminate every instance where we rely on dead code elimination: It only tackles branching to the initialization of arch-specific dsp code, not e.g. all uses of CONFIG_ and HAVE_ checks. But maybe it is already enough to compile FFmpeg with MSVC with whole-programm-optimizations enabled (if one does not disable too many components). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-05avcodec/codec_internal: Make FFCodec.decode use AVFrame*Andreas Rheinhardt
This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVFrame *frame = data;" line for non-subtitle decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt
Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-15lavc: drop temporary compat wrappers for channel layout API changeAnton Khirnov
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15aac: convert to new channel layout APIAnton Khirnov
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-22avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt
Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-09avcodec/aacdec_template: Avoid some invalid values to be set by ↵Michael Niedermayer
decode_audio_specific_config_gb() Fixes: NULL pointer dereference Fixes: decode_spectrum_and_dequant.mp4 Found-by: Rafael Dutra <rafael.dutra@cispa.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-04-27avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt
Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-11avcodec: use the buffer_size_t typedef where requiredJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-09avcodec: Constify some AVPacketsAndreas Rheinhardt
Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-09avcodec/aacdec_template: Avoid undefined negation in imdct_and_windowing_eld()Michael Niedermayer
Fixes: negation of -2147483648 cannot be represented in type 'INTFLOAT' (aka 'int'); cast to an unsigned type to negate this value to itself Fixes: 29057/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5642758933053440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-17lavc/aacdec_template: Fix 7.1 decoding with default strictness.KM
Broken in 4d9b9c5e Fixes ticket #9057.
2021-02-07avcodec/aacdec_fixed: Move fixed-point sinewin tables to its only userAndreas Rheinhardt
The fixed-point AAC decoder is the only user of the fixed-point sinewin tables from sinewin; and it only uses a few of them (about 10% when counting by size). This means that guarding initializing these tables by an AVOnce (as done in 3719122065863f701026632f610175980d42b05a) is unnecessary for them. Furthermore the array of pointers to the individual arrays is also unneeded. Therefore this commit moves these tables directly into aacdec_fixed.c; this is done by ridding the original sinewin.h and sinewin_tablegen.h headers completely of any fixed-point code at the cost of a bit of duplicated code (the alternative is an ugly ifdef-mess). This saves about 58KB from the binary when using hardcoded tables (as these tables are hardcoded in this scenario); when not using hardcoded tables, most of these savings only affect the .bss segment, but the rest (< 1KB) contains relocations (i.e. savings in .data.rel.ro). Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08avcodec/aac: Share common init code of float decoder and encoderAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08avcodec/aacdec, aactab: Move kbd tables to their only userAndreas Rheinhardt
The floating point kbd tables for 120 and 960 samples are only used by the floating point decoder whereas the fixed point kbd tables for 128 and 1024 samples are only used by the fixed point AAC decoder. So move these tables to their only users. This ensures that they are not accidentally used somewhere else without ensuring that initializing these tables stays thread-safe (as it is now because the only place from where they are initialized is guarded by an AVOnce). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08avcodec/aacdec, sinewin: Move 120 and 960 point sine tables to aacdecAndreas Rheinhardt
The floating point AAC decoder is the only user of these tables, so it makes sense to move them there. Furthermore, initializing the ordinary power-of-two sinetables is currently not thread-safe and if the 120- and 960-point sinetables were not moved, one would have to choose whether to guard initializing these two tables with their own AVOnces or not. Doing so would add unnecessary AVOnces as the AAC decoder already guards initializing its static data by an AVOnce; not doing so would be fragile if a second user of these tables were to be added. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08avcodec/aacdec_template: Use VLC symbols tableAndreas Rheinhardt
Expressions like array[get_vlc2()] can be optimized by using a symbols table if the array is always the same for a given VLC. This requirement is fulfilled for several VLCs used by the AAC decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08avcodec/aacdec_template: Avoid code duplication when initializing VLCsAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-30avcodec/aacdec_template: Initialize `layout_map` on declarationXiaohan Wang
Without this change, it'll cause use-of-uninitialized-variable error. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-25avcodec/aacdec_template: add more checks to make sure only 22.2 gets to 22.2Jan Ekström
Validates the set channel layout as well as verifies that the received layout to the function matches the reference layout, so that it matches the implemented re-ordering logic. Fixes #8845
2020-08-25avcodec/aacdec_template: keep tabs on layout in sniff_channel_orderJan Ekström
This way the layout set at various points can be checked instead of only having the layout at the end.
2020-08-04avcodec/aacdec_template: add support for 22.2 / channel_config 13Jan Ekström
2020-08-04avcodec/aacdec_template: mark second LFE element as LFE2Jan Ekström
We now have the capability to do this.
2020-05-10avcodec/aacdec_template: Pass AVCodecContext seperatly to ↵Michael Niedermayer
set_default_channel_config() Regression since 4d9b9c5e4637ac15205467f16fcac92a28e18f18 Fixes: Null pointer dereference Fixes: 21642/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5670101358739456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-05lavc/aacdec_template: Only warn once about unusual 7.1 encoding.Carl Eugen Hoyos
2019-11-01avcodec/aacdec_template: Check samplerateMichael Niedermayer
Fixes: signed integer overflow: 2 * 1881153568 cannot be represented in type 'int' Fixes: 17996/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5687126468853760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-16avcodec/aacdec_template: Check decode_extension_payload() for failureMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-27avcodec/mpeg4audio: add avpriv_mpeg4audio_get_config2()James Almer
Identical to avpriv_mpeg4audio_get_config() except taking a size argument in bytes, and featuring a new logging context paremeter. Schedule avpriv_mpeg4audio_get_config() for removal as soon as major is bumped as well. Signed-off-by: James Almer <jamrial@gmail.com>
2019-08-11avcodec/aacdec_template: fix integer overflow in imdct_and_windowing()Michael Niedermayer
Fixes: signed integer overflow: 2147483645 + 4 cannot be represented in type 'int' Fixes: 15418/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5685269069561856 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-04avcodec/aacdec_template: skip apply_tns() if max_sfb is 0 (from previous ↵Michael Niedermayer
header decode failure) Fixes: NULL pointer dereference Fixes: 14723/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5654612436058112 Fixes: 14724/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5712607111020544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-04avcodec/aacdec_template: Merge 3 #ifs related to noise handlingMichael Niedermayer
Fewer #if and fewer lines Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-01avcodec/aacdec_fixed: Provide context to av_log()Michael Niedermayer
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-12avcodec/aacdec_template: Allow duplicated elementsMichael Niedermayer
Such streams are invalid according to 4.5.2.1 Top level payloads for the audio object types AAC main, AAC SSR, AAC LC and AAC LTP 4.5.2.1.1 Definitions ...cIn the raw_data_block(), several instances of the same syntactic element may occur, but must have a different 4 bit element_instance_tag, except for data_stream_element()'s and fill_element()'s. Fixes: Ticket7477 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-04avcodec/aacdec_template: Check for duplicate elementsMichael Niedermayer
Fixes: Timeout Fixes: 9552/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-6027842339995648 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19aac: Rework extradata parsing codeVittorio Giovara
- enable the parsing code - use the new buffer instead of replacing the context one - do not push/pop configuration, just discard the exiting one - propagate errors correctly
2018-02-22Parse and drop gain control data, so that SSR packets decode.Dale Curtis
This will result in poor quality audio for SSR streams, but they will at least demux and decode without error; partially fixing ticket #1693. This pulls in the decode_gain_control() function from the ffmpeg summer-of-code repo (original author Maxim Gavrilov) at svn://svn.mplayerhq.hu/soc/aac/aac.c with some minor modifications and adds AOT_AAC_SSR to decode_audio_specific_config_gb(). Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Co-authored-by: Maxim Gavrilov <maxim.gavrilov@gmail.com>
2018-02-20avcodec/aacdec_templat: Fix integer overflow in apply_ltp()Michael Niedermayer
Fixes: signed integer overflow: -1625276744 + -1041893960 cannot be represented in type 'int' Fixes: 5948/clusterfuzz-testcase-minimized-5791479856365568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-31Merge commit 'b5f19f7478492307e4b4763aeac3180faf50e17f'James Almer
* commit 'b5f19f7478492307e4b4763aeac3180faf50e17f': aac: Split function to parse ADTS header data into public and private part Merged-by: James Almer <jamrial@gmail.com>