diff options
author | Xin Li <delphij@google.com> | 2020-08-27 10:16:06 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2020-08-27 10:16:06 -0700 |
commit | 7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45 (patch) | |
tree | 0e353968c34e8c9699663a9b252836b70847c30b /libSBRdec/src/sbrdec_freq_sca.cpp | |
parent | 946a672b0f5b8481eb3a429f854fcb34d847d692 (diff) | |
parent | e0624f4c05df8b171555bc8c8748ee93655f5b3e (diff) | |
download | fdk-aac-7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45.tar.gz fdk-aac-7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45.tar.bz2 fdk-aac-7a0dde5d5dc4d24095c0391e7fa8297de3c7cd45.zip |
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I9bd31724ae68b9a0b3eb4bb5be3782359824aa1f
Change-Id: Idcdb13a8c37b0b4b5446169c3e80dfe55586bc77
Diffstat (limited to 'libSBRdec/src/sbrdec_freq_sca.cpp')
-rw-r--r-- | libSBRdec/src/sbrdec_freq_sca.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libSBRdec/src/sbrdec_freq_sca.cpp b/libSBRdec/src/sbrdec_freq_sca.cpp index 165f94b..e187656 100644 --- a/libSBRdec/src/sbrdec_freq_sca.cpp +++ b/libSBRdec/src/sbrdec_freq_sca.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -230,6 +230,8 @@ static UCHAR getStopBand( } } + stopMin = fMin(stopMin, 64); + /* Choose a stop band between k1 and 64 depending on stopFreq (0..13), based on a logarithmic scale. @@ -523,7 +525,8 @@ static FIXP_SGL calcFactorPerBand(int k_start, int k_stop, int num_bands) { step = FL2FXCONST_DBL(0.0f); } } - return FX_DBL2FX_SGL(bandfactor << 1); + return (bandfactor >= FL2FXCONST_DBL(0.5)) ? (FIXP_SGL)MAXVAL_SGL + : FX_DBL2FX_SGL(bandfactor << 1); } /*! |