Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,8 @@ #define NONBE_FIX2614_LP_CNG_ASSERT /* FhG: */ #define FIX_FLOAT_1600_OMASA_WRONG_RENDER_PATH /* Nokia: float issue 1600: fix initialization condition of stereo type detection for OMASA */ #define FIX_BASOP_1765_MASA1TC_CNG_MISMATCH /* Nokia: BASOP issue 1765: Improve accuracy of FD CNG noise estimation */ #define FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP /* FhG: BASOP #2627: accumulate 10^(ILD/10) using a dynamic exponent */ #define FIX_BASOP_2635_EFAP_ADD_VERTEX_ELE_ROUND /* FhG: BASOP #2635: round |elevation| with anint_fx before the 90deg subtraction in add_vertex_fx */ /* ##################### End NON-BE switches ########################### */ Loading lib_dec/ivas_mc_param_dec_fx.c +20 −0 Original line number Diff line number Diff line Loading @@ -756,9 +756,11 @@ ivas_error ivas_param_mc_dec_reconfig_fx( Word16 num_param_lfe; Word16 *p_icc_new_fx = hParamMC->icc_q_fx; // Q15 Word16 *p_ild_new_fx = hParamMC->icld_q_fx; // Q8 #ifndef FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP Word16 p_ild_new_e = 23; move16(); Word16 p_ild_new_tmp; #endif /* ICC */ num_param_lfe = hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe; Loading @@ -785,6 +787,23 @@ ivas_error ivas_param_mc_dec_reconfig_fx( { FOR( param_idx = 0; param_idx < num_param_lfe; param_idx++ ) { #ifdef FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP Word32 acc_m = 0; move32(); Word16 acc_e = 0; move16(); FOR( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ ) { Word32 term_m; Word16 term_e; term_m = BASOP_util_Pow2( L_mult0( 10885 /*log2(10)/10*2^15*/, ild_q_old_fx[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx] * num_param_lfe + param_idx] ), 8, &term_e ); term_m = Mpy_32_16_1( term_m, parameter_band_mapping.source_band_factor_fx[new_param_band_idx][source_param_idx] ); /* * factor (Q15) */ acc_m = BASOP_Util_Add_Mant32Exp( acc_m, acc_e, term_m, term_e, &acc_e ); } /* log2 term is Q25; Mpy_32_16_1( Q25, Q13 ) -> Q(25+13-15) = Q23; L_shl( Q23, 1 ) -> Q24 - Q16 = Q8 */ *p_ild_new_fx = extract_h( L_shl( Mpy_32_16_1( L_add( BASOP_Util_Log2( acc_m ), L_shl( acc_e, Q25 ) ), 24660 /*10*log10(2) in Q13*/ ), 1 ) ); // Q8 move16(); #else *p_ild_new_fx = 0; move16(); FOR( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ ) Loading @@ -795,6 +814,7 @@ ivas_error ivas_param_mc_dec_reconfig_fx( } *p_ild_new_fx = extract_l( L_shr( Mpy_32_16_1( L_add( BASOP_Util_Log2( *p_ild_new_fx ), L_add( 16 << Q25, L_shl( p_ild_new_e, 25 ) ) ), 24660 /*3.Q13*/ ), 15 ) ); // Q8 move16(); #endif p_ild_new_fx++; } } Loading lib_enc/ivas_stereo_dmx_evs_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1548,7 +1548,7 @@ static Word32 find_poc_peak_fx( tmp13_e = 0, tmp15_e = 0; tmp13 = BASOP_Util_Divide1616_Scale( abs_s( itd_cand[n] ), hPOC->shift_limit, &tmp13_e ); tmp14 = L_mult( 6554 /*0.2f Q15*/, tmp13 ); // tmp13_e tmp15 = BASOP_Util_Add_Mant32Exp( 644245120 /*0.75f in Q31*/, 0, L_negate( tmp14 ), tmp13_e, &tmp15_e ); tmp15 = BASOP_Util_Add_Mant32Exp( 644245120 /*0.3f in Q31*/, 0, L_negate( tmp14 ), tmp13_e, &tmp15_e ); tmp15 = Mpy_32_32( tmp15, peakQ_fx[n] ); // tmp15_e + peakQ_e[n] move16(); move16(); Loading lib_rend/ivas_efap_fx.c +6 −1 Original line number Diff line number Diff line Loading @@ -1696,8 +1696,13 @@ static void add_vertex_fx( /* IdxEleTmp */ tmp = L_abs( vtxArray[pos].ele ); // q22 #ifdef FIX_BASOP_2635_EFAP_ADD_VERTEX_ELE_ROUND idxEleTmp = anint_fx( tmp, Q22 ); // q22 move32(); #else idxEleTmp = tmp; // q22 move16(); #endif idxEleTmp = L_sub( Q22_90_DEG /*90 q22*/, idxEleTmp ); // q22 /* Final Idx */ Loading Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,8 @@ #define NONBE_FIX2614_LP_CNG_ASSERT /* FhG: */ #define FIX_FLOAT_1600_OMASA_WRONG_RENDER_PATH /* Nokia: float issue 1600: fix initialization condition of stereo type detection for OMASA */ #define FIX_BASOP_1765_MASA1TC_CNG_MISMATCH /* Nokia: BASOP issue 1765: Improve accuracy of FD CNG noise estimation */ #define FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP /* FhG: BASOP #2627: accumulate 10^(ILD/10) using a dynamic exponent */ #define FIX_BASOP_2635_EFAP_ADD_VERTEX_ELE_ROUND /* FhG: BASOP #2635: round |elevation| with anint_fx before the 90deg subtraction in add_vertex_fx */ /* ##################### End NON-BE switches ########################### */ Loading
lib_dec/ivas_mc_param_dec_fx.c +20 −0 Original line number Diff line number Diff line Loading @@ -756,9 +756,11 @@ ivas_error ivas_param_mc_dec_reconfig_fx( Word16 num_param_lfe; Word16 *p_icc_new_fx = hParamMC->icc_q_fx; // Q15 Word16 *p_ild_new_fx = hParamMC->icld_q_fx; // Q8 #ifndef FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP Word16 p_ild_new_e = 23; move16(); Word16 p_ild_new_tmp; #endif /* ICC */ num_param_lfe = hParamMC->hMetadataPMC->icc_mapping_conf->icc_map_size_lfe; Loading @@ -785,6 +787,23 @@ ivas_error ivas_param_mc_dec_reconfig_fx( { FOR( param_idx = 0; param_idx < num_param_lfe; param_idx++ ) { #ifdef FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP Word32 acc_m = 0; move32(); Word16 acc_e = 0; move16(); FOR( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ ) { Word32 term_m; Word16 term_e; term_m = BASOP_util_Pow2( L_mult0( 10885 /*log2(10)/10*2^15*/, ild_q_old_fx[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx] * num_param_lfe + param_idx] ), 8, &term_e ); term_m = Mpy_32_16_1( term_m, parameter_band_mapping.source_band_factor_fx[new_param_band_idx][source_param_idx] ); /* * factor (Q15) */ acc_m = BASOP_Util_Add_Mant32Exp( acc_m, acc_e, term_m, term_e, &acc_e ); } /* log2 term is Q25; Mpy_32_16_1( Q25, Q13 ) -> Q(25+13-15) = Q23; L_shl( Q23, 1 ) -> Q24 - Q16 = Q8 */ *p_ild_new_fx = extract_h( L_shl( Mpy_32_16_1( L_add( BASOP_Util_Log2( acc_m ), L_shl( acc_e, Q25 ) ), 24660 /*10*log10(2) in Q13*/ ), 1 ) ); // Q8 move16(); #else *p_ild_new_fx = 0; move16(); FOR( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ ) Loading @@ -795,6 +814,7 @@ ivas_error ivas_param_mc_dec_reconfig_fx( } *p_ild_new_fx = extract_l( L_shr( Mpy_32_16_1( L_add( BASOP_Util_Log2( *p_ild_new_fx ), L_add( 16 << Q25, L_shl( p_ild_new_e, 25 ) ) ), 24660 /*3.Q13*/ ), 15 ) ); // Q8 move16(); #endif p_ild_new_fx++; } } Loading
lib_enc/ivas_stereo_dmx_evs_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1548,7 +1548,7 @@ static Word32 find_poc_peak_fx( tmp13_e = 0, tmp15_e = 0; tmp13 = BASOP_Util_Divide1616_Scale( abs_s( itd_cand[n] ), hPOC->shift_limit, &tmp13_e ); tmp14 = L_mult( 6554 /*0.2f Q15*/, tmp13 ); // tmp13_e tmp15 = BASOP_Util_Add_Mant32Exp( 644245120 /*0.75f in Q31*/, 0, L_negate( tmp14 ), tmp13_e, &tmp15_e ); tmp15 = BASOP_Util_Add_Mant32Exp( 644245120 /*0.3f in Q31*/, 0, L_negate( tmp14 ), tmp13_e, &tmp15_e ); tmp15 = Mpy_32_32( tmp15, peakQ_fx[n] ); // tmp15_e + peakQ_e[n] move16(); move16(); Loading
lib_rend/ivas_efap_fx.c +6 −1 Original line number Diff line number Diff line Loading @@ -1696,8 +1696,13 @@ static void add_vertex_fx( /* IdxEleTmp */ tmp = L_abs( vtxArray[pos].ele ); // q22 #ifdef FIX_BASOP_2635_EFAP_ADD_VERTEX_ELE_ROUND idxEleTmp = anint_fx( tmp, Q22 ); // q22 move32(); #else idxEleTmp = tmp; // q22 move16(); #endif idxEleTmp = L_sub( Q22_90_DEG /*90 q22*/, idxEleTmp ); // q22 /* Final Idx */ Loading