Ignore:
Timestamp:
Nov 23, 2006 10:19:46 AM (17 years ago)
Author:
bennylp
Message:

Updated Speex to their latest SVN (1.2-beta). AEC seems
to work much better now and take less CPU, so I increased
default tail length in PJSUA to 800ms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/speex/cb_search.c

    r641 r823  
    1 /* Copyright (C) 2002 Jean-Marc Valin  
     1/* Copyright (C) 2002-2006 Jean-Marc Valin  
    22   File: cb_search.c 
    33 
     
    8686 
    8787#ifndef OVERRIDE_TARGET_UPDATE 
    88 PJ_INLINE(void) target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len) 
     88static inline void target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len) 
    8989{ 
    9090   int n; 
     
    108108SpeexBits *bits, 
    109109char *stack, 
    110 int   complexity, 
    111110int   update_target 
    112111) 
     
    126125   int shape_cb_size, subvect_size, nb_subvect; 
    127126   const split_cb_params *params; 
    128    int N=2; 
    129127   int best_index; 
    130128   spx_word32_t best_dist; 
    131129   int have_sign; 
    132    N=complexity; 
    133    if (N>10) 
    134       N=10; 
    135    if (N<1) 
    136       N=1; 
    137130    
    138131   params = (const split_cb_params *) par; 
     
    153146   ALLOC(e, nsf, spx_sig_t); 
    154147    
    155    /* FIXME: make that adaptive? */ 
     148   /* FIXME: Do we still need to copy the target? */ 
    156149   for (i=0;i<nsf;i++) 
    157150      t[i]=target[i]; 
     
    294287   if (N>10) 
    295288      N=10; 
     289   /* Complexity isn't as important for the codebooks as it is for the pitch */ 
     290   N=(2*N)/3; 
    296291   if (N<1) 
    297292      N=1; 
    298     
    299293   if (N==1) 
    300294   { 
    301       split_cb_search_shape_sign_N1(target,ak,awk1,awk2,par,p,nsf,exc,r,bits,stack,complexity,update_target); 
     295      split_cb_search_shape_sign_N1(target,ak,awk1,awk2,par,p,nsf,exc,r,bits,stack,update_target); 
    302296      return; 
    303297   } 
     
    348342   } 
    349343    
    350    /* FIXME: make that adaptive? */ 
    351344   for (i=0;i<nsf;i++) 
    352345      t[i]=target[i]; 
     
    515508int   nsf,                      /* number of samples in subframe */ 
    516509SpeexBits *bits, 
    517 char *stack 
     510char *stack, 
     511spx_int32_t *seed 
    518512) 
    519513{ 
     
    602596int   nsf,                      /* number of samples in subframe */ 
    603597SpeexBits *bits, 
    604 char *stack 
     598char *stack, 
     599spx_int32_t *seed 
    605600) 
    606601{ 
    607602   int i; 
    608603   /* FIXME: This is bad, but I don't think the function ever gets called anyway */ 
    609    spx_int32_t seed = 0; 
    610604   for (i=0;i<nsf;i++) 
    611       exc[i]=SHL32(EXTEND32(speex_rand(1, &seed)),SIG_SHIFT); 
     605      exc[i]=SHL32(EXTEND32(speex_rand(1, seed)),SIG_SHIFT); 
    612606} 
Note: See TracChangeset for help on using the changeset viewer.