fixed point bug fix in tf_analysis()

This commit is contained in:
Jean-Marc Valin 2010-07-06 17:54:33 -04:00
parent c7bcf389da
commit b6a5f9d38f
2 changed files with 4 additions and 5 deletions

View file

@ -550,7 +550,7 @@ static int tf_analysis(celt_word16 *bandLogE, celt_word16 *oldBandE, int len, in
{
int i;
celt_word16 threshold;
VARDECL(celt_word32, metric);
VARDECL(celt_word16, metric);
celt_word32 average=0;
celt_word32 cost0;
celt_word32 cost1;
@ -602,8 +602,8 @@ static int tf_analysis(celt_word16 *bandLogE, celt_word16 *oldBandE, int len, in
/* Viterbi forward pass */
for (i=1;i<len;i++)
{
celt_word16 curr0, curr1;
celt_word16 from0, from1;
celt_word32 curr0, curr1;
celt_word32 from0, from1;
from0 = cost0;
from1 = cost1 + lambda;

View file

@ -116,6 +116,5 @@ int check_mode(const CELTMode *mode);
int celt_encode_with_ec(CELTEncoder * restrict st, const celt_int16 * pcm, celt_int16 * optional_resynthesis, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc);
int celt_encode_with_ec_float(CELTEncoder * restrict st, const float * pcm, float * optional_resynthesis, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc);
int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, int len, celt_int16 * restrict pcm, int frame_size, ec_dec *dec);
int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *data, int len, celt_sig * restrict pcm, int frame_size, ec_dec *dec);
int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *data, int len, float * restrict pcm, int frame_size, ec_dec *dec);
#endif