[opus] Silence causing encoder slowdown on 32 bit architecture

D. B. dangerbot at gmx.com
Mon Aug 12 11:01:30 PDT 2013


Hi all,
I noticed some odd behavior with the Opus encoder, and I was wondering if this is a known issue.
First, note that this problem occurs when the Opus encoder is created with OPUS_APPLICATION_VOIP, there is no issue if the encoder is created with OPUS_APPLICATION_AUDIO.
If compiled for a 32 bit architecture (i386), the encoder experiences significant slowdowns when regular audio is followed by digital silence. The size of the encoded frames is also far too big: 128 byes for 20ms of pure silence. The problem does not occur if the library was compiled for a 64 bit architecture (amd64).
For example, if a single audio frame (20 ms, 48kHz, mono, 16 bit) normally takes less than a millisecond to encode, after hitting the digital silence opus_encode() can take up to 30ms to encode a single frame. Note that this is longer than the actual frame! Resetting the encoder state after each encoded frame can eliminate the slowdown.
I've tested this with versions 1.0.2, 1.0.3, and a couple of 1.1-beta snapshots. The 1.0.x versions experience significant slowdowns. The 1.1-beta is faster, but still not as fast as it probably should be. The 1.0.x versions were tested on Linux and Windows (same problem on both), 1.1-beta was tested only on Linux. Again, when compiled for 64 bit, all versions are fine.
I noticed a recent commit that references something that might be related: http://git.xiph.org/?p=opus.git;a=commit;h=260474fb81463420adf6acbcfdcac892a4b7c912 
However the changes made in the commit do not seem to affect VOIP. I also tried earlier snapshots and the problem is still there (though not as bad since it's the 1.1 branch).
Any ideas as to what is going on? I can provide more information if it helps.
Thanks,
- DB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20130812/a05fa1ea/attachment.htm 


More information about the opus mailing list