Commit 817a5622 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge branch '1892_ref_port_mr_1787_low_rt_cldfb_reverb_fix' into 'ivas-float-update'

[non-BE] Port of float MR 1787 to float reference.

See merge request !2052
parents 3423bb61 519e435e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@
#define NONBE_1293_SR_HRTF                              /* VA: issue 1293: add support of external HRTFs in split rendering */
#define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH             /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */
#define FIX_1369_HQ_LR_OVERFLOW                         /* FhG: fix BASOP overflow in hq_lr_enc(), brings floating-point code inline with FX */
#define FIX_1139_REV_COLORATION_SHORT_T60               /* Nokia,FhG: Fix issue 1139, prevent sound coloration artefacts at very low reverberation times */

/* #################### End BASOP porting switches ############################ */

+13 −1
Original line number Diff line number Diff line
@@ -1200,7 +1200,19 @@ ivas_error ivas_binRenderer_open(
    {
#ifdef FIX_587_DEFAULT_REVERB
        pRoomAcoustics = ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ? &( st_ivas->hRenderConfig->roomAcoustics ) : NULL;
        if ( ( error = ivas_binaural_reverb_init( &( hBinRenderer->hReverb ), st_ivas->hHrtfStatistics, hBinRenderer->conv_band, hBinRenderer->timeSlots, pRoomAcoustics, st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv->fastconvReverberationTimes, st_ivas->hHrtfFastConv->fastconvReverberationEneCorrections ) ) != IVAS_ERR_OK )
        if ( ( error = ivas_binaural_reverb_init( &( hBinRenderer->hReverb ),
                                                  st_ivas->hHrtfStatistics,
                                                  hBinRenderer->conv_band,
                                                  hBinRenderer->timeSlots,
                                                  pRoomAcoustics,
                                                  st_ivas->hDecoderConfig->output_Fs,
                                                  st_ivas->hHrtfFastConv->fastconvReverberationTimes,
                                                  st_ivas->hHrtfFastConv->fastconvReverberationEneCorrections
#ifdef FIX_1139_REV_COLORATION_SHORT_T60
                                                  ,
                                                  NULL
#endif
                                                  ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_binaural_reverb_init( &( hBinRenderer->hReverb ), st_ivas->hHrtfStatistics, hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv->fastconvReverberationTimes, st_ivas->hHrtfFastConv->fastconvReverberationEneCorrections ) ) != IVAS_ERR_OK )
#endif
+26 −2
Original line number Diff line number Diff line
@@ -2289,7 +2289,19 @@ ivas_error IVAS_DEC_FeedRenderConfig(
    if ( hIvasDec->st_ivas->hDiracDecBin[0] != NULL && hIvasDec->st_ivas->hDiracDecBin[0]->hReverb != NULL )
    {
        ivas_binaural_reverb_close( &( hIvasDec->st_ivas->hDiracDecBin[0]->hReverb ) );
        if ( ( error = ivas_binaural_reverb_init( &( hIvasDec->st_ivas->hDiracDecBin[0]->hReverb ), hIvasDec->st_ivas->hHrtfStatistics, hIvasDec->st_ivas->hSpatParamRendCom->num_freq_bands, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, &( hRenderConfig->roomAcoustics ), hIvasDec->st_ivas->hDecoderConfig->output_Fs, NULL, NULL ) ) != IVAS_ERR_OK )
        if ( ( error = ivas_binaural_reverb_init( &( hIvasDec->st_ivas->hDiracDecBin[0]->hReverb ),
                                                  hIvasDec->st_ivas->hHrtfStatistics,
                                                  hIvasDec->st_ivas->hSpatParamRendCom->num_freq_bands,
                                                  CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES,
                                                  &( hRenderConfig->roomAcoustics ),
                                                  hIvasDec->st_ivas->hDecoderConfig->output_Fs,
                                                  NULL,
                                                  NULL
#ifdef FIX_1139_REV_COLORATION_SHORT_T60
                                                  ,
                                                  NULL
#endif
                                                  ) ) != IVAS_ERR_OK )
        {
            return error;
        }
@@ -2299,7 +2311,19 @@ ivas_error IVAS_DEC_FeedRenderConfig(
    if ( hIvasDec->st_ivas->hBinRenderer != NULL && hIvasDec->st_ivas->hBinRenderer->hReverb != NULL )
    {
        ivas_binaural_reverb_close( &( hIvasDec->st_ivas->hBinRenderer->hReverb ) );
        if ( ( error = ivas_binaural_reverb_init( &( hIvasDec->st_ivas->hBinRenderer->hReverb ), hIvasDec->st_ivas->hHrtfStatistics, hIvasDec->st_ivas->hBinRenderer->conv_band, hIvasDec->st_ivas->hBinRenderer->timeSlots, &( hRenderConfig->roomAcoustics ), hIvasDec->st_ivas->hDecoderConfig->output_Fs, NULL, NULL ) ) != IVAS_ERR_OK )
        if ( ( error = ivas_binaural_reverb_init( &( hIvasDec->st_ivas->hBinRenderer->hReverb ),
                                                  hIvasDec->st_ivas->hHrtfStatistics,
                                                  hIvasDec->st_ivas->hBinRenderer->conv_band,
                                                  hIvasDec->st_ivas->hBinRenderer->timeSlots,
                                                  &( hRenderConfig->roomAcoustics ),
                                                  hIvasDec->st_ivas->hDecoderConfig->output_Fs,
                                                  NULL,
                                                  NULL
#ifdef FIX_1139_REV_COLORATION_SHORT_T60
                                                  ,
                                                  NULL
#endif
                                                  ) ) != IVAS_ERR_OK )
        {
            return error;
        }
+13 −1
Original line number Diff line number Diff line
@@ -266,7 +266,19 @@ ivas_error ivas_dirac_dec_init_binaural_data(
            {
#ifdef NONBE_FIX_991_PARAMBIN_BINARY_HRTF
#ifdef FIX_587_DEFAULT_REVERB
                if ( ( error = ivas_binaural_reverb_init( &hDiracDecBin->hReverb, st_ivas->hHrtfStatistics, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, pRoomAcoustics, output_Fs, ( *phHrtfParambin )->parametricReverberationTimes, ( *phHrtfParambin )->parametricReverberationEneCorrections ) ) != IVAS_ERR_OK )
                if ( ( error = ivas_binaural_reverb_init( &hDiracDecBin->hReverb,
                                                          st_ivas->hHrtfStatistics,
                                                          nBins,
                                                          CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES,
                                                          pRoomAcoustics,
                                                          output_Fs,
                                                          ( *phHrtfParambin )->parametricReverberationTimes,
                                                          ( *phHrtfParambin )->parametricReverberationEneCorrections
#ifdef FIX_1139_REV_COLORATION_SHORT_T60
                                                          ,
                                                          hDiracDecBin->earlyPartEneCorrection
#endif
                                                          ) ) != IVAS_ERR_OK )
#else
                if ( ( error = ivas_binaural_reverb_init( &hDiracDecBin->hReverb, st_ivas->hHrtfStatistics, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, &( st_ivas->hRenderConfig->roomAcoustics ), output_Fs, ( *phHrtfParambin )->parametricReverberationTimes, ( *phHrtfParambin )->parametricReverberationEneCorrections ) ) != IVAS_ERR_OK )
#endif
+4 −0
Original line number Diff line number Diff line
@@ -935,6 +935,10 @@ ivas_error ivas_binaural_reverb_init(
    const int32_t sampling_rate,                                /* i  : sampling rate                           */
    const float *defaultTimes,                                  /* i  : default reverberation times             */
    const float *defaultEne                                     /* i  : default reverberation energies          */
#ifdef FIX_1139_REV_COLORATION_SHORT_T60
    ,
    float *earlyEne                                             /* i/o: Early part energies to be modified      */
#endif
);


Loading