Commit e4816f44 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Fix issue 441 by adjusting gains in SBA parambin path.

parent bc0f1537
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@

#define FIX_435_ISM_MERGE_BUG                           /* Eri: Merge bug fix for ISM NULL metadata and tcx_only cases */
#define FIX_355_REFACTOR_PARAMBIN_TO_5MS                /* Nokia: Fixes issue 355 by refactoring parametric binauralizer code to 5 ms mode */
#define FIX_441_SBA_PARAMBIN_GAINS                      /* Nokia: Fix issue 441 by changing gains in SBA path of parametric binauralizer */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+13 −0
Original line number Diff line number Diff line
@@ -373,7 +373,20 @@ ivas_error ivas_dec(
        }
        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_441_SBA_PARAMBIN_GAINS
            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. */
#endif

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