diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-08-23 23:14:32 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-08-23 23:14:32 +0000 |
commit | 20de4c55a2ddfa802a01cc353884d73a934bf7ba (patch) | |
tree | 67426016d2cc64f661f53a29725005ad4bdc2655 | |
parent | aea21cd18be1069e23d4703fd1daca616e2c2940 (diff) | |
download | rockbox-20de4c55a2ddfa802a01cc353884d73a934bf7ba.tar.gz rockbox-20de4c55a2ddfa802a01cc353884d73a934bf7ba.zip |
Fix libfaad error that was introduced with r27225. Noise bursts during playback of several files were reported in the forums.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27868 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/libfaad/specrec.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/apps/codecs/libfaad/specrec.c b/apps/codecs/libfaad/specrec.c index d21a923384..02eac11878 100644 --- a/apps/codecs/libfaad/specrec.c +++ b/apps/codecs/libfaad/specrec.c | |||
@@ -606,12 +606,19 @@ static uint8_t quant_to_spec(NeAACDecHandle hDecoder, | |||
606 | 606 | ||
607 | #else | 607 | #else |
608 | wb = wa + bin; | 608 | wb = wa + bin; |
609 | 609 | ||
610 | spec_data[wb+0] = MUL_C((iquant(quant_data[k+0], tab, &error)<<exp), scf); | 610 | if (exp>=0) |
611 | spec_data[wb+1] = MUL_C((iquant(quant_data[k+1], tab, &error)<<exp), scf); | 611 | { |
612 | spec_data[wb+2] = MUL_C((iquant(quant_data[k+2], tab, &error)<<exp), scf); | 612 | spec_data[wb+0] = MUL_C((iquant(quant_data[k+0], tab, &error)<< exp), scf); |
613 | spec_data[wb+3] = MUL_C((iquant(quant_data[k+3], tab, &error)<<exp), scf); | 613 | spec_data[wb+1] = MUL_C((iquant(quant_data[k+1], tab, &error)<< exp), scf); |
614 | 614 | spec_data[wb+2] = MUL_C((iquant(quant_data[k+2], tab, &error)<< exp), scf); | |
615 | spec_data[wb+3] = MUL_C((iquant(quant_data[k+3], tab, &error)<< exp), scf); | ||
616 | } else { | ||
617 | spec_data[wb+0] = MUL_C((iquant(quant_data[k+0], tab, &error)>>-exp), scf); | ||
618 | spec_data[wb+1] = MUL_C((iquant(quant_data[k+1], tab, &error)>>-exp), scf); | ||
619 | spec_data[wb+2] = MUL_C((iquant(quant_data[k+2], tab, &error)>>-exp), scf); | ||
620 | spec_data[wb+3] = MUL_C((iquant(quant_data[k+3], tab, &error)>>-exp), scf); | ||
621 | } | ||
615 | //#define SCFS_PRINT | 622 | //#define SCFS_PRINT |
616 | #ifdef SCFS_PRINT | 623 | #ifdef SCFS_PRINT |
617 | printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+0]); | 624 | printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+0]); |