Fixed a very low-bitrate fixed-point wideband bug (happening mainly with VAD
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Sat, 2 Dec 2006 14:04:43 +0000 (14:04 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Sat, 2 Dec 2006 14:04:43 +0000 (14:04 +0000)
on) caused by incorrect shift in noise_codebook_quant().

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

libspeex/cb_search.c

index 5c68826..f138d8e 100644 (file)
@@ -580,7 +580,7 @@ int   update_target
    VARDECL(spx_sig_t *tmp);
    ALLOC(tmp, nsf, spx_sig_t);
    for (i=0;i<nsf;i++)
-      tmp[i]=PSHR32(EXTEND32(target[i]),SIG_SHIFT);
+      tmp[i]=SHL32(EXTEND32(target[i]),8);
    residue_percep_zero(tmp, ak, awk1, awk2, tmp, nsf, p, stack);
 
    for (i=0;i<nsf;i++)