Oops. Thanks to Jim Crichton for pointing out that the complexity could end up
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Mon, 14 Aug 2006 13:24:48 +0000 (13:24 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Mon, 14 Aug 2006 13:24:48 +0000 (13:24 +0000)
being 0 in the fixed-codebook.

git-svn-id: http://svn.xiph.org/trunk/speex@11771 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/cb_search.c

index 33c154f..5c68826 100644 (file)
@@ -286,10 +286,10 @@ int   update_target
    N=complexity;
    if (N>10)
       N=10;
-   if (N<1)
-      N=1;
    /* Complexity isn't as important for the codebooks as it is for the pitch */
    N=(2*N)/3;
+   if (N<1)
+      N=1;
    if (N==1)
    {
       split_cb_search_shape_sign_N1(target,ak,awk1,awk2,par,p,nsf,exc,r,bits,stack,update_target);