diff options
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 |