Commit bae8cbed authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge branch...

Merge branch 'float-1518-osba-rendering-to-mono-and-stereo-for-96kbps-is-significantly-quieter' into 'main'

[allow regression] [non-BE] Resolve "OSBA rendering to Mono and Stereo for <96kbps is significantly quieter" in BASOP

See merge request !2835
parents 8327207a 463343a2
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@
#define FIX_2283_ISM_MD_DELAY                           /* Dolby: Fix ISM metadata delay round-off */
#define FIX_2283_Q_CLDFB                                /* FhG: Fix Q format issue in CLDFB */
#define FIX_2283_ACCU_CLDFB                             /* FhG: Fix to consider Q-format differences in accumulateCLDFBArrayToBuffer_fx() */
#define FIX_FLOAT_1518                                  /* FhG: fix issue 1518: loudness differences in OSBA decoding to mono or stereo output */

/* ##################### End NON-BE switches ########################### */

+9 −1
Original line number Diff line number Diff line
@@ -659,7 +659,15 @@ ivas_error ivas_cpe_dec_fx(
    test();
    IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) && EQ_16( hCPE->nchan_out, 1 ) && ( is_DTXrate( ivas_total_brate ) == 0 || ( EQ_16( is_DTXrate( ivas_total_brate ), 1 ) && is_DTXrate( st_ivas->hDecoderConfig->last_ivas_total_brate ) == 0 ) ) )
    {
#ifdef FIX_FLOAT_1518
        test();
        IF( !( EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MODE_NONE ) ) )
        {
#endif
            applyDmxMdctStereo_fx( hCPE, output, output_frame );
#ifdef FIX_FLOAT_1518
        }
#endif
    }

    /*----------------------------------------------------------------*
+6 −0
Original line number Diff line number Diff line
@@ -574,6 +574,12 @@ ivas_error ivas_dec_fx(

            ivas_sba_dirac_stereo_dec_fx( st_ivas, &p_output_fx[sba_ch_idx], output_frame );
        }
#ifdef FIX_FLOAT_1518
        ELSE IF( EQ_16( st_ivas->hDecoderConfig->nchan_out, 1 ) && EQ_16( st_ivas->ism_mode, ISM_MODE_NONE ) )
        {
            v_shr( p_output_fx[0], -1, p_output_fx[0], output_frame );
        }
#endif

        /* HP filtering */
        FOR( n = 0; n < getNumChanSynthesis( st_ivas ); n++ )
+5 −0
Original line number Diff line number Diff line
@@ -1502,7 +1502,12 @@ void ivas_sba_dirac_stereo_dec_fx(
    synchro_synthesis_fx( st_ivas->hDecoderConfig->ivas_total_brate, hCPE, output, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/, q_dft[0] );

    /* output scaling */
#ifdef FIX_FLOAT_1518
    test();
    IF( !sba_mono_flag && !( EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MODE_NONE ) ) )
#else
    IF( !sba_mono_flag )
#endif
    {
        v_shr( output[0], 1, output[0], output_frame ); /*0.5f*/
        v_shr( output[1], 1, output[1], output_frame ); /*0.5f*/
+6 −0
Original line number Diff line number Diff line
@@ -464,7 +464,13 @@ void stereo_mdct_core_dec_fx(
    test();
    test();
    test();

#ifdef FIX_FLOAT_1518
    test();
    IF( hCPE->nchan_out == 1 && ( bfi == 0 || ( bfi != 0 && sts[0]->core != ACELP_CORE && sts[1]->core != ACELP_CORE ) ) && !( EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MODE_NONE ) ) )
#else
    IF( hCPE->nchan_out == 1 && ( bfi == 0 || ( bfi != 0 && sts[0]->core != ACELP_CORE && sts[1]->core != ACELP_CORE ) ) )
#endif
    {
        apply_dmx_weights_fx( hCPE, x_fx, sts[0]->transform_type, sts[1]->transform_type );
    }