[Speex-dev] 11kbps narrowband on a 24bit DSP

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Mon Aug 6 17:06:41 PDT 2007


I've never tried Speex on a 24-bit DSP, but I would suggest actually
leaving the code (nearly) as-is. The scaling factors actually should not
change because I'm using integer multiplications, not fractional
multiplications. So what should happen is that the top 8 bits or 24-bit
values and the top 16-bit of 48-bit values will be unused (filled with
sign bits). There may be a few cases where 32-bit values could be
changed to 24-bit ones, but don't bother with that in the short term.

	Jean-Marc

Barr, Russell a écrit :
> Hi,
> 
>  
> 
> I am using speex 1.2beta2 on a 24bit DSP that has a severe program and
> data space limitations. I am only interested in the speex decoder for
> 11kbps narrowband implementation. 
> 
>  
> 
> I am using the following parameters and structures
> 
>  
> 
> 160,    /*frameSize*/
> 
>   40,     /*subframeSize*/
> 
>   10,     /*lpcSize*/
> 
>   17,     /*pitchStart*/
> 
>   144,    /*pitchEnd*/ 
> 
>  
> 
> /* 11 kbps medium bit-rate mode */
> 
> static const SpeexSubmode nb_submode4 = {
> 
>    -1,
> 
>    0,
> 
>    1,
> 
>    0,
> 
>    /*LSP quantization*/
> 
>    lsp_quant_lbr,
> 
>    lsp_unquant_lbr,
> 
>    /*Pitch quantization*/
> 
>    pitch_search_3tap,
> 
>    pitch_unquant_3tap,
> 
>    &ltp_params_med,
> 
>    /*Innovation quantization*/
> 
>    split_cb_search_shape_sign,
> 
>    split_cb_shape_sign_unquant,
> 
>    &split_cb_nb_med,
> 
>    QCONST16(.45,15),
> 
>    220
> 
> };
> 
>  
> 
> /* Parameters for Long-Term Prediction (LTP)*/
> 
> static const ltp_params ltp_params_lbr = {
> 
>    gain_cdbk_lbr,
> 
>    5,
> 
>    7
> 
> };
> 
>  
> 
> /* Split-VQ innovation parameters narrowband */
> 
> static const split_cb_params split_cb_nb_med = {
> 
>    8,               /*subvect_size*/
> 
>    5,               /*nb_subvect*/
> 
>    exc_8_128_table, /*shape_cb*/
> 
>    7,               /*shape_bits*/
> 
>    0,
> 
>  
> 
>  
> 
>  
> 
> I have three problems.
> 
>  
> 
> 1.	My DSP has 24 bits register and memory with a 24 X 24 = 48 bit
> multiply and a 56 bit accumulator. I see scaling shifts when using 32
> bit registers. Can anyone tell me what scaling values like 
> 
>  
> 
> #define LPC_SCALING  8192
> 
> #define SIG_SCALING  16384
> 
> #define LSP_SCALING  8192.
> 
> #define GAMMA_SCALING 32768.
> 
> #define GAIN_SCALING 64
> 
> #define GAIN_SCALING_1 0.015625
> 
>  
> 
> #define LPC_SHIFT    13
> 
> #define LSP_SHIFT    13
> 
> #define SIG_SHIFT    14
> 
>  
> 
>             Would be required for a 24 bit register?  
> 
>  
> 
> 2.	I would like to only include only the data tables as required to
> support 11kbps narrowband mode. I think they would be the following
> signed byte tables
> 
> cdbk_nb[640]
> 
> cdbk_nb_low1[320]
> 
> cdbk_nb_high1[320]
> 
> gain_cdbk_lbr[128]
> 
> exc_8_128_table[1024]
> 
>             Have I missed any?
> 
>  
> 
> 3.	I would like to estimate the code space and duty cycle
> requirements using fix point 11kbps narrowband decode. I think I have
> identified most of the routines that use most of the duty cycle but I am
> not sure if I have found them all. 
> 
> speex_bits_unpack_unsigned()
> 
> peex_bits_unpack_signed()
> 
> split_cb_shape_sign_unquant()
> 
> pitch_unquant_3tap()
> 
> lsp_unquant_lbr()
> 
>             I will be porting there routines to assembly and would like
> to know that I have a chance of fitting them in the 2K I have free.  
> 
>             Is there a minimal list of decode routines that are
> required?
> 
>  
> 
>  
> 
> Thanks for any help possible
> 
>  
> 
> Russell Barr
> 
> Vocollect, Inc
> 
> 703 Rodi Road
> 
> Pittsburgh, Pa 15235
> 
>  
> 
> Phone: 412-349-2581
> 
> Fax:     412-829-0972
> 
> Email:  rbarr at vocollect.com <mailto:rbarr at vocollect.com> 
> 
>  
> 
> www.vocollect.com <http://www.vocollect.com>  
> 
>  
> 
> Vocollect Voice-Directed Work
> 
> -CONFIDENTIAL, PRIVILEGED COMMUNICATION-
> 
> This e-mail transmission is private and intended for the addressee(s)
> only.  It may contain information that is privileged and/or
> confidential.  If you have received this transmission in error, you are
> not authorized to read, copy, disclose or disseminate it in any manner.
> If you have received it in error, please delete it and all copies
> (including backup copies) that have been made, and transmit a reply
> message informing the sender that it was misdirected.
> 
>  
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev


More information about the Speex-dev mailing list