summaryrefslogtreecommitdiffstats
path: root/libAACenc/src/intensity.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2013-11-01 10:46:40 +0200
committerMartin Storsjo <martin@martin.st>2013-11-01 10:46:40 +0200
commit321233ee92e138f44294c7bb9a375eadad9d24fa (patch)
tree1de928ad26325302f64c56603157f50095dcf2b1 /libAACenc/src/intensity.cpp
parentfcb5f1b692cb8343de35e69f9084328c652cf690 (diff)
parentfa3eba16446cc8f2f5e2dfc20d86a49dbd37299e (diff)
downloadfdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.gz
fdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.bz2
fdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.zip
Merge remote-tracking branch 'aosp/kitkat-release' into kitkat-merge
Conflicts: libAACenc/src/quantize.cpp
Diffstat (limited to 'libAACenc/src/intensity.cpp')
-rw-r--r--libAACenc/src/intensity.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/libAACenc/src/intensity.cpp b/libAACenc/src/intensity.cpp
index 632620a..3807233 100644
--- a/libAACenc/src/intensity.cpp
+++ b/libAACenc/src/intensity.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -450,23 +450,24 @@ FDKaacEnc_finalizeIntensityDecision(const FIXP_DBL *hrrErr,
const INT maxSfbPerGroup)
{
INT sfb,sfboffs, j;
- INT startIsSfb = 0;
- INT inIsBlock;
- INT currentIsSfbCount;
- FIXP_DBL overallHrrError;
FIXP_DBL isScaleLast = FL2FXCONST_DBL(0.0f);
- FIXP_DBL isRegionLoudness;
+ INT isStartValueFound = 0;
for (sfboffs = 0; sfboffs < sfbCnt; sfboffs += sfbPerGroup) {
- inIsBlock = 0;
- currentIsSfbCount = 0;
- overallHrrError = FL2FXCONST_DBL(0.0f);
- isRegionLoudness = FL2FXCONST_DBL(0.0f);
+ INT startIsSfb = 0;
+ INT inIsBlock = 0;
+ INT currentIsSfbCount = 0;
+ FIXP_DBL overallHrrError = FL2FXCONST_DBL(0.0f);
+ FIXP_DBL isRegionLoudness = FL2FXCONST_DBL(0.0f);
+
for (sfb = 0; sfb < maxSfbPerGroup; sfb++) {
if (isMask[sfboffs + sfb] == 1) {
if (currentIsSfbCount == 0) {
startIsSfb = sfboffs + sfb;
+ }
+ if (isStartValueFound==0) {
isScaleLast = realIsScale[sfboffs + sfb];
+ isStartValueFound = 1;
}
inIsBlock = 1;
currentIsSfbCount++;
@@ -510,6 +511,14 @@ FDKaacEnc_finalizeIntensityDecision(const FIXP_DBL *hrrErr,
for(j = startIsSfb; j <= sfboffs + sfb; j++) {
isMask[j] = 0;
}
+ isScaleLast = FL2FXCONST_DBL(0.0f);
+ isStartValueFound = 0;
+ for (j=0; j < startIsSfb; j++) {
+ if (isMask[j]!=0) {
+ isScaleLast = realIsScale[j];
+ isStartValueFound = 1;
+ }
+ }
}
currentIsSfbCount = 0;
overallHrrError = FL2FXCONST_DBL(0.0f);