diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2016-04-05 17:51:06 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-05 17:51:06 +0000 |
commit | b802750fd273c5914970b4cfa0c959fc5fcc32a4 (patch) | |
tree | a8dc54ef8dba931c72627e7bbebf1844b81a31f7 /libSBRenc/src/nf_est.cpp | |
parent | bb7ad8711b3b620a7c7de669b7b6409e610c29dd (diff) | |
parent | 65750eae6583754ea9d84fed41dc12d1fc3d73d0 (diff) | |
download | fdk-aac-b802750fd273c5914970b4cfa0c959fc5fcc32a4.tar.gz fdk-aac-b802750fd273c5914970b4cfa0c959fc5fcc32a4.tar.bz2 fdk-aac-b802750fd273c5914970b4cfa0c959fc5fcc32a4.zip |
SBR/AAC encoder updates, code clean up am: e1c78ed
am: 65750ea
* commit '65750eae6583754ea9d84fed41dc12d1fc3d73d0':
SBR/AAC encoder updates, code clean up
Change-Id: Ife18fb3ee2fe76fab1e5ab8256addf5d39834c2f
Diffstat (limited to 'libSBRenc/src/nf_est.cpp')
-rw-r--r-- | libSBRenc/src/nf_est.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libSBRenc/src/nf_est.cpp b/libSBRenc/src/nf_est.cpp index 7a3c022..385a043 100644 --- a/libSBRenc/src/nf_est.cpp +++ b/libSBRenc/src/nf_est.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2015 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -268,8 +268,9 @@ qmfBasedNoiseFloorDetection(FIXP_DBL *noiseLevel, /*!< Pointer to v /* * Add a noise floor offset to compensate for bias in the detector *****************************************************************/ - if(!missingHarmonicFlag) - *noiseLevel = fMult(*noiseLevel, noiseFloorOffset)<<(NOISE_FLOOR_OFFSET_SCALING); + if(!missingHarmonicFlag) { + *noiseLevel = fixMin(fMult(*noiseLevel, noiseFloorOffset), (FIXP_DBL)MAXVAL_DBL>>NOISE_FLOOR_OFFSET_SCALING) << NOISE_FLOOR_OFFSET_SCALING; + } /* * check to see that we don't exceed the maximum allowed level |