Commit 3ae58efb authored by Arthur Tritthart's avatar Arthur Tritthart
Browse files

limited call of W_shr to max. 63, was up to 100

parent b480684c
Loading
Loading
Loading
Loading

lib_com/ivas_spar_com_fx.c

100644 → 100755
+4 −0
Original line number Diff line number Diff line
@@ -802,7 +802,11 @@ static void ivas_get_pred_coeffs_enc_fx(
                tmp64 = W_mult0_32_32( w_norm_fac, dm_w ); // Q=q_tmp
                IF( LT_16( q_tmp, q_cov_real[0][0][b] ) )
                {
#ifdef FIX_ISSUE_1811_EXCEEDING_W_SHIFTS
                    tmp64 = W_shr( tmp64, Min(63, sub( q_cov_real[0][0][b], q_tmp ) ) ); // Q=q_tmp
#else
                    tmp64 = W_shr( tmp64, sub( q_cov_real[0][0][b], q_tmp ) ); // Q=q_tmp
#endif
                }
                ELSE
                {

lib_com/options.h

100644 → 100755
+2 −0
Original line number Diff line number Diff line
@@ -148,4 +148,6 @@
#define FIX_1824
#define FIX_1822

#define FIX_ISSUE_1811_EXCEEDING_W_SHIFTS

#endif

lib_dec/ivas_lfe_plc_fx.c

100644 → 100755
+4 −0
Original line number Diff line number Diff line
@@ -646,7 +646,11 @@ static void d_syn_filt_fx(
            }
            ELSE
            {
#ifdef FIX_ISSUE_1811_EXCEEDING_W_SHIFTS
                s_fx = W_sub( W_shr( s_fx, Min( 63, sub( s_q_fx, temp_q ) ) ), temp );
#else
                s_fx = W_sub( W_shr( s_fx, sub( s_q_fx, temp_q ) ), temp );
#endif
                s_q_fx = temp_q;
                move16();
            }

lib_dec/ivas_svd_dec_fx.c

100644 → 100755
+4 −0
Original line number Diff line number Diff line
@@ -1265,7 +1265,11 @@ static void singularVectorsAccumulationLeft_fx(

                FOR( k = nCh + 1; k < nChannelsL; k++ ) /* nChannelsL */
                {
#ifdef FIX_ISSUE_1811_EXCEEDING_W_SHIFTS
                    acc = W_add( acc, W_shr( prod[k], Min( 63, sub( max_e, prod_e[k] ) ) ) );
#else
                    acc = W_add( acc, W_shr( prod[k], sub( max_e, prod_e[k] ) ) );
#endif
                }
                Word16 acc_e = W_norm( acc );
                acc = W_shl( acc, acc_e );
+4 −0
Original line number Diff line number Diff line
@@ -1964,7 +1964,11 @@ void ivas_mdct_core_whitening_enc_fx(
            move64();
            FOR( i = 0; i < NB_DIV; i++ )
            {
#ifdef FIX_ISSUE_1811_EXCEEDING_W_SHIFTS
                chE_tot_fx = W_add( W_shr( chE_fx[i], Min(63, sub( chE_q[i], q ) ) ), chE_tot_fx );
#else
                chE_tot_fx = W_add( W_shr( chE_fx[i], sub( chE_q[i], q ) ), chE_tot_fx );
#endif
            }
            IF( GT_16( q, Q24 ) )
            {