aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRenc/src/nf_est.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2016-08-25 22:12:15 +0300
committerMartin Storsjo <martin@martin.st>2016-08-25 22:12:15 +0300
commitf9d0f65e6578592149c01d8417197896283a821f (patch)
treeb6293c11023d196ed31b9c6ef765d645d872db49 /libSBRenc/src/nf_est.cpp
parent15b128dd826ba86ee962d86b0b06966a25ed9158 (diff)
parent00fc1c66d5a524c6961db04d05e1076b18003231 (diff)
downloadfdk-aac-f9d0f65e6578592149c01d8417197896283a821f.tar.gz
fdk-aac-f9d0f65e6578592149c01d8417197896283a821f.tar.bz2
fdk-aac-f9d0f65e6578592149c01d8417197896283a821f.zip
Merge remote-tracking branch 'aosp/master'
Diffstat (limited to 'libSBRenc/src/nf_est.cpp')
-rw-r--r--libSBRenc/src/nf_est.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libSBRenc/src/nf_est.cpp b/libSBRenc/src/nf_est.cpp
index 7a3c022..a4c5574 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
@@ -297,7 +298,7 @@ FDKsbrEnc_sbrNoiseFloorEstimateQmf(HANDLE_SBR_NOISE_FLOOR_ESTIMATE h_sbrNoiseFlo
SCHAR *indexVector, /*!< Index vector to obtain the patched data. */
INT missingHarmonicsFlag, /*!< Flag indicating if a strong tonal component will be missing. */
INT startIndex, /*!< Start index. */
- int numberOfEstimatesPerFrame, /*!< The number of tonality estimates per frame. */
+ UINT numberOfEstimatesPerFrame, /*!< The number of tonality estimates per frame. */
int transientFrame, /*!< A flag indicating if a transient is present. */
INVF_MODE* pInvFiltLevels, /*!< Pointer to the vector holding the inverse filtering levels. */
UINT sbrSyntaxFlags