summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4audio.c
Commit message (Collapse)AuthorAge
* avcodec/mpeg4audio: Unavpriv and deduplicate mpeg4audio_sample_ratesAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | | | | | | | | | | avpriv_mpeg4audio_sample_rates has a size of 64B and it is currently avpriv; a clone of it exists in aacenctab.h and from there it is inlined in aacenc.c (which also uses the avpriv version) and in the FLV muxer. This means that despite it being avpriv both libavformat as well as libavcodec have copies already. This situation is clearly suboptimal. Given the overhead of exporting symbols (for x64 Elf/Linux/GNU: 2x2B version, 2x24B .dynsym, 24B .rela.dyn, 8B .got, 4B hash + twice the size of the name (here 31B)) the object is unavprived, i.e. duplicated into libavformat when creating a shared build; but the duplicates in the AAC encoder and FLV muxer are removed. This involves splitting of the sample rate table into a file of its own; this allowed to break some spurious dependencies (e.g. both the AAC encoder as well as the Matroska demuxer actually don't need the mpeg4audio_get_config stuff). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4audio: Remove avpriv_mpeg4audio_get_configAndreas Rheinhardt2021-04-27
| | | | | | | Superseded by avpriv_mpeg4audio_get_config2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpeg4audio: Use proper logcontext for loggingAndreas Rheinhardt2021-02-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg4audio: add newer channel_coding mappingsJan Ekström2020-08-04
| | | | | Additionally, add comments regarding their definitions. Based on ARIB STD-B32, which bases on 14496-3:2009 and 14496-3:2009/AMD4.
* avcodec: Replace skip_bits_long() by skip_bits() where possibleMichael Niedermayer2019-12-31
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: Replace show_bits_long() by show_bits() where possibleMichael Niedermayer2019-12-31
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/mpeg4audio: add chan_config check to avoid indeterminate channelsJun Zhao2019-09-27
| | | | | | | add chan_config check to avoid indeterminate channels. Signed-off-by: Jun Zhao <barryjzhao@tencent.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpeg4audio: add avpriv_mpeg4audio_get_config2()James Almer2019-09-27
| | | | | | | | | | 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>
* Merge commit '831018b0bbe26a603802a9022472f714a59293be'James Almer2017-10-30
|\ | | | | | | | | | | | | * commit '831018b0bbe26a603802a9022472f714a59293be': mpeg4audio: Make avpriv_copy_pce_data() inline Merged-by: James Almer <jamrial@gmail.com>
| * mpeg4audio: Make avpriv_copy_pce_data() inlineAnton Khirnov2017-04-28
| | | | | | | | | | | | | | | | | | The function currently accepts a PutBitContext and a GetBitContext, which hardcodes their sizes into the lavc ABI. Since the function is quite small and only called in a few places, the simplest solution is making it inline, thus avoiding a runtime dependency completely. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mpeg4audio: correctly propagate meaningful error valuesJames Almer2016-12-02
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | aac_latm: Allow unaligned AudioSpecificConfigAlex Converse2017-02-13
| | | | | | | | Fixes ticket 4730
* | avcodec/mpeg4audio: correctly propagate meaningful error valuesJames Almer2016-11-25
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | mpeg4audio: validate sample_rateAndreas Cadhalpun2016-11-07
| | | | | | | | | | | | | | | | | | | | A negative sample rate doesn't make sense and triggers assertions in av_rescale_rnd. Also check for errors from avpriv_mpeg4audio_get_config in ff_mp4_read_dec_config_descr. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | Merge commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c'Michael Niedermayer2015-01-09
|\| | | | | | | | | | | | | | | | | | | | | * commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c': mpeg4audio: check the init_get_bits() return value Conflicts: libavcodec/mpeg4audio.c See: deefdf9788467edd262b9c29a4f6e33d2ae84b8c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg4audio: check the init_get_bits() return valueAnton Khirnov2015-01-09
| | | | | | | | | | | | Fixes possible invalid reads. CC:libav-stable@libav.org
* | avpriv_mpeg4audio_get_config: check init_get_bits() return code.Michael Niedermayer2013-01-27
| | | | | | | | | | | | | | Fixes null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/aac: fix shared build failures with MSVC.Clément Bœsch2012-11-12
| | | | | | | | This is a workaround until a better solution is found.
* | mpeg4audio: dont take the SBR flag too serious.Michael Niedermayer2012-08-23
| | | | | | | | | | | | Fixes Ticket1049 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | aacdec: Fix null pointer crashMichael Niedermayer2011-12-17
| | | | | | | | | | | | | | Fixes bug170 Bug found by: Gautam Gupta Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aac_latm: reconfigure decoder on audio specific config changes latmdec: fix audio specific config parsing Add avcodec_decode_audio4(). avcodec: change number of plane pointers from 4 to 8 at next major bump. Update developers documentation with coding conventions. svq1dec: avoid undefined get_bits(0) call ARM: h264dsp_neon cosmetics ARM: make some NEON macros reusable Do not memcpy raw video frames when using null muxer fate: update asf seektest vp8: flush buffers on size changes. doc: improve general documentation for MacOSX asf: use packet dts as approximation of pts asf: do not call av_read_frame rtsp: Initialize the media_type_mask in the rtp guessing demuxer Cleaned up alacenc.c Conflicts: doc/APIchanges doc/developer.texi libavcodec/8svx.c libavcodec/aacdec.c libavcodec/ac3dec.c libavcodec/avcodec.h libavcodec/nellymoserdec.c libavcodec/tta.c libavcodec/utils.c libavcodec/version.h libavcodec/wmadec.c libavformat/asfdec.c tests/ref/seek/lavf_asf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * latmdec: fix audio specific config parsingJanne Grunau2011-12-03
| | | | | | | | | | | | | | | | | | Pass the correct size in bits to mpeg4audio_get_config and add a flag to disable parsing of the sync extension when the size is not known. Latm with AudioMuxVersion 0 does not specify the size of the audio specific config. Data after the audio specific config can be misinterpreted as sync extension resulting in random and wrong configs.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (47 commits) lavc: hide private symbols. lavc: deprecate img_get_alpha_info(). lavc: use avpriv_ prefix for ff_toupper4. lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits. lavc: use avpriv_ prefix for ff_ac3_parse_header. lavc: use avpriv_ prefix for ff_frame_rate_tab. lavc: rename ff_find_start_code to avpriv_mpv_find_start_code lavc: use avpriv_ prefix for ff_split_xiph_headers. lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header. lavc: use avpriv_ prefix for some dv symbols used in lavf. lavc: use avpriv_ prefix for some flac symbols used in lavf. lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf. lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf. lavc: use avpriv_ prefix for ff_aac_parse_header(). lavf: hide private symbols. lavf: use avpriv_ prefix for some dv functions. lavf: use avpriv_ prefix for ff_new_chapter(). avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2() avcodec: clarify documentation of CODEC_CAP_DELAY ... Conflicts: configure doc/general.texi libavcodec/Makefile libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dv.c libavcodec/dvdata.c libavcodec/dvdata.h libavcodec/libspeexenc.c libavcodec/mpegvideo.c libavcodec/version.h libavformat/avidec.c libavformat/dv.c libavformat/dv.h libavformat/flvenc.c libavformat/mov.c libavformat/mp3enc.c libavformat/oggparsespeex.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.Anton Khirnov2011-10-20
| | | | | | | | They are used in lavf.
| * lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.Anton Khirnov2011-10-20
| | | | | | | | | | Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and ff_copy_pce_data
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add HE-AAC v2 support to the AAC decoder.Alex Converse2010-06-19
| | | | Originally committed as revision 23647 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add support for PS sync extensions.Alex Converse2010-04-08
| | | | Originally committed as revision 22818 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use get_bits_left() in the sync extension check.Alex Converse2010-04-08
| | | | Originally committed as revision 22817 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix ext_object_type.Alex Converse2010-04-08
| | | | | | | In the case of explicit non-backwards compible PS, the extension object type should be set to SBR. See 14496-3:2009 (fourth edition). Originally committed as revision 22816 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add support for non-backwards compatible signaled parametric stereo.Alex Converse2010-03-07
| | | | | | | | | This is done without breaking W6132 Annex YYYY draft MP3onMP4 which also uses AOT 29. Samples: http://samples.mplayerhq.hu/A-codecs/AAC/aacPlusDecoderCheckPackage_v2.1/bitstreams/File7.3gp http://samples.mplayerhq.hu/MPEG-4/mp3on4/id5_1.mp4 Originally committed as revision 22281 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use get_bits_left() instead of size_in_bits - get_bits_count().Ronald S. Bultje2009-11-16
| | | | Originally committed as revision 20543 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add the ability to parse the ALSSpecificConfig from an MPEG-4 ↵Thilo Borgmann2009-11-11
| | | | | | | | AudioSpecificConfig. Patch by Thilo Borgmann <com googlemail borgmann thilo> as part of GSoC 2009. Originally committed as revision 20516 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a channels field to MPEG4AudioConfig.Alex Converse2009-11-11
| | | | Originally committed as revision 20512 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use the AOT enum instead of integer literals for setting and comparing audioAlex Converse2009-08-17
| | | | | | object types. Originally committed as revision 19666 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace 5 with AOT_SBR when referring to the MPEG-4 audio object type.Justin Ruggles2009-08-03
| | | | Originally committed as revision 19569 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Subroutine to copy an AAC Program Config Element (PCE)Alex Converse2009-05-13
| | | | Originally committed as revision 18817 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Read extended channel configuration when extended AOT is BSAC.Jai Menon2009-04-21
| | | | Originally committed as revision 18644 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-13
| | | | Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
* init ext sample rate to 0 if not presentBaptiste Coudurier2009-03-22
| | | | Originally committed as revision 18139 to svn://svn.ffmpeg.org/ffmpeg/trunk
* mpeg4audio common codeBaptiste Coudurier2008-04-01
Originally committed as revision 12662 to svn://svn.ffmpeg.org/ffmpeg/trunk