1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-06 17:44:17 +02:00
Commit Graph

74 Commits

Author SHA1 Message Date
Justin Ruggles
9d7cee50aa wavpack: add needed braces for 2 statements inside an if block 2012-02-10 20:27:55 -05:00
Paul B Mahol
c388558d31 wavpack: allow user to disable CRC checking
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:54:08 -05:00
Kostya Shishkov
e6e7bfc11e wavpack: fix clipping for 32-bit lossy mode
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.
2012-01-15 15:27:55 +01:00
Justin Ruggles
3a1867deac wavpack: fix typos in previous cosmetic clean-up commit 2012-01-02 08:54:30 -05:00
Justin Ruggles
513c238fa9 wavpack: cosmetics: K&R pretty-printing 2012-01-02 08:52:59 -05:00
Hendrik Leppkes
14165fe125 wavpack: determine sample_fmt before requesting a buffer
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-01 23:24:15 -05:00
Diego Biurrun
aaf47bcde7 Drop ALT_ prefix from BITSTREAM_READER_LE name.
The prefix is a historic remnant that probably meant "alternative".
Now that the A32 bitstream reader has been dropped it makes no sense anymore.
2011-12-22 16:51:23 +01:00
Derek Buitenhuis
bb9747c8ee wavpack: Fix 32-bit clipping
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>
2011-12-16 20:55:53 +01:00
Derek Buitenhuis
365e1ec26d wavpack: Clip samples after shifting
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>
2011-12-16 20:55:46 +01:00
Derek Buitenhuis
a548b6cbfc wavpack: Properly clip samples during lossy decode
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>
2011-12-03 15:32:21 -08:00
Justin Ruggles
0eea212943 Add avcodec_decode_audio4().
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
2011-12-02 17:40:40 -05:00
Justin Ruggles
d2604f9260 wavpack: calculate bpp using av_get_bytes_per_sample() 2011-10-23 11:35:46 -04:00
Laurent Aimar
2c6cf13940 wavpack: Reset internal state on corrupted blocks
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>
2011-10-07 16:25:31 +02:00
Laurent Aimar
8bfea4ab4e Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-10 18:58:57 +03:00
Alex Converse
dba2b63a98 wavpack: Check error codes rather than working around error conditions. 2011-09-08 11:02:43 -07:00
Laurent Aimar
55354b7de2 Fixed invalid access in wavpack decoder on corrupted bitstream.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 12:04:06 +03:00
Laurent Aimar
0aedab0340 Fixed invalid writes in wavpack decoder on corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 12:00:13 +03:00
Laurent Aimar
beefafda63 Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 11:57:13 +03:00
Kostya Shishkov
bcd4aa8bec wavpack: fix wrong return value in wavpack_decode_block()
This function should return number of samples decoded, not number of bytes
decoded.
Spotted by Uoti Urpala.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-09-05 12:44:26 +02:00
Kostya Shishkov
9bc4e21a9b wavpack: use context reset in appropriate places
This fixes improper flushing in the cases when the same frame is decoded in
several iterations (for being too large to fit into output buffer) and flush is
called mid-decoding and it also resets context in case of decoding errors.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-05 11:18:27 +02:00
Kostya Shishkov
4ba8c521b1 WavPack decoder: implement flush function
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-21 12:54:34 +02:00
Anton Khirnov
ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Anton Khirnov
c2fcd0a7a4 Replace remaining occurrences of deprecated CH_* with AV_CH_*
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 08:26:12 -05:00
Diego Elio Pettenò
d36beb3f69 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 16:08:45 +00:00
Kostya
dacbcd170a reindent after last commit
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 20:46:58 +01:00
Kostya
3bdc886c22 Extend WavPack demuxer and decoder to support >2 channel audio
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-24 20:46:58 +01:00
Kostya Shishkov
c392cc0a64 Limit number of samples decoded for WavPack mono mode, so decoded samples will
fit into output buffer.

