Commit c9eb9105 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh Committed by Manuel Jander
Browse files

Fix for 3GPP issue 1472: Precision issue with power spectrum causes different...

Fix for 3GPP issue 1472: Precision issue with power spectrum causes different behavior with silent channels in MCT

Link #1472
parent e224d57c
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -202,7 +202,14 @@ void sns_compute_scf_fx(
      -Q6 is for division with FDNS_NPTS and -Q1 is to reduce Q by one */
    mean = W_shl_sat_l( sum, -Q7 );                                   // q_out
    nf = Mpy_32_32( mean, 214748 /* powf( 10.0f, -4.0f ) in Q31 */ ); // q_out
    nf = L_max( nf, L_shl( 256, sub( q_out, 40 ) ) /* powf( 2.0f, -32.0f ) in Q40 */ ); // q_out

    IF( LE_32( nf, L_shl_sat( 256, sub( q_out, 40 ) ) ) ) /* powf( 2.0f, -32.0f ) in Q40 */
    {
        nf = 256;
        move32();
        q_out = 40;
        move16();
    }

    FOR( i = 0; i < FDNS_NPTS; i++ )
    {