Summary:ASTERISK-04139: [patch] log2 shadows builtin floating point function.
Reporter:David Woodhouse (dwmw2)Labels:
Date Opened:2005-05-11 08:21:50Date Closed:2008-01-15 15:34:31.000-0600
Versions:Frequency of
Environment:Attachments:( 0) log2.patch.txt
Description:log2 is supposed to be a floating point function; we shouldn't redefine it in
codecs/log2comp.h. This patch renames it to ilog2, and provides a PPC assembly version while we're at it.

Testing shows that my ASM version differs in behaviour from the C version, because the C version will go into an endless loop if it's given an argument which is negative. I didn't see fit to emulate that behaviour. Neither have I fixed it -- someone more familiar with the g726 code needs to check if it's sane just to make it 'unsigned ilog2(unsigned)'. Since that's the behaviour of the asm versions anyway, I'd assume so.


Disclaimer on file.
Comments:By: Kevin P. Fleming (kpfleming) 2005-05-14 23:12:55

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:34:31.000-0600

Repository: asterisk
Revision: 5663

U   trunk/codecs/codec_g726.c
U   trunk/codecs/log2comp.h

r5663 | kpfleming | 2008-01-15 15:34:31 -0600 (Tue, 15 Jan 2008) | 2 lines

don't define a local function with the same name as a library function (bug ASTERISK-4139)