Commit 1f18fedc authored by multrus's avatar multrus
Browse files

Merge branch 'basop-2630-wrong-decimation-index-calculation-in-ivas_lfe_tdplc_fx' into 'main'

[non-BE] Resolve "Wrong decimation index calculation in ivas_lfe_tdplc_fx"

See merge request !3082
parents e63353b9 f8a22e89
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@
#define FIX_BASOP_2639_INCORRECT_ARRAY_INDEX            /* Dolby: BASOP #2639: incorrect array index in ivas_spar_unquant_dtx_indicies */
#define FIX_BASOP_2640_MASA_STEREO_TYPE_ASSERT          /* Nokia: BASOP issue 2640: Fix assert by saturating shift when exponent difference is very large. */
#define FIX_2636_OMASA_INTERFORMAT_BRATE                /* VA: basop issue 2636: Correct condition in function ivas_interformat_brate_fx() */
#define FIX_BASOP_2630_LFE_TDPLC_DECIM_IDX              /* FhG: BASOP #2630: ivas_lfe_tdplc_fx decimation index uses 48000 (was 44100) and drops the extra >>1, matching float ( i * 48000 ) / output_Fs */

#define FIX_2493_CHECK_64BIT                            /* FhG: Verify that 64 bit ops do not encounter an overflow. */
#define NONBE_FIX_2493_EXTRACT_L_estDownmixGain_fx      /* FhG: Fix extract_l overflow inside estDownmixGain_fx() */
+5 −0
Original line number Diff line number Diff line
@@ -1020,8 +1020,13 @@ void ivas_lfe_tdplc_fx(
    {
        FOR( i = 0; i < rec_frame_len; i++ )
        {
#ifdef FIX_BASOP_2630_LFE_TDPLC_DECIM_IDX
            idx = BASOP_Util_Divide3232_Scale( Mpy_32_32( L_shl( i, 16 ), L_shl( 48000, 15 ) ), output_Fs, &temp_q );
            idx = shr( idx, sub( 15, temp_q ) );
#else
            idx = BASOP_Util_Divide3232_Scale( Mpy_32_32( L_shl( i, 16 ), L_shl( 44100, 15 ) ), output_Fs, &temp_q );
            idx = shr( idx, add( sub( 15, temp_q ), 1 ) );
#endif
            rec_frame_us_16_fx[i] = rec_frame_us_16_fx[idx];
            move16();
        }