Commit f41bd403 authored by Manuel Jander's avatar Manuel Jander
Browse files

Correct rescale buffer boundaries of proto_power_smooth_fx. Correction.

parent 233e91e0
Loading
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -1955,11 +1955,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
    Word16 alphaMaxBinFast;
    Word32 L_tmp;
    Word16 exp_arr[CLDFB_NO_CHANNELS_MAX * MAX_OUTPUT_CHANNELS];
#if 1
    Word16 exp = 0, exp1, tmp, q_com, q_tmp, min_exp;
#else
    Word16 exp = 0, exp1, q_com, q_tmp, min_exp;
#endif
    Word32 tmp32;
    move16();

@@ -2187,13 +2183,9 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(

        exp = 0;
        move16();
#if 1

        tmp = BASOP_Util_Divide3232_Scale( weightedDirectionSmoothness, L_add( sumWeight, EPSILON_FX ), &exp ); /*Q(15-exp)*/
        smoothedDirectionSmoothness = L_shl_sat( L_deposit_l( tmp ), add( sub( Q31, Q15 ), exp ) );             // Q31
#else
        L_tmp = BASOP_Util_Divide3232_Scale_cadence( weightedDirectionSmoothness, L_add( sumWeight, EPSILON_FX ), &exp ); /*Q(15-exp)*/
        smoothedDirectionSmoothness = L_shl_sat( L_tmp, exp );                                                            // Q31
#endif

        h_dirac_output_synthesis_state->direction_smoothness_prev_fx[l] = smoothedDirectionSmoothness; // Q31
        move32();
+0 −1
Original line number Diff line number Diff line
@@ -1818,7 +1818,6 @@ void protoSignalComputation2_fx(
        q_shift = getScaleFactor32( proto_power_smooth_fx, s_min( num_freq_bands, CLDFB_NO_CHANNELS_HALF ) );
        q_shift = s_min( q_shift, getScaleFactor32( proto_power_smooth_fx + num_freq_bands, s_min( num_freq_bands, CLDFB_NO_CHANNELS_HALF ) ) );
        q_shift = s_min( q_shift, getScaleFactor32( proto_power_smooth_fx + num_freq_bands + num_freq_bands, s_min( num_freq_bands, CLDFB_NO_CHANNELS_HALF ) ) );
        q_shift = - 2;
        scale_sig32( proto_power_smooth_fx, s_min( num_freq_bands, CLDFB_NO_CHANNELS_HALF ), sub( q_shift, 1 ) );                                   // q_proto_power_smooth+q_shift-1
        scale_sig32( proto_power_smooth_fx + num_freq_bands, s_min( num_freq_bands, CLDFB_NO_CHANNELS_HALF ), sub( q_shift, 1 ) );                  // q_proto_power_smooth+q_shift-1
        scale_sig32( proto_power_smooth_fx + num_freq_bands + num_freq_bands, s_min( num_freq_bands, CLDFB_NO_CHANNELS_HALF ), sub( q_shift, 1 ) ); // q_proto_power_smooth+q_shift-1