summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
Commit message (Collapse)AuthorAge
* mpegaudiodec: Do not discard mp_decode_frame() return value.Diego Biurrun2012-04-18
| | | | | 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-29
| | | | | | 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-28
| | | | Also remove one pointless zero initialization in rangecoder.c.
* lavc: deprecate AVCodecContext.sub_id.Anton Khirnov2012-03-04
| | | | | | | 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-29
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: Prevent premature clipping of mp3 input buffer.Dale Curtis2012-02-24
| | | | | | | | 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-17
| | | | | | | | | 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-30
| | | | | | | | 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-27
|
* mpegaudiodec: switch error detection check to AV_EF_BUFFERDustin Brody2012-01-21
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegaudiodec: optimized iMDCT transformVitor Sessak2012-01-08
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: move imdct and windowing function to mpegaudiodspVitor Sessak2012-01-08
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: interleave iMDCT buffer to simplify future SIMD implementationsVitor Sessak2012-01-08
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: Use clearer pointer mathVitor Sessak2012-01-07
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mpegaudiodec: skip all channels when skipping granulesJustin Ruggles2012-01-01
| | | | | Also fix calculation of new position when switching buffers. This fixes "overread" error messages when seeking.
* mpegaudiodec: fix seeking.Ronald S. Bultje2011-12-31
| | | | | | | | | 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-31
|
* mp3dec: hack: fix decoding with safe bitstream readerMans Rullgard2011-12-17
| | | | | | | | | 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-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.
* Add avcodec_decode_audio4().Justin Ruggles2011-12-02
| | | | | | 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-27
| | | | | 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-16
| | | | | | | This fixes builds with DEBUG defined, broken since 1158745a2d12966c58e83b66243a42f20190812e. Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: indentationJustin Ruggles2011-11-15
|
* mpegaudiodec: init static tables in AVCodec.init_static_data()Justin Ruggles2011-11-15
|
* mp3on4: do not needlessly set data_size to 0Justin Ruggles2011-10-27
|
* mp3adu: return error instead of just consuming bad packetsJustin Ruggles2011-10-27
|
* mpegaudiodec: check output data size based on avctx->frame_sizeJustin Ruggles2011-10-27
|
* avcodec: remove avcodec_parse_frame and deprecate associated elements.Justin Ruggles2011-10-27
| | | | | | 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.
* mpegaudiodec: cosmetics: basic pretty-printingJustin Ruggles2011-10-27
|
* mpegaudiodec: remove frame_count field from MPADecodeContext.Justin Ruggles2011-10-27
| | | | | | Its functionality was removed several years ago, so it doesn't do anything. AVCodecContext.frame_number could serve the same purpose if someone wants to debug the frame count.
* mpegaudiodec: return AVERROR return codes instead of -1Justin Ruggles2011-10-27
|
* mpegaudiodec: Skip only bad frames instead of the whole packet.Justin Ruggles2011-10-27
| | | | | | On frame decoding failure, return an error if the frame is the same size as the whole packet, otherwise just log an error message and return the number of bytes consumed.
* lavc: replace references to deprecated AVCodecContext.error_recognition to ↵Dustin Brody2011-10-22
| | | | | | use AVCodecContext.err_recognition Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mp3on4: check for allocation failures in decode_init_mp3on4()Justin Ruggles2011-10-21
|
* mp3on4: create a separate flush function for MP3onMP4.Justin Ruggles2011-10-21
| | | | | The correct decoder private context needs to be used. This fixes mp3on4 playback and seeking in avplay.
* mp3on4: ensure that the frame channel count does not exceed the codec channelJustin Ruggles2011-10-21
| | | | | | | count. This also allows for checking output data size based on the actual number of channel instead of the maximum number of channels.
* mp3on4: set channel layoutJustin Ruggles2011-10-21
|
* mp3on4: fix the output channel orderJustin Ruggles2011-10-21
|
* mp3on4: allocate temp buffer with av_malloc() instead of on the stack.Justin Ruggles2011-10-21
| | | | Avoids allocating unnecessary memory and ensures proper alignment.
* mp3on4: copy MPADSPContext from first context to all contexts.Justin Ruggles2011-10-21
| | | | Fixes segfault when decoding multi-channel MP3onMP4 files.
* 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
* lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.Anton Khirnov2011-10-20
| | | | | Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header, ff_mpegaudio_decode_header.
* Use explicit struct initializers for AVCodec declarations.Diego Biurrun2011-09-24
|
* mpegaudiodec: Fix av_dlog() invocation.Diego Biurrun2011-06-01
| | | | | | Some parameters passed to the av_dlog can be either float or int, depending on the mode the file is being compiled as. Cast those parameters to float and use appropriate conversion specifiers.
* mpegaudiodec: remove unusued code and variablesMans Rullgard2011-05-31
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* mpegaudio: clean up compute_antialias() definitionMans Rullgard2011-05-31
| | | | | | | | This merges the float and fixed-point versions of the compute_antialias function, fixes invalid array indexing, and eliminates a dead copy of csa_table. Signed-off-by: Mans Rullgard <mans@mansr.com>
* dct32: Add AVX implementation of 32-point DCTVitor Sessak2011-05-21
|
* mpegaudio: clean up #includesMans Rullgard2011-05-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* mpegaudio: move some struct definitions from mpegaudio.hMans Rullgard2011-05-19
| | | | | | | These structs are only used in mpegaudiodec.c, so move them there and remove no longer needed #include lines from mpegaudio.h. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Move some mpegaudio functions to new mpegaudiodsp subsystemMans Rullgard2011-05-19
| | | | | | | | This separation allows these functions to be used in a cleaner fashion from other codecs (e.g. qdm2) and simplifies creating optimised versions of them. Signed-off-by: Mans Rullgard <mans@mansr.com>