Skip to content

Wrong scaling factor before the SBA decoder for output_Fs=32

There is a bug in computing the factor in the SBA decoder for output sampling rates 16 and 32 kHz.

In SBA decoder, before calling ivas_sba_dirac_stereo_dec_fx(), the fix consists of:

                FOR( i = 0; i < 2; i++ )
                {
#ifdef FIX
                    s = s_min( s, L_norm_arr( p_output_fx[i], output_frame ) - 11 ) /* Guard bits */; // L_frame should be used instead of L_FRAME48k */
#else
                    s = s_min( s, L_norm_arr( p_output_fx[i], L_FRAME48k ) - 11 ) /* Guard bits */; // L_frame should be used instead of L_FRAME48k */
#endif
                }

The computation of the scaling factor on 960 samples instead of 640 or 320 samples results in differences in s.