Commit 8b752cc0 authored by multrus's avatar multrus
Browse files

Merge branch '1762-usage-of-w_mac_32_32-one_in_q30' into 'main'

Resolve "Usage of W_mac_32_32() + ONE_IN_Q30"

Closes #1762

See merge request !1927
parents b8e6c2a0 ee439803
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@

#define NONBE_FIX_864_JBM_RENDER_FRAMESIZE                    /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */

#define FIX_1762_COMPILER_ISSUE_NEW                          /* FhG: fix compiler issues with W_mac_32_32() + ONE_IN_Q30 */

#define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */

+6 −2
Original line number Diff line number Diff line
@@ -362,7 +362,11 @@ void find_tilt_ivas_fx(
    FOR( i = 0; i < 2; i++ )
    {
        /*hp_E[i] = 0.5f * (hf_bands[max_band-1] + hf_bands[max_band]) - hp_bckr; */ /* averaged E in last 2 critical bands */
#ifndef FIX_1762_COMPILER_ISSUE_NEW
        Ltmp = W_extract_h( W_mac_32_32( W_mult_32_32( hf_bands[max_band - 1], ONE_IN_Q30 ), hf_bands[max_band], ONE_IN_Q30 ) ); // q_fr_bands
#else
        Ltmp = W_extract_h( W_shl( W_add( W_deposit32_l( hf_bands[max_band - 1] ), W_deposit32_l( hf_bands[max_band] ) ), 31 ) ); // q_fr_bands
#endif
        Ltmp = L_sub( Ltmp, hp_bckr ); // q_fr_bands

        Ltmp2 = L_max( Ltmp, L_shl_sat( 1, q_fr_bands ) ); // q_fr_bands, saturation is added because q_fr_bands is limited to 31