summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
Commit message (Collapse)AuthorAgeFilesLines
* mpegaudiodec: Consistently handle fixed/float templatingDiego Biurrun2013-11-231-2055/+0
|
* cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-031-5/+5
|
* mpegaudiodec: Validate that the number of channels fits at the given offsetMartin Storsjö2013-09-191-1/+2
| | | | | | | | This is similar to the fix in 35cbc98b. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-041-1/+2
|
* avcodec: Drop unnecessary ff_ name prefixes from static functionsDiego Biurrun2013-04-301-8/+9
|
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-081-2/+2
|
* Remove unnecessary dsputil.h #includesDiego Biurrun2013-02-261-1/+0
|
* mpegaudio: decode directly to the user-provided AVFrameJustin Ruggles2013-02-121-20/+20
|
* floatdsp: move butterflies_float from dsputil to avfloatdsp.Ronald S. Bultje2013-01-221-3/+4
| | | | | This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3) independent of dsputil.
* lavc: add a wrapper for AVCodecContext.get_buffer().Anton Khirnov2012-12-041-2/+3
| | | | It will be useful in the upcoming transition to refcounted AVFrames.
* mpegaudiodec: use planar sample format for output unless packed is requestedJustin Ruggles2012-11-251-48/+47
|
* Include libavutil/channel_layout.h instead of libavutil/audioconvert.hJustin Ruggles2012-11-111-1/+1
| | | | Also reorder some other #include when applicable.
* mp3: properly forward mp_decode_frame errorsLuca Barbato2012-10-231-14/+18
| | | | | The function can return either a parsing error or a memory management error.
* mp3: exit on parsing error in mp_decode_frameLuca Barbato2012-10-231-0/+3
| | | | | | | Properly forward mp_decode_layer3 errors, mp_decode_layer1 and mp_decode_layer2 do not return errors. Based on a patch by Michael Niedermayer.
* mpegaudiodec: Fix buffer handling on random accessMichael Niedermayer2012-10-231-0/+1
|
* mpegaudio: Refactor mp3on4 flush functionDiego Biurrun2012-10-231-8/+9
|
* avcodec: Convert some commented-out printf/av_log instances to av_dlogDiego Biurrun2012-10-011-2/+2
|
* avcodec: Drop some silly commented-out av_log() invocationsDiego Biurrun2012-10-011-5/+0
|
* mpegaudiodec: fix short_start calculationLuca Barbato2012-09-281-1/+1
| | | | | | | The value should be always 3, as it follows from the specification. Fix a stack buffer overflow in exponents_from_scale_factors as reported by asan. Thanks to Dale Curtis for the sample vector.
* mpegaudiodec: don't print an error on > 1 frame in a packet.Anton Khirnov2012-08-081-1/+0
| | | | It's a perfectly normal situation, nothing to spam about.
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-6/+6
|
* mp3: fix start band index for block type 2 in 8kHz audioKostya Shishkov2012-05-201-9/+10
| | | | | | | | In hybrid frames long window part ends at 36 samples for most of the cases but at 72 for 8kHz case. For some reason decoder assumed it's 48 or even 36 samples, which caused wrong bitstream decoding for such blocks. l3_25207.mpg from conformance suite demonstrates it the best.
* mpegaudiodec: Do not discard mp_decode_frame() return value.Diego Biurrun2012-04-181-0/+4
| | | | | This fixes the warning: libavcodec/mpegaudiodec.c:1704:14: warning: variable ‘out_size’ set but not used
* mp3dec: perform I/S and M/S only when frame mode is joint stereo.Kostya Shishkov2012-03-291-1/+1
| | | | | | Looks like some LAME versions produce dual stereo mode MP3s with flags for intensity and middle stereo set. In this mode those flags should be ignored like the reference decoder and derived ones do.
* Replace memset(0) by zero initializations.Diego Biurrun2012-03-281-5/+2
| | | | Also remove one pointless zero initialization in rangecoder.c.
* lavc: deprecate AVCodecContext.sub_id.Anton Khirnov2012-03-041-2/+0
| | | | | | | In most places where it's used, it's as a pointless write-only field. Only rv10 decoder actually reads from it, but it stores some internal version info in it. There is no reason for it to be in a public field.
* mpegaudiodec: use DSPUtil.butterflies_float().Vitor Sessak2012-02-291-0/+7
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: Prevent premature clipping of mp3 input buffer.Dale Curtis2012-02-241-2/+4
| | | | | | | | Instead of clipping extrasize based on EXTRABYTES, clip based on the amount of buffer actually left. Without this fix, there are warbles and other distortions in the test case below. http://kevincennis.com/mix/assets/sounds/1901_voxfx.mp3
* mp3on4: require a minimum framesize.Ronald S. Bultje2012-02-171-0/+4
| | | | | | | | | If bufsize < headersize, init_get_bits() will be called with a negative number, causing it to fail and any subsequent call to get_bits() will crash because it reads from a NULL pointer. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* mp3dec: Fix a heap-buffer-overflowAlex Converse2012-01-301-2/+3
| | | | | | | | In some cases, what is left to read from ptr is smaller than EXTRABYTES. Based on a patch by Thierry Foucu <tfoucu@gmail.com>. Signed-off-by: Alex Converse <alex.converse@gmail.com>
* lavc: remove disabled FF_API_PARSE_FRAME cruft.Anton Khirnov2012-01-271-21/+0
|
* mpegaudiodec: switch error detection check to AV_EF_BUFFERDustin Brody2012-01-211-1/+1
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegaudiodec: optimized iMDCT transformVitor Sessak2012-01-081-1/+1
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: move imdct and windowing function to mpegaudiodspVitor Sessak2012-01-081-178/+15
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: interleave iMDCT buffer to simplify future SIMD implementationsVitor Sessak2012-01-081-25/+25
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: Use clearer pointer mathVitor Sessak2012-01-071-1/+1
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: skip all channels when skipping granulesJustin Ruggles2012-01-011-8/+11
| | | | | Also fix calculation of new position when switching buffers. This fixes "overread" error messages when seeking.
* mpegaudiodec: fix seeking.Ronald S. Bultje2011-12-311-16/+18
| | | | | | | | | The safe bitstream reader does not allow using skip_bits_long() to seek to a point before the start of the buffer, which was needed by the mp3 decoder. This change instead calculates the start point of the first valid granule and skips to that position. Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* mpegaudiodec: fix compilation when testing the unchecked bitstream readerJustin Ruggles2011-12-311-1/+1
|
* mp3dec: hack: fix decoding with safe bitstream readerMans Rullgard2011-12-171-0/+3
| | | | | | | | | The buffer splicing relies on the bitstream reader over-reading the end of the buffer as declared in init_get_bits(), although more data is actually present. Manually moving the bitstream boundary after init_get_bits() allows this to work as expected. Signed-off-by: Mans Rullgard <mans@mansr.com>
* latmdec: fix audio specific config parsingJanne Grunau2011-12-031-1/+2
| | | | | | | | | 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.
* Add avcodec_decode_audio4().Justin Ruggles2011-12-021-31/+55
| | | | | | Deprecate avcodec_decode_audio3(). Implement audio support in avcodec_default_get_buffer(). Implement the new audio decoder API in all audio decoders.
* mpegaudio: do not use init_static_data() for initializing tables.Justin Ruggles2011-11-271-6/+7
| | | | | It is called once for each mpegaudio codec that is registered, which adds significant overhead.
* mpegaudiodec: Don't use a nonexistent log context for av_dlogMartin Storsjö2011-11-161-2/+2
| | | | | | | This fixes builds with DEBUG defined, broken since 1158745a2d12966c58e83b66243a42f20190812e. Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: indentationJustin Ruggles2011-11-151-157/+157
|
* mpegaudiodec: init static tables in AVCodec.init_static_data()Justin Ruggles2011-11-151-18/+17
|
* mp3on4: do not needlessly set data_size to 0Justin Ruggles2011-10-271-1/+0
|
* mp3adu: return error instead of just consuming bad packetsJustin Ruggles2011-10-271-4/+4
|
* mpegaudiodec: check output data size based on avctx->frame_sizeJustin Ruggles2011-10-271-1/+4
|
* avcodec: remove avcodec_parse_frame and deprecate associated elements.Justin Ruggles2011-10-271-1/+15
| | | | | | The documentation for CODEC_CAP_PARSE_ONLY and AVCodecContext.parse_only indicates that they are utilized through avcodec_parse_frame(), which was never actually implemented.