Commit 5f3e55c7 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_920_fix' into 'main'

Fix for 3GPP issue 920: Loudness Difference, High MLD for ISM with BINAURAL_ROOM_REVERB output

See merge request !662
parents bc2c62f9 d4e503e5
Loading
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ ivas_error ivas_td_binaural_renderer_sf_fx(
    ivas_error error;

    Word16 ism_md_subframe_update_jbm;
    Word16 c_indx, nS;
    Word16 c_indx, nS, i;
    Word16 nchan_ism_internal, nchan_ism, ch_offset;

    IVAS_QUATERNION *tmp_Quaternion_fx;
@@ -337,10 +337,25 @@ ivas_error ivas_td_binaural_renderer_sf_fx(
        test();
        IF( st_ivas->hRenderConfig != NULL && EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )
        {
            FOR( i = 0; i < nchan_ism_internal; ++i )
            {
                scale_sig32( tc_local_fx[i], st_ivas->hReverb->full_block_size, -4 ); // Q11 - 4 = Q7
            }

            IF( NE_32( ( error = ivas_reverb_process_fx( st_ivas->hReverb, st_ivas->transport_config, 0, tc_local_fx, p_reverb_signal_fx, 0 ) ), IVAS_ERR_OK ) )
            {
                return error;
            }

            FOR( i = 0; i < nchan_ism_internal; ++i )
            {
                scale_sig32( tc_local_fx[i], st_ivas->hReverb->full_block_size, 4 ); // Q7 + 4 = Q11
            }

            FOR( i = 0; i < BINAURAL_CHANNELS; ++i )
            {
                scale_sig32( p_reverb_signal_fx[i], st_ivas->hReverb->full_block_size, 2 + 4 ); // Q5 + 6 = Q11
            }
        }

        /* Render subframe */