[SCM] libav/experimental: adpcm: Only increment heap_pos after finding a good enough sample
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:19:07 UTC 2013
The following commit has been merged in the experimental branch:
commit 78f9d35c9abeb9842656fa9344ca34fe370ce1db
Author: Martin Storsjö <martin at martin.st>
Date: Fri Nov 19 17:36:29 2010 +0000
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
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 6a6c77b..5e7c54f 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -401,9 +401,10 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, const short *samples,
} else {\
/* Try to replace one of the leaf nodes with the new \
* one, but try a different slot each time. */\
- pos = (frontier >> 1) + (heap_pos++ & ((frontier >> 1) - 1));\
+ pos = (frontier >> 1) + (heap_pos & ((frontier >> 1) - 1));\
if (ssd > nodes_next[pos]->ssd)\
goto next_##NAME;\
+ heap_pos++;\
}\
*h = generation;\
u = nodes_next[pos];\
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list