OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44942d5
)
Fix an underflow/overflow that was causing some crackles when playing
author
Marco Gerards
<mgerards@xs4all.nl>
Tue, 10 Apr 2007 08:18:04 +0000
(08:18 +0000)
committer
Diego Biurrun
<diego@biurrun.de>
Tue, 10 Apr 2007 08:18:04 +0000
(08:18 +0000)
certain THP files.
patch by Marco Gerards, mgerards xs4all nl
Originally committed as revision 8703 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/adpcm.c
patch
|
blob
|
history
diff --git
a/libavcodec/adpcm.c
b/libavcodec/adpcm.c
index
d02ccfb
..
57281d1
100644
(file)
--- a/
libavcodec/adpcm.c
+++ b/
libavcodec/adpcm.c
@@
-1359,8
+1359,10
@@
static int adpcm_decode_frame(AVCodecContext *avctx,
if(n&1) sampledat= *src++ <<28;
else sampledat= (*src&0xF0)<<24;
-
*samples
= ((prev[ch][0]*factor1
+
sampledat
= ((prev[ch][0]*factor1
+ prev[ch][1]*factor2) >> 11) + (sampledat>>exp);
+ CLAMP_TO_SHORT(sampledat);
+ *samples = sampledat;
prev[ch][1] = prev[ch][0];
prev[ch][0] = *samples++;