1 Dec 2010 09:57
r25858 - trunk/libavcodec/adpcm.c
mstorsjo <subversion <at> mplayerhq.hu>
2010-12-01 08:57:45 GMT
2010-12-01 08:57:45 GMT
Author: mstorsjo
Date: Wed Dec 1 09:57:45 2010
New Revision: 25858
Log:
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.
Modified:
trunk/libavcodec/adpcm.c
Modified: trunk/libavcodec/adpcm.c
==============================================================================
--- trunk/libavcodec/adpcm.c Tue Nov 30 22:41:26 2010 (r25857)
+++ trunk/libavcodec/adpcm.c Wed Dec 1 09:57:45 2010 (r25858)
<at> <at> -382,6 +382,12 <at> <at> static void adpcm_compress_trellis(AVCod
dec_sample = av_clip_int16(dec_sample);\
d = sample - dec_sample;\
ssd = nodes[j]->ssd + d*d;\
+ /* Check for wraparound, skip such samples completely. \
(Continue reading)
RSS Feed