pyj4104 / sipdroid

Automatically exported from code.google.com/p/sipdroid
GNU General Public License v3.0
0 stars 0 forks source link

Some of the sipdroid classes (org.zoolu) need optimization #358

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Select BV16 codec
2.Initiate call
3.monitor CPU utilization via top

What is the expected output? What do you see instead?
It seems the org.zoolu classes are consuming a large amount of CPU 
resources, preventing other more "expensive" codecs from being implemented 
(e.g. BV16, G729, ILBC).

Please use labels and text to provide additional information.

Over the past few weeks I've been studying the Sipdroid code and have 
attempted to add a new codec, Broadcom's BV16. If you notice I checked it 
in a few weeks ago. I works, albeit with some packets being dropped. Why is 
that? Because the CPU is pegged at 100% most of the time! During my 
debugging and testing it became apparent there is very little room for 
"expensive" codecs. I've attached two traceviews to this post to show the 
comparison of alaw vs bv16. For those interested I initiated the traceview 
in the file Call.java in the call() method with the following statement: 
Debug.startMethodTracing("sipdroid.trace",36000000);.  To stop the trace I 
call Debug.stopMethodTracing(); in the hangup() method.

Note in the alaw trace the codec itself consumes very little process time 
(< .5% exclusive) - the codec begins about 35 seconds into the trace. 
Contrast that with the BV16 codec (also starts around 35 seconds into the 
trace). The BV16 encode method consume 19% of the process time! If you note 
from the traceview list the next largest method of CPU consumption is the 
Parser routines. It seems these methods are called repeatedly and it would 
probably benefit from native code and or other optimization. I've begun to 
do this with a Parser_jni port but am beginning to hit a wall with 
complicated methods that pass and initialize objects between java and c++.

Do you have any suggestions as to how this code might be improved? I 
briefly tried the JIT patch for Dalvik that has been ported to Android 1.6 
but alas that proved of little benefit for sipdroid.

I believe other codecs like ilibc and G729 might suffer a similar fate to 
BV16 until the sipdroid code is optimized. I already have the wideband 
codec BV32 ported but this too unfortunately suffers from the same problem. 
Thanks.

Original issue reported on code.google.com by carlos.t...@gmail.com on 8 Mar 2010 at 8:11

Attachments:

GoogleCodeExporter commented 9 years ago
Hi! carlos

I agree with you.I have the same problem when i check with bv16 to initiate a 
call.Are you sure? expensive g729 codec is implemented by bv16 source code or 
get some help from there.

Original comment by ocean.ra...@gmail.com on 11 Oct 2010 at 5:15

GoogleCodeExporter commented 9 years ago
Thanks every one.g729 codec development is possible for sipdroid open source.At 
last i complete g729 codec for android sipdroid open source project.Thanks 
every one of android developer those people who help me to complete the 
sipdialer.i think i will get help from this forum later if i face any 
problem.last time i talk with from my HTC Wildfire device about 1 hour 
successful call.voice quality with g729 codec was very good for me.if any one 
face "can't hear the other person" problem then you just install the apk for 
your device (HTC wildfire) and after installed your sipdroid application just 
reboot your device i think problem will be solve.

**another time i tell that if i face any problem then i think i will get help 
from this forum**pray for me......

Original comment by ocean.ra...@gmail.com on 18 Oct 2010 at 7:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
please help...
iam reading the sipdroid codes 2.9 ver and i need to determined which class 
that take the voice from mice and send it to the other side ? please any one 
can help me?

Original comment by ali.bajl...@gmail.com on 17 Mar 2013 at 6:26