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

Merge branch '981-fix-parambin-default-early-part-correction-in-room-reverb' into 'main'

[non-BE] Fix issue 981 by setting parambin early part correction to unity also when on...

See merge request !1709
parents d7c79692 859dd9e2
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1141_OSBA_ROOM_RENDERING                    /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */
#define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART             /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */


#define NONE_BE_FIX_816_LFE_PLC_FLOAT                   /* DLB: issue 816: reduce required precision to float for LFE-PLC*/
+11 −0
Original line number Diff line number Diff line
@@ -217,7 +217,18 @@ ivas_error ivas_dirac_dec_init_binaural_data(
        }
        else if ( renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) /* Indication of binaural rendering with room effect */
        {
#ifdef NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART
            if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
            {
                mvr2r( ( *phHrtfParambin )->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins );
            }
            else
            {
                set_f( hDiracDecBin->earlyPartEneCorrection, 1.0f, CLDFB_NO_CHANNELS_MAX );
            }
#else
            mvr2r( ( *phHrtfParambin )->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins );
#endif

            /* reconfiguration needed when Reverb. parameters are changed -> close and open the handle again */
            if ( hDiracDecBin->hReverb != NULL && ( ( hDiracDecBin->hReverb->numBins != nBins ) ||
+11 −0
Original line number Diff line number Diff line
@@ -8344,7 +8344,18 @@ static ivas_error ivas_masa_ext_rend_parambin_init(
        }
        else if ( renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) /* Indication of binaural rendering with room effect */
        {
#ifdef NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART
            if ( *inputMasa->base.ctx.pOutConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
            {
                mvr2r( ( *phHrtfParambin )->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins );
            }
            else
            {
                set_f( hDiracDecBin->earlyPartEneCorrection, 1.0f, CLDFB_NO_CHANNELS_MAX );
            }
#else
            mvr2r( ( *phHrtfParambin )->parametricEarlyPartEneCorrection, hDiracDecBin->earlyPartEneCorrection, nBins );
#endif

            if ( hDiracDecBin->hReverb == NULL && pos_idx == 0 ) /* open reverb only for the main direction */
            {