Commit 233e91e0 authored by Manuel Jander's avatar Manuel Jander
Browse files

Correct rescale buffer boundaries of proto_power_smooth_fx.

parent 5a376fef
Loading
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1815,9 +1815,10 @@ void protoSignalComputation2_fx(
#ifdef FIX_867_CLDFB_NRG_SCALE
    IF( isloudspeaker )
    {
        q_shift = getScaleFactor32( proto_power_smooth_fx, CLDFB_NO_CHANNELS_HALF );
        q_shift = s_min( q_shift, getScaleFactor32( proto_power_smooth_fx + num_freq_bands, CLDFB_NO_CHANNELS_HALF ) );
        q_shift = s_min( q_shift, getScaleFactor32( proto_power_smooth_fx + num_freq_bands + num_freq_bands, CLDFB_NO_CHANNELS_HALF ) );
        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