diff options
author | Martin Storsjo <martin@martin.st> | 2020-11-17 12:38:51 +0200 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2020-11-17 12:38:51 +0200 |
commit | c7a3808a2fd18bb4dad24d281cbb862b241806a9 (patch) | |
tree | 2cea66fef9961cd71efc817fed7e857ef27099b0 /libFDK/src/fixpoint_math.cpp | |
parent | d23a21ab427da642c8f32bb0659ae63a86f98e96 (diff) | |
parent | f4adff7fbb0968a13fd5077ea3df734870aef3cf (diff) | |
download | fdk-aac-c7a3808a2fd18bb4dad24d281cbb862b241806a9.tar.gz fdk-aac-c7a3808a2fd18bb4dad24d281cbb862b241806a9.tar.bz2 fdk-aac-c7a3808a2fd18bb4dad24d281cbb862b241806a9.zip |
Merge remote-tracking branch 'aosp/master'
Diffstat (limited to 'libFDK/src/fixpoint_math.cpp')
-rw-r--r-- | libFDK/src/fixpoint_math.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libFDK/src/fixpoint_math.cpp b/libFDK/src/fixpoint_math.cpp index 6c656fa..1e26420 100644 --- a/libFDK/src/fixpoint_math.cpp +++ b/libFDK/src/fixpoint_math.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 - 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -650,6 +650,12 @@ FIXP_DBL fPow(FIXP_DBL base_m, INT base_e, FIXP_DBL exp_m, INT exp_e, INT ans_lg2_e, baselg2_e; FIXP_DBL base_lg2, ans_lg2, result; + if (base_m <= (FIXP_DBL)0) { + result = (FIXP_DBL)0; + *result_e = 0; + return result; + } + /* Calc log2 of base */ base_lg2 = fLog2(base_m, base_e, &baselg2_e); |