[asterisk-bugs] [Asterisk 0017501]: [patch] Speex Wideband Support

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jun 15 01:24:01 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17501 
====================================================================== 
Reported By:                fabled
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17501
Category:                   Codecs/codec_speex
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
JIRA:                       SWP-1707 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 270075 
Request Review:              
====================================================================== 
Date Submitted:             2010-06-12 10:32 CDT
Last Modified:              2010-06-15 01:24 CDT
====================================================================== 
Summary:                    [patch] Speex Wideband Support
Description: 
Add support for Speex Wideband (16 kHz) codec.
====================================================================== 

---------------------------------------------------------------------- 
 (0123407) fabled (reporter) - 2010-06-15 01:24
 https://issues.asterisk.org/view.php?id=17501#c123407 
---------------------------------------------------------------------- 
Thank you for the capture. There's one bit of speex frame parsing in the
asterisk core code, and it had some bugs in it. It should now properly
decode the wideband silence frames.

The three changes to speex drame decoder in main/frame.c are as follows:

1. Remove "not enough bits" warning. It's perfectly acceptable for the
stream to end without the 5-bit terminator. This becomes evident if you
look at libspeex/bits.c how the terminator is encoded: it's one 0-bit
followed by 1-bits until byte boundary and only if we were not byte aligned
in the first place. Thus, when stream ends termination is implicit. This
caused problems in wideband due to different bit length wideband frames
causing different termination patterns. Proper solution is just to remove
the check for enough bits. (Present in patch v1.)

And the following added to patch v2:

2. Modification to SpeexWBSubModeSz in speex_get_wb_sz_at(). Wideband
subtype https://issues.asterisk.org/view.php?id=0 is valid: it's used as silence
indicator, and needs the header
bits to be skipped (length 4 instead of 0). This is the bug that caused the
errors for you.

3. Handling of user in-band signals in narrowband submode 13.
libspeex/speex_callbacks.c has speex_default_user_handler() that does the
winding of bits differently. The code is fixed to follow libspeex. This
probably does not matter since I haven't seen any one use user in-band
signals.

Please test again to confirm that the bug is fixed. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-15 01:24 fabled         Note Added: 0123407                          
======================================================================




More information about the asterisk-bugs mailing list