Michael Niedermayer
7b9d8703f3
adpcmdec: fix "warning: array subscript is above array bounds"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
02e7dbf5ad
adpcm_ima_ws: fix stereo decoding
...
Stereo ADPCM IMA WS is planar for VQA version 3 and 2-sample interleaved for
VQA version 2.
13 years ago
Justin Ruggles
220506d23f
avcodec: add a new codec_id for CRYO APC IMA ADPCM.
...
The stereo layout and extradata is significantly different from that in
Westwood IMA ADPCM, so a separate codec_id is warranted.
13 years ago
Janne Grunau
bb5b3940b0
adpcm: ADPCM Electronic Arts has always two channels
13 years ago
Paul B Mahol
01a01bf8bd
adpcm: fix IMA SMJPEG decoding
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Michael Niedermayer
608708009f
adpcm: Fix crash
...
Fixes half of Ticket794
Bug found by: Oana Stratulat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Shitiz Garg
e614fac2e6
adpcm: Check for channels to be a non-zero integer
...
channels would be 0 sometimes and would cause floating point exception
Fixes bugzilla #124
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Michael Niedermayer
257c85cddd
adpcm: fix division by zero in fate/creative/intro-partial.wav with -s 2 and -r 0.001:1
...
Bug-Found-by: Shitiz Garg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
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.
13 years ago
Mans Rullgard
c8477df019
adpcm: use sign_extend()
...
This avoids warnings from the overflow checker and simplifies the code.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Justin Ruggles
a62c0f94ee
adpcmdec: calculate actual number of output samples for each decoder.
...
This also allows for removing some of the buf_size checks and using the
sample count for some of the decoding loops.
13 years ago
Justin Ruggles
439998e18b
adpcmdec: check remaining buffer size before decoding next block in the
...
ADPCM IMA WAV decoder.
13 years ago
Justin Ruggles
ff5790c761
adpcmdec: do not terminate early in ADPCM IMA Duck DK3 decoder.
...
There are still 2 nibbles to decode once the last byte in the packet has been
read. Updated FATE reference.
13 years ago
Justin Ruggles
8140a1288f
adpcmdec: remove unneeded buf_size==0 check.
...
This is already done by avcodec_decode_audio3()
13 years ago
Justin Ruggles
f7f7c1942b
adpcmdec: remove unneeded zeroing of *data_size
13 years ago
Laurent Aimar
c7f89064e2
adpcm: fix out of bound reads due to integer overflow
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Laurent Aimar
346876ec16
Fix out of bound reads due to integer overflow in the ADPCM IMA Electronic Arts EACS decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
e562fbd003
adpcm: move codec-specific variable declarations to the sections for the corresponding codecs.
13 years ago
Justin Ruggles
9662539c10
adpcm: check buffer size in Funcom ISS decoder before reading header.
...
Also use the post-header data size to control termination of the main
decoding loop.
13 years ago
Justin Ruggles
ba5d2890d7
adpcm: simplify reading of Funcom ISS frame header.
13 years ago
Justin Ruggles
5c9eb4fabb
adpcm: check buffer size in IMA DK4 decoder before reading header.
...
Also use the post-header data size to control termination of the main
decoding loop.
13 years ago
Justin Ruggles
a57ea1a87e
adpcm: simplify reading of IMA DK4 frame header.
13 years ago
Justin Ruggles
8114f94ac9
adpcm_ms: clean up reading of predictor coefficients
13 years ago
Justin Ruggles
943f4db552
adpcm_4xm: process planar packets sequentially rather than simultaneously.
...
Also properly clip the right channel step_index.
13 years ago
Justin Ruggles
119974b164
adpcm_ima_wav: process channel-interleaved blocks sequentially rather than simultaneously.
...
Speeds up the ADPCM IMA WAV decoder by 15-20% overall.
13 years ago
Justin Ruggles
7c287b18a0
adpcm: update reference links
...
Add Multimedia Wiki link.
Mark dead links with [dead]. Some can still be accessed through archive.org.
Update URLs for pages which have moved.
Replace duplicated links in adpcmenc.c with a note to see the ADPCM decoder
reference documents.
13 years ago
Justin Ruggles
ac94b8bcc6
adpcm: simplify packet size bounds checking in the ADPCM IMA QT decoder.
...
This is easier to understand. It also avoids returning existing samples mixed
with new samples when the packet is too small.
13 years ago
Justin Ruggles
de0b586a87
adpcm: simplify and speed up several ADPCM decoders.
13 years ago
Justin Ruggles
5a9ed7c110
adpcm: pretty-print tables
13 years ago
Diego Biurrun
8671488799
Use explicit struct initializers for AVCodec declarations.
13 years ago
Baptiste Coudurier
bf334535b4
adpcmdec: Fix QT IMA ADPCM decoder
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Peter Ross
3a549eb82b
permit decoding of multichannel ADPCM_EA_XAS
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
ffe92ff9f0
Fix input buffer size check in adpcm_ea decoder.
...
Unfortunately the output buffer size check assumes that the
input buffer is never over-consumed, thus this actually
also allowed to write outside the output buffer if "lucky".
Based on:
git.videolan.org/ffmpeg.git
commit 701d0eb185
13 years ago
Justin Ruggles
826c56d16e
adpcm: split ADPCM encoders and decoders into separate files.
...
Move shared tables to a separate file as well.
13 years ago
Carl Eugen Hoyos
eb29649cad
Set bits_per_coded_sample when encoding ADPCM.
14 years ago
Michael Niedermayer
af3c8f8230
adpcmenc:Optimize adpcm_ima_qt_compress_sample()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Baptiste Coudurier
35d3d44a84
adpcmenc: fix QT IMA ADPCM encoder
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Baptiste Coudurier
b3d5a4b06e
adpcmdec: Fix QT IMA ADPCM decoder
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Peter Ross
b678d6db95
permit decoding of multichannel ADPCM_EA_XAS
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Reimar Döffinger
701d0eb185
Fix input buffer size check in adpcm_ea decoder.
...
Unfortunately the output buffer size check assumes that the
input buffer is never over-consumed, thus this actually
also allowed to write outside the output buffer if "lucky".
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
98ec828775
Remove final semicolon from some macros
...
This avoids double semicolons after macro expansion.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 44adbebe17
)
14 years ago
Mans Rullgard
44adbebe17
Remove final semicolon from some macros
...
This avoids double semicolons after macro expansion.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
e7e2df27f8
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>
(cherry picked from commit d36beb3f69
)
14 years ago
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>
14 years ago
Martin Storsjö
cfff297d98
adpcm: Skip samples whose ssd calculation has wrapped around
...
Wraparound in ssd is mainly avoided by subtracting the ssd of the
best node from all the others once it has grown large enough.
If using very large trellis sizes (e.g. -trellis 15), the frontier
is so large that the difference between the best and the worst is
large enough to cause wraparound, even if the ssd of the best one
is subtracted regularly.
When using -trellis 10 on a 30 second sample, this causes only a slight
slowdown, from 61 to 64 seconds.
Originally committed as revision 25858 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Martin Storsjö
1a68e7ed15
adpcm: Fix a comment in the trellis heap code
...
This makes the wording consistent with how people usually talk about heaps.
Originally committed as revision 25775 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Martin Storsjö
78f9d35c9a
adpcm: Only increment heap_pos after finding a good enough sample
...
This increases the PSNR slightly (about 0.1 dB) for trellis sizes
below 8, and gives equal PSNR for sizes above that.
Originally committed as revision 25769 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Martin Storsjö
d764e3ece9
adpcm: Use a hash table to improve checking for duplicate samples
...
This lowers the run time from 158 to 21 seconds, for -trellis 8
with a 30 second sample on my machine.
This requires 64 KB additional memory.
Originally committed as revision 25768 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Martin Storsjö
86abf868ec
adpcm: Fix a comment
...
Originally committed as revision 25751 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago