Summary: | ASTERISK-02794: Faster ADPCM and G726-32 codec code | ||
Reporter: | fossil (fossil) | Labels: | |
Date Opened: | 2004-11-11 18:11:11.000-0600 | Date Closed: | 2008-01-15 15:13:49.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/CodecInterface |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) codec_adpcm.v2.diff.txt ( 1) codec_g726.v4.diff.txt ( 2) log2comp.c | |
Description: | I optimized ADPCM and G726-32 codec code somewhat for x86-32 platform (should also work faster on any 32-bit CISC). Some versions are bit-level identical (BLI) to current code and others are not, but still encoding-compatible. Files follow: log2comp.c -- base 2 integer logarithm calc, in ASM where possible; needed by g726; g726.v2 -- BLI g726; faster, but not optimal; g726.v3 -- full-throttle g726; fastest, but not BLI; adpcm.v1 -- faster ADPCM; not BLI, but should give better quality when used symmetrically; | ||
Comments: | By: fossil (fossil) 2004-11-11 19:00:19.000-0600 I have the disclaimer on file with Digium, it applies here. By: Brian West (bkw918) 2004-11-11 23:17:26.000-0600 Works great... By: Mark Spencer (markster) 2004-11-13 11:18:26.000-0600 How easy would it be to have a compile time option to enable the "faster but not bit equivalent" mode? By: fossil (fossil) 2004-11-13 14:36:09.000-0600 Pretty easy I guess. I'll post the new code shortly. By: fossil (fossil) 2004-11-13 16:28:57.000-0600 Joined #ifdef'd code posted: adpcm.v2 and g726.v4. Define NOT_BLI when compiling to get faster code. G726 #ifdefs get a little messy sometimes. By: Mark Spencer (markster) 2004-11-14 19:56:15.000-0600 Added to CVS, thank you *very* much for these contributions. By: Jeffrey C. Ollie (jcollie) 2004-11-14 21:35:46.000-0600 When this patch was applied to CVS it appears that "#include "log2comp.c"" was changed to "#include "log2comp.h"" but no log2comp.h was committed to CVS. By: fossil (fossil) 2004-11-14 21:55:48.000-0600 Right, log2comp.c needs to get committed (into codecs/ as it stands now) renamed to log2comp.h By: Russell Bryant (russell) 2004-11-14 23:32:05.000-0600 added log2comp.c as codecs/log2comp.h By: Digium Subversion (svnbot) 2008-01-15 15:13:46.000-0600 Repository: asterisk Revision: 4249 U trunk/codecs/codec_adpcm.c U trunk/codecs/codec_g726.c ------------------------------------------------------------------------ r4249 | markster | 2008-01-15 15:13:45 -0600 (Tue, 15 Jan 2008) | 2 lines ADPCM and G.726 performance improvements courtesy fOSSiL (bug ASTERISK-2794) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4249 By: Digium Subversion (svnbot) 2008-01-15 15:13:49.000-0600 Repository: asterisk Revision: 4254 A trunk/codecs/log2comp.h ------------------------------------------------------------------------ r4254 | russell | 2008-01-15 15:13:49 -0600 (Tue, 15 Jan 2008) | 2 lines add missing file (bug ASTERISK-2794) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4254 |