summaryrefslogtreecommitdiffstats
path: root/fdk-aac/libSACdec/src/sac_process.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-05 19:05:48 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-05 19:05:48 +0100
commit28ec47d8887f43ba54d79dd6d738aef1ff0ec9b9 (patch)
tree36714366ee8883927f57e096490c209d8317ee99 /fdk-aac/libSACdec/src/sac_process.cpp
parentc573d3e3cfa9afe42bb3aafae17d527a7f608d55 (diff)
downloadODR-AudioEnc-28ec47d8887f43ba54d79dd6d738aef1ff0ec9b9.tar.gz
ODR-AudioEnc-28ec47d8887f43ba54d79dd6d738aef1ff0ec9b9.tar.bz2
ODR-AudioEnc-28ec47d8887f43ba54d79dd6d738aef1ff0ec9b9.zip
Update fdk-aac to v2.0.3
Diffstat (limited to 'fdk-aac/libSACdec/src/sac_process.cpp')
-rw-r--r--fdk-aac/libSACdec/src/sac_process.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/fdk-aac/libSACdec/src/sac_process.cpp b/fdk-aac/libSACdec/src/sac_process.cpp
index 22091a9..33a1647 100644
--- a/fdk-aac/libSACdec/src/sac_process.cpp
+++ b/fdk-aac/libSACdec/src/sac_process.cpp
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten
+© Copyright 1995 - 2021 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@@ -517,12 +517,11 @@ SACDEC_ERROR SpatialDecApplyM2_Mode212_ResidualsPlusPhaseCoding(
maxVal = fAbs(iReal0) | fAbs(iImag0);
maxVal |= fAbs(iReal1);
- s = fMax(CntLeadingZeros(maxVal) - 1, 0);
- s = fMin(s, scale_param_m2);
+ s = fMin(CntLeadingZeros(maxVal) - 2, scale_param_m2);
- mReal0 = iReal0 << s;
- mImag0 = iImag0 << s;
- mReal1 = iReal1 << s;
+ mReal0 = scaleValue(iReal0, s);
+ mImag0 = scaleValue(iImag0, s);
+ mReal1 = scaleValue(iReal1, s);
s = scale_param_m2 - s;
@@ -562,12 +561,11 @@ SACDEC_ERROR SpatialDecApplyM2_Mode212_ResidualsPlusPhaseCoding(
maxVal = fAbs(iReal0) | fAbs(iImag0);
maxVal |= fAbs(iReal1);
- s = fMax(CntLeadingZeros(maxVal) - 1, 0);
- s = fMin(s, scale_param_m2);
+ s = fMin(CntLeadingZeros(maxVal) - 2, scale_param_m2);
- mReal0 = FX_DBL2FX_SGL(iReal0 << s);
- mImag0 = FX_DBL2FX_SGL(iImag0 << s);
- mReal1 = FX_DBL2FX_SGL(iReal1 << s);
+ mReal0 = FX_DBL2FX_SGL(scaleValue(iReal0, s));
+ mImag0 = FX_DBL2FX_SGL(scaleValue(iImag0, s));
+ mReal1 = FX_DBL2FX_SGL(scaleValue(iReal1, s));
s = scale_param_m2 - s;