Commit a6a2cf44 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge remote-tracking branch 'origin/float-pc' into 1613_ref_port-float-MR-1406

parents dd252125 14175bc0
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -219,6 +219,7 @@

#define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING   /* FhG: fix usan error in MCT with bw swicthing */
#define NONBE_FIX_986_MC_BW_SWITCHING                   /* FhG: fix crash in bw and br switching with MC */
#define NONBE_FIX_1000_G1_G2_SWB_TBE                    /* VA: issue 1000: avoid div by zero due to g1 + g2 being zero in SWB TBE */
#define NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE            /* FhG: issue #1005: fix TC Buffer update at a MC rate switch */

/* #################### End BASOP porting switches ############################ */
+18 −0
Original line number Diff line number Diff line
@@ -938,6 +938,14 @@ void GenShapedSHBExcitation(
                }

                den = 4.0f * c0 * c2 - c4 * c4;

#ifdef NONBE_FIX_1000_G1_G2_SWB_TBE
                if ( den == 0.0f )
                {
                    den = 1e-7f;
                }
#endif

                g1 = ( c3 * c4 - 2 * c1 * c2 ) / den;
                g2 = ( c1 * c4 - 2 * c0 * c3 ) / den;

@@ -964,7 +972,17 @@ void GenShapedSHBExcitation(
                else
                {
                    /* normalize gain */
#ifdef NONBE_FIX_1000_G1_G2_SWB_TBE
                    temp = 0.0f;
                    if ( g1 + g2 == 0.0f )
                    {
                        temp = 1e-7f;
                    }

                    g = g2 / ( g1 + g2 + temp );
#else
                    g = g2 / ( g1 + g2 );
#endif

                    /* quantization of the mixing factor */
                    cbsize = 1 << NUM_BITS_SHB_VF;