summaryrefslogtreecommitdiffstats
path: root/libSBRenc/src/nf_est.cpp
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2016-04-05 17:43:33 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-05 17:43:33 +0000
commit65750eae6583754ea9d84fed41dc12d1fc3d73d0 (patch)
treea8dc54ef8dba931c72627e7bbebf1844b81a31f7 /libSBRenc/src/nf_est.cpp
parent0713b4acff1a489e7d49725dc7c5e3dad370b5c8 (diff)
parente1c78ed73faa51f2c7fcb0c4a17a92be9cc747f5 (diff)
downloadfdk-aac-65750eae6583754ea9d84fed41dc12d1fc3d73d0.tar.gz
fdk-aac-65750eae6583754ea9d84fed41dc12d1fc3d73d0.tar.bz2
fdk-aac-65750eae6583754ea9d84fed41dc12d1fc3d73d0.zip
SBR/AAC encoder updates, code clean up
am: e1c78ed * commit 'e1c78ed73faa51f2c7fcb0c4a17a92be9cc747f5': SBR/AAC encoder updates, code clean up Change-Id: I908adc47823de593c3e258c67f360da9321780f5
Diffstat (limited to 'libSBRenc/src/nf_est.cpp')
-rw-r--r--libSBRenc/src/nf_est.cpp7
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