Originally committed as revision 26269 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-08 19:23:24 +00:00
Carl Eugen Hoyos
b82579a6ec Fail more gracefully for multichannel wavpack in another container.
Originally committed as revision 26253 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 13:24:58 +00:00
Stefano Sabatini
5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Stefano Sabatini
72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Kostya Shishkov
aa170ed625 cosmetics: reindent after last commit
Originally committed as revision 21895 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-19 14:06:12 +00:00
Kostya Shishkov
965828bb66 Since WavPack chunk can contain more samples than FFmpeg is guaranteed to
hold, decode it in several iterations outputting as many samples as possible.

Originally committed as revision 21894 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-19 14:05:41 +00:00
Ronald S. Bultje
6e44ba1550 Use get_bits_left() instead of size_in_bits - get_bits_count().
Originally committed as revision 20543 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-16 17:42:43 +00:00
Sascha Sommer
d859bb1db0 Add CODEC_CAP_SUBFRAMES for codecs that output multiple subframes
per AVPacket
No longer print "Multiple frames in a packet" error message
when CODEC_CAP_SUBFRAMES is set (wmapro, wavpack)

Originally committed as revision 19881 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 15:08:26 +00:00
Laurent Aimar
992f7db060 Add floating point audio decoding to WavPack decoder.
Patch by Laurent Aimar (fenrir at `antonym of 'audio'+antonym of 'WAN'` dot org)

Originally committed as revision 18754 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-06 05:40:43 +00:00
Laurent Aimar
cabb81113a Prepare WavPack decoder to support floating point output.
Patch by Laurent Aimar (f-e-n-r-i-r .@.t. v=i=d=e=o=l=a=n .d.o.t. o=r=g)

Originally committed as revision 18753 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-06 05:28:06 +00:00
Laurent Aimar
3cb088868c Factorize out integer sample value decoding for WavPack.
This is slightly modified patch by Laurent Aimar.

Originally committed as revision 18740 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-05 06:10:59 +00:00
Laurent Aimar
66311f86d4 Check whether extra bits block has enough data.
Patch by Laurent Aimar "f\145nr\151r >at< vide\157lan <dot> o\162g"

Originally committed as revision 18732 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-03 05:42:51 +00:00
Benjamin Larsson
10c773c12f Remove dead assignments found by CSA
Originally committed as revision 18730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-02 09:08:40 +00:00
Laurent Aimar
418f77ec6e Decode extended bitstream for high-precision WavPack files.
Patch by Laurent Aimar [(wolf, son of Loki) <at> (videolan) <dot> (org)]

Originally committed as revision 18729 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-02 05:17:20 +00:00
Laurent Aimar
60294c593e Correctly update output sample format in wavpack decoder.
Patch by Laurent Aimar (at 'fenrir (cons 'videolan 'org))

Originally committed as revision 18694 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-26 04:23:29 +00:00
Kostya Shishkov
29ee635503 Merge decoding functions for all bitdepths in WavPack decoder
Originally committed as revision 18675 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-24 05:50:19 +00:00
Kostya Shishkov
6e0f746d3e Handle WavPack INT32INFO chunks with nonzero post shift
Originally committed as revision 18668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-23 18:21:16 +00:00
Kostya Shishkov
0638c2ae3c Add functions for decoding >16 bits WavPack files.
Based on patches by Laurent Aimar (fenrir >whirlpool< videolan >dit< org)

Originally committed as revision 18667 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-23 17:27:04 +00:00
Laurent Aimar
760db32a0c Shift 9-15 bit samples to use full 16-bit range.
Patch by Laurent Aimar <fenrir at VLCsite>
Thread: [PATCH] Fixed wavpack 9-15 bits support

Originally committed as revision 18666 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-23 07:44:04 +00:00
Stefano Sabatini
9106a698e7 Rename bitstream.h to get_bits.h.
Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-13 16:20:26 +00:00
Thilo Borgmann
7a00bbad21 Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows
passing of packet-specific flags from demuxer to decoder, such as the keyframe
flag, which appears necessary to playback corePNG P-frames.

Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread
"Google Summer of Code participation" on the mailinglist.

Originally committed as revision 18351 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-07 15:59:50 +00:00