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

Fix for 3GPP issue 1524: BASOP decoder asserts in...

Fix for 3GPP issue 1524: BASOP decoder asserts in ivas_dirac_dec_binaural_determine_processing_matrices_fx with OMASA BASOP encoder bitstream using rate switching

Link #1524
parent 7e73513a
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -2096,6 +2096,21 @@ static void ivas_dirac_dec_binaural_determine_processing_matrices_fx(
        exp = sub( get_min_scalefactor( resultMtxRe_fx[0][0], resultMtxRe_fx[1][1] ), 2 );
        tmp2 = L_add( L_shl( resultMtxRe_fx[0][0], exp ), L_shl( resultMtxRe_fx[1][1], exp ) );
        q_tmp2 = add( q_res, exp );

        /*Limiting value to Q63*/
        IF( GT_16( q_tmp2, 63 ) )
        {
            tmp2 = L_shl( tmp2, sub( 63, q_tmp2 ) );
            q_tmp2 = 63;
            move16();
            IF( EQ_32( tmp2, -1 ) )
            {
                tmp2 = 0;
                move32();
                q_tmp2 = 31;
                move16();
            }
        }
        IF( LT_16( q_CrEne, q_tmp2 ) )
        {
            realizedOutputEne_fx = L_add( tmp1, L_shr( tmp2, sub( q_tmp2, q_CrEne ) ) );