summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
Commit message (Collapse)AuthorAge
* lavc: Use get_bitsz where neededAndreas Cadhalpun2016-01-11
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: change all decoders to behave consistently with AV_EF_CRCCHECK.Anton Khirnov2013-10-28
| | | | | | Just crccheck prints a warning, crccheck+explode returns an error. Also document this behavior.
* cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-03
|
* wavpack: check that all the channels were coded.Anton Khirnov2013-05-28
|
* wavpack: check that there aren't too many blocks per packetAnton Khirnov2013-05-28
|
* wavpack: extract channel information from the bitstreamAnton Khirnov2013-05-28
| | | | | This way we don't require the caller to parse the block header. It also allows the channel configuration to change mid-stream.
* wavpack: extract sample rate from the bitstreamAnton Khirnov2013-05-28
| | | | | This way we don't require the caller to parse the block header. It also allows the sample rate to change mid-stream.
* matroskadec: export full wavpack blocks.Anton Khirnov2013-05-28
| | | | | This allows us to get rid of demuxer-specific hacks in the decoder and will allow streamcopy from matroska once we have a wavpack muxer.
* wavpack demuxer: export full wavpack blocks.Anton Khirnov2013-05-28
| | | | | | | | Currently the demuxer shaves the blocks and exports only the information that is useful to the decoder. Exporting the blocks just as they are stored is simpler to understand and will make remuxing wavpack easier.
* wavpack: don't set sample format in init.Anton Khirnov2013-05-28
| | | | We don't know whether it will be float until we look at the data.
* wavpack: remove a useless parameter from wavpack_decode_block().Anton Khirnov2013-05-28
| | | | The decoder always returns output if an error does not occur.
* wavpack: return an error on 0-sized blocksAnton Khirnov2013-05-28
| | | | Such blocks are not valid.
* wavpack: remove a useless check.Anton Khirnov2013-05-28
| | | | | | Number of samples in the first block is checked to be strictly positive earlier in wavpack_decode_frame() and number of samples in all the other blocks is checked to be equal to the first one.
* wavpack: add an error message to a failure.Anton Khirnov2013-05-28
|
* wavpack: return 0 instead of samples count from decoding functionsAnton Khirnov2013-05-28
| | | | | The caller never cares about the number of decoded samples, so this only confuses the reader.
* wavpack: switch to planar outputAnton Khirnov2013-05-28
| | | | This simplifies the code and makes it faster.
* wavpack: drop redundant if/else blocksAnton Khirnov2013-05-28
|
* wavpack: remove the subframes codec capAnton Khirnov2013-05-28
| | | | The decoder always consumes full packets.
* wavpack: check packet size earlyLuca Barbato2013-05-22
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* wavpack: use bytestream2 in wavpack_decode_blockLuca Barbato2013-05-22
| | | | | | | Prevent most out of buffer reads. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* wavpack: validate samples size parsed in wavpack_decode_blockLuca Barbato2013-05-18
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* wavpack: return meaningful errorsLuca Barbato2013-05-18
| | | | And forward those that were already meaningful.
* wavpack: K&R formatting cosmeticsLuca Barbato2013-05-18
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-08
|
* wavpack: decode directly to the user-provided AVFrameJustin Ruggles2013-02-12
|
* lavc: add a wrapper for AVCodecContext.get_buffer().Anton Khirnov2012-12-04
| | | | It will be useful in the upcoming transition to refcounted AVFrames.
* Include libavutil/channel_layout.h instead of libavutil/audioconvert.hJustin Ruggles2012-11-11
| | | | Also reorder some other #include when applicable.
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* wavpack: set bits_per_raw_sample for S32 samples to properly identify 24-bitHendrik Leppkes2012-07-23
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* wavpack: Fix an integer overflowDerek Buitenhuis2012-03-02
| | | | | | | | | | Integer Overflow Checker detected an integer overflow while FATE was running. See: http://fate.libav.org/x86_64-linux-ioc/ Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
* wavpack: Don't shift minclip/maxclipDerek Buitenhuis2012-02-23
| | | | | | | | | | | Since we are clipping before we shift the values to 16 or 32 bits, we should not shift the min/max clip values to compensate. Fixes 8 and 24 bit lossy decoding. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* wavpack: add needed braces for 2 statements inside an if blockJustin Ruggles2012-02-10
|
* wavpack: allow user to disable CRC checkingPaul B Mahol2012-02-10
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* wavpack: fix clipping for 32-bit lossy modeKostya Shishkov2012-01-15
| | | | | | Reference decoder clips data before shifting it to final range and also forces 32-bit lossy mode to be actually 24-bit lossy mode in order to be able to perform proper clipping.
* wavpack: fix typos in previous cosmetic clean-up commitJustin Ruggles2012-01-02
|
* wavpack: cosmetics: K&R pretty-printingJustin Ruggles2012-01-02
|
* wavpack: determine sample_fmt before requesting a bufferHendrik Leppkes2012-01-01
| | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* Drop ALT_ prefix from BITSTREAM_READER_LE name.Diego Biurrun2011-12-22
| | | | | The prefix is a historic remnant that probably meant "alternative". Now that the A32 bitstream reader has been dropped it makes no sense anymore.
* wavpack: Fix 32-bit clippingDerek Buitenhuis2011-12-16
| | | | | | | | In the case that (frame_flags & 0x03) == 3, hybrid_maxclip may have had a signed integer overflow. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* wavpack: Clip samples after shiftingDerek Buitenhuis2011-12-16
| | | | | | | | It doesn't make much sense to clip pre-shift, nor is it correct for proper decoding. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* wavpack: Properly clip samples during lossy decodeDerek Buitenhuis2011-12-03
| | | | | | | | When decoding lossy WavPack samples, they are supposed to be clipped, in order to be decoded correctly. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* 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.
* wavpack: calculate bpp using av_get_bytes_per_sample()Justin Ruggles2011-10-23
|
* wavpack: Reset internal state on corrupted blocksLaurent Aimar2011-10-07
| | | | | | | | wavpack_decode_block() supposes that it is called back with the exact same buffer unless it has returned with an error. With multi-channels files, wavpack_decode_frame() was breaking this assumption. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.Laurent Aimar2011-09-10
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* wavpack: Check error codes rather than working around error conditions.Alex Converse2011-09-08
|
* Fixed invalid access in wavpack decoder on corrupted bitstream.Laurent Aimar2011-09-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Fixed invalid writes in wavpack decoder on corrupted bitstreams.Laurent Aimar2011-09-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>