Commit 36c1cd94 authored by multrus's avatar multrus
Browse files

replace maximum_abs_32_fx()-construct by L_norm_arr()

parent ac54b447
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -702,13 +702,7 @@ static void ivas_sba_dirac_stereo_compute_td_stefi_nrgs(
#endif

#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    maximum_abs_32_fx( hb_synth, output_frame, &max_val );
    shift = norm_l( max_val );
    if ( max_val == 0 )
    {
        shift = 31;
        move16();
    }
    shift = L_norm_arr( hb_synth, output_frame );
    shift = sub( shift, shr( add( find_guarded_bits_fx( shr( output_frame, 1 ) ), 1 ), 1 ) );
#endif

+4 −1
Original line number Diff line number Diff line
@@ -204,7 +204,9 @@ void stereo_icBWE_dec_fx(
        move32();
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
        q_hb_nrg = Q31;
#endif

        synthRef_shift = L_norm_arr( synthRef_fx, output_frame );
#else
        move32();
        maximum_abs_32_fx( synthRef_fx, output_frame, &maxVal );
        synthRef_shift = norm_l( maxVal );
@@ -213,6 +215,7 @@ void stereo_icBWE_dec_fx(
            synthRef_shift = 31;
            move16();
        }
#endif
        synthRef_shift = sub( synthRef_shift, shr( add( find_guarded_bits_fx( shr( output_frame, 1 ) ), 1 ), 1 ) );
        test();
        IF( EQ_16( st->core, ACELP_CORE ) || EQ_16( st->last_core, ACELP_CORE ) )