Loading lib_com/ivas_spar_com.c +47 −42 Original line number Diff line number Diff line Loading @@ -1915,9 +1915,22 @@ void ivas_get_spar_md_from_dirac( { w1 = ratio[band] * ratio[band]; w2 = ( 1.0f - ratio[band] ) * ( 1.0f - ratio[band] ); for ( i = 0; i < num_ch; i++ ) { for ( j = 0; j < num_ch; j++ ) { cov_real_dirac[i][j][band] = en_ratio_fac * ( w1 * response_avg[i] * response_avg[j] + w2 * response_avg2[i] * response_avg2[j] ); if ( i == j ) { cov_real_dirac[i][j][band] += diffuseness[band]; } } } } else #endif { for ( i = 0; i < num_ch; i++ ) { for ( j = 0; j < num_ch; j++ ) Loading Loading @@ -1975,14 +1988,6 @@ void ivas_get_spar_md_from_dirac( } else { #ifdef HODIRAC_PRED if ( hodirac ) { cov_real_dirac[i][j][band] = en_ratio_fac * ( w1 * response_avg[i] * response_avg[j] + w2 * response_avg2[i] * response_avg2[j] ); } else #endif { cov_real_dirac[i][j][band] = en_ratio_fac * response_avg[i] * response_avg[j]; } } Loading Loading
lib_com/ivas_spar_com.c +47 −42 Original line number Diff line number Diff line Loading @@ -1915,9 +1915,22 @@ void ivas_get_spar_md_from_dirac( { w1 = ratio[band] * ratio[band]; w2 = ( 1.0f - ratio[band] ) * ( 1.0f - ratio[band] ); for ( i = 0; i < num_ch; i++ ) { for ( j = 0; j < num_ch; j++ ) { cov_real_dirac[i][j][band] = en_ratio_fac * ( w1 * response_avg[i] * response_avg[j] + w2 * response_avg2[i] * response_avg2[j] ); if ( i == j ) { cov_real_dirac[i][j][band] += diffuseness[band]; } } } } else #endif { for ( i = 0; i < num_ch; i++ ) { for ( j = 0; j < num_ch; j++ ) Loading Loading @@ -1975,14 +1988,6 @@ void ivas_get_spar_md_from_dirac( } else { #ifdef HODIRAC_PRED if ( hodirac ) { cov_real_dirac[i][j][band] = en_ratio_fac * ( w1 * response_avg[i] * response_avg[j] + w2 * response_avg2[i] * response_avg2[j] ); } else #endif { cov_real_dirac[i][j][band] = en_ratio_fac * response_avg[i] * response_avg[j]; } } Loading