Commit 285af5d6 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Fix issue 564 by copying the relevant code JBM path

parent f8c88e09
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@
#define FIX_557_CRASH_IN_ISM_DTX                        /* VA issue 557: fix crash in 1ISM 48 kbps DTX */

#define IGF_TUNING_96                                   /* FhG: Issue 546: slight tuning of IGF config used in 96 kbps stereo, 128 kbps SBA and others */
#define FIX_564                                         /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+13 −0
Original line number Diff line number Diff line
@@ -292,7 +292,20 @@ ivas_error ivas_jbm_dec_tc(
        }
        else if ( st_ivas->ivas_format == SBA_FORMAT && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) )
        {
#ifdef FIX_564
            float gain;

            if ( nchan_remapped == 1 )
            {
                gain = 1.4454f;
            }
            else
            {
                gain = 1.3657f;
            }
#else
            float gain = 0.8414f; /* Todo: Temporary gain for roughly matching the loudness. To be tuned later together with other outputs. Also, this is not inline with ivas_dec() */
#endif

            for ( n = 0; n < nchan_remapped; n++ )
            {