> I just (mildly) wasted a bunch of time (did learn a bit...) getting the
> stable codec2 release running on a ChipKit Max32 (80 MHz PIC) from
> Digilent. Unfortunately, the execution time of the encode function is on
> the order of 200 ms. I don't think attempting to optimize the code to a
> fixed-point implementation using Microchip's FFT libraries will get
> things down to a reasonable run time ( < 125 microseconds) on this device.
Hi, just to put a stake in the ground, on my asterisk box I have an
elderly version of codec2 running (back from when it was at 2,500
kbits). Asterisk can run a benchmark of translation times between
various codes, which is useful for understanding how close to realtime
or how many channels you can handle on a certain box.
The results below are on my office PBX, which is an elderly Epia M-II 1.2Ghz
asterisk*CLI> core show translation
Translation times between formats (in microseconds) for one second of
data
Source Format (Rows) Destination Format (Columns)
g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc
g726 g722 siren7 siren14 slin16 g719 speex16 codec2 testlaw
g723 - 15998 1001 1001 16998 2000 1000 16998 19997 56992 70989
15997 5000 - - 12999 - 53993 117982 1999
gsm 41994 - 12999 12999 28996 13998 12998 28996 31995 68990 82987
27995 16998 - - 24997 - 65991 129980 13997
ulaw 28997 14999 - 1 15999 1001 1 15999 18998 55993 69990
14998 4001 - - 12000 - 52994 116983 1000
alaw 28997 14999 1000 - 15999 1001 1 15999 18998 55993 69990
14998 4001 - - 12000 - 52994 116983 1000
g726aal2 37995 23997 9000 9000 - 9999 8999 24997 27996 64991 78988
23996 12999 - - 20998 - 61992 125981 9998
adpcm 29996 15998 1001 1001 16998 - 1000 16998 19997 56992 70989
15997 5000 - - 12999 - 53993 117982 1999
slin 28996 14998 1 1 15998 1000 - 15998 18997 55992 69989
14997 4000 - - 11999 - 52993 116982 999
lpc10 39995 25997 11000 11000 26997 11999 10999 - 29996 66991 80988
25996 14999 - - 22998 - 63992 127981 11998
g729 35995 21997 7000 7000 22997 7999 6999 22997 - 62991 76988
21996 10999 - - 18998 - 59992 123981 7998
speex 45994 31996 16999 16999 32996 17998 16998 32996 35995 - 86987
31995 20998 - - 28997 - 69991 133980 17997
ilbc 40995 26997 12000 12000 27997 12999 11999 27997 30996 67991 -
26996 15999 - - 23998 - 64992 128981 12998
g726 37994 23996 8999 8999 24996 9998 8998 24996 27995 64990 78987
- 12998 - - 20997 - 61991 125980 9997
g722 35995 21997 7000 7000 22997 7999 6999 22997 25996 62991 76988
21996 - - - 7999 - 48993 123981 7998
siren7 - - - - - - - - - - -
- - - - - - - - -
siren14 - - - - - - - - - - -
- - - - - - - - -
slin16 44994 30996 15999 15999 31996 16998 15998 31996 34995 71990 85987
30995 8999 - - - - 40994 132980 16997
g719 - - - - - - - - - - -
- - - - - - - - -
speex16 61992 47994 32997 32997 48994 33996 32996 48994 51993 88988102985
47993 25997 - - 16998 - - 149978 33995
codec2121982107984 92987 92987 108984 93986
92986108984111983148978162975107983 96986 - - 104985 - 145979
- 93985
testlaw 28997 14999 2 2 15999 1001 1 15999 18998 55993 69990
14998 4001 - - 12000 - 52994 116983 -
Because this will certainly break horribly, below is an extract of ilbc,
speex and codec2 results, from ulaw, to each codec (in us)
speex 16999
ilbc 12000
codec2 92987
So we can see that Asterisk on a 1.2Ghz, x86 class machine needs around
0.1s to encode
Additionally we can see that known heavy weight codes such as speex are
about 5.5x faster... (ilbc is nearly 8x faster, g729 over 13x faster)
Ideally these results need re-running with the latest code, however, in
the meantime I think the takeaway should be that there are probably some
decent speedups to be found?
> Have any of you implemented and run the codec in real-time on any other
> small devices. I'm thinking about taking a look at a Raspberry Pi (700
> MHz) or a Beagle-board XM (1 GHz).
My favourite boards at the moment are the PC Engines Alix boards. OK,
arguably a little large, not the fastest, could do with a little more
ram, BUT, x86 compatible (behaves like a 586). I like the Alix 3d13 for
a small router/firewall (currently using one on our office network
routing a 75mbit PPPoE dsl line, nat, conntrack and a fairly moderate
sized iptables setup and it's burning about 20% CPU at full tilt (with
large-ish ip packets). The current kernel doesn't appear to implement
CRC offloading to the NIC, so it's quite possible this could be improved
further if required.
So basically it's just about good enough for a 100mbit 3 NIC router (can
obviously add additional USB2/mini-PCI nics), for around $100. 1x GPIO,
LPC and I2C. Boots from CF.
Cheers
Ed W
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2