Commit 6389a5cb authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1794_fix' into 'main'

Fix for 3GPP issue 1794: High MLD for MC 5.1 Decoder at 192kbps JBM decoding...

See merge request !1876
parents 4d27ba59 65f7beae
Loading
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -2264,10 +2264,10 @@ ivas_error ivas_jbm_dec_render_fx(

                FOR( i = 0; i < nchan_in; i++ )
                {
                    scale_sig32( p_output_fx[i], *nSamplesRendered, negate( sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ) ); // Q11
                    scale_sig32( p_output_fx[i], *nSamplesRendered, negate( sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ) ); // Q = *st_ivas->hCrendWrapper->p_io_qfactor
                    IF( st_ivas->hDecoderConfig->Opt_tsm )
                    {
                        scale_sig32( p_tc_fx[i], *nSamplesRendered, negate( sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ) ); // Q11
                        scale_sig32( p_tc_fx[i], *nSamplesRendered, negate( sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ) ); // Q = *st_ivas->hCrendWrapper->p_io_qfactor
                    }
                }
                IF( NE_32( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
@@ -2277,6 +2277,17 @@ ivas_error ivas_jbm_dec_render_fx(
                    return error;
                }

                IF( st_ivas->hDecoderConfig->Opt_tsm )
                {
                    IF( NE_16( exp, *st_ivas->hCrendWrapper->p_io_qfactor ) )
                    {
                        FOR( i = 0; i < nchan_in; i++ )
                        {
                            scale_sig32( p_tc_fx[i], *nSamplesRendered, sub( *st_ivas->hCrendWrapper->p_io_qfactor, exp ) );
                        }
                    }
                }

                ivas_binaural_add_LFE_fx( st_ivas, *nSamplesRendered, p_tc_fx, p_output_fx );

                FOR( i = 0; i < nchan_in; i++ )