diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-11-18 02:08:00 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-11-18 02:08:00 +0000 |
commit | e6fc6686b645f9fccaefb3cee563571344ec7b2e (patch) | |
tree | 73c3905e1fb2cc11b30be7d583bb500e2cef452d /encoder/ixheaace_sbr_ton_corr_hp.c | |
parent | 68809fee6a051e4729360a217320da6fec700578 (diff) | |
parent | 49819412af46be1657ff041ca632d281acf9efac (diff) | |
download | libxaac-android14-qpr2-s3-release.tar.gz |
Snap for 11117647 from 49819412af46be1657ff041ca632d281acf9efac to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Change-Id: Ie58f8858306c59dae920e0c0b10f11021553a504
Diffstat (limited to 'encoder/ixheaace_sbr_ton_corr_hp.c')
-rw-r--r-- | encoder/ixheaace_sbr_ton_corr_hp.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/encoder/ixheaace_sbr_ton_corr_hp.c b/encoder/ixheaace_sbr_ton_corr_hp.c index 9f285fd..1bcd3c8 100644 --- a/encoder/ixheaace_sbr_ton_corr_hp.c +++ b/encoder/ixheaace_sbr_ton_corr_hp.c @@ -18,6 +18,7 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ +#include <math.h> #include <string.h> #include "ixheaac_type_def.h" @@ -33,12 +34,12 @@ #include "ixheaace_resampler.h" #include "ixheaace_sbr_rom.h" #include "ixheaace_common_rom.h" +#include "ixheaace_sbr_hbe.h" #include "ixheaace_sbr_qmf_enc.h" #include "ixheaace_sbr_tran_det.h" #include "ixheaace_sbr_frame_info_gen.h" #include "ixheaace_sbr_env_est.h" #include "ixheaace_sbr_code_envelope.h" -#include "ixheaace_sbr_hbe.h" #include "ixheaace_sbr_main.h" #include "ixheaace_sbr_missing_harmonics_det.h" #include "ixheaace_sbr_inv_filtering_estimation.h" @@ -49,7 +50,7 @@ #include "ixheaace_sbr.h" #include "ixheaace_sbr_misc.h" -#include <math.h> +#include "ixheaace_common_utils.h" static VOID ixheaace_calc_auto_corr_second_order(ixheaace_acorr_coeffs *pstr_ac, FLOAT32 **ptr_real, FLOAT32 **ptr_imag, @@ -178,11 +179,7 @@ VOID ixheaace_calculate_tonality_quotas(ixheaace_pstr_sbr_ton_corr_est pstr_ton_ if (r00r) { FLOAT32 tmp = -(alphar[0] * r01r + alphai[0] * r01i + alphar[1] * r02r + alphai[1] * r02i) / (r00r); - FLOAT32 denum = 1.0f - tmp; - if (fabs(denum) < EPS) { - denum = (FLOAT32)EPS; - } - ptr_quota_mtx[time_index][r] = (FLOAT32)(tmp / denum); + ptr_quota_mtx[time_index][r] = (FLOAT32)ixheaace_div32(tmp, 1.0f - tmp); } else { ptr_quota_mtx[time_index][r] = 0; } |