Loading lib_dec/ivas_binRenderer_internal.c +34 −1 Original line number Diff line number Diff line Loading @@ -47,6 +47,19 @@ #endif #include "wmc_auto.h" #ifdef FIX_1053_REVERB_RECONFIGURATION /*------------------------------------------------------------------------- * Local constants *------------------------------------------------------------------------*/ #define REVERB_INPUT_DOWNMIX_CHANNELS ( 11 ) /* Downmix table for sparse frequency domain reverberator */ const float dmxmtx_table[BINAURAL_CHANNELS][REVERB_INPUT_DOWNMIX_CHANNELS] = { { 1.0f, 0.0f, 0.70709997f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.70709997f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f }, }; #endif /*------------------------------------------------------------------------- * ivas_binRenderer_filterModule() Loading Loading @@ -891,8 +904,11 @@ static void ivas_binaural_obtain_DMX( for ( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { #ifdef FIX_1053_REVERB_RECONFIGURATION float dmxConst = dmxmtx_table[chOutIdx][chIdx]; #else float dmxConst = hBinRenderer->hReverb->dmxmtx[chOutIdx][chIdx]; #endif for ( bandIdx = 0; bandIdx < hBinRenderer->conv_band; bandIdx++ ) { for ( k = 0; k < numTimeSlots; k++ ) Loading Loading @@ -1076,7 +1092,11 @@ ivas_error ivas_binRenderer_open( ) { BINAURAL_RENDERER_HANDLE hBinRenderer; #ifdef FIX_1053_REVERB_RECONFIGURATION int16_t convBand, k; #else int16_t convBand, chIdx, k; #endif ivas_error error; error = IVAS_ERR_OK; Loading Loading @@ -1236,7 +1256,19 @@ ivas_error ivas_binRenderer_open( return error; } #ifdef FIX_1053_REVERB_RECONFIGURATION /* initialize the dmx matrix */ if ( hBinRenderer->nInChannels != HOA3_CHANNELS ) { for ( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ ) { for ( k = 0; k < hBinRenderer->nInChannels; k++ ) { hBinRenderer->hReverb->dmxmtx[chIdx][k] = dmxmtx_table[chIdx][k]; } } } #else #ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM if ( hBinRenderer->nInChannels != HOA3_CHANNELS ) #endif Loading @@ -1249,6 +1281,7 @@ ivas_error ivas_binRenderer_open( } } } #endif } else { Loading lib_dec/ivas_rom_dec.c +2 −1 Original line number Diff line number Diff line Loading @@ -390,6 +390,7 @@ const float dirac_dithering_ele_scale[DIRAC_DIFFUSE_LEVELS] = 6.716062e-01f, 1.011804e+00f, 1.796875e+00f, 2.804382e+00f, 4.623130e+00f, 7.802667e+00f, 1.045446e+01f, 1.379538e+01f }; #ifndef FIX_1053_REVERB_RECONFIGURATION /*----------------------------------------------------------------------------------* * FASTCONV and PARAMETRIC binaural renderer ROM tables *----------------------------------------------------------------------------------*/ Loading @@ -399,7 +400,7 @@ const float dmxmtx_table[BINAURAL_CHANNELS][11] = { 1.0f, 0.0f, 0.70709997f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.70709997f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f }, }; #endif /*----------------------------------------------------------------------* * MC ParamUpmix ROM tables Loading lib_dec/lib_dec.c +75 −0 Original line number Diff line number Diff line Loading @@ -2176,8 +2176,12 @@ ivas_error IVAS_DEC_FeedRenderConfig( ) { RENDER_CONFIG_HANDLE hRenderConfig; #ifdef FIX_1053_REVERB_RECONFIGURATION ivas_error error; #else #ifdef SPLIT_REND_WITH_HEAD_ROT ivas_error error; #endif #endif if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hRenderConfig == NULL ) Loading Loading @@ -2217,6 +2221,77 @@ ivas_error IVAS_DEC_FeedRenderConfig( mvr2r( renderConfig.roomAcoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.roomAcoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef FIX_1053_REVERB_RECONFIGURATION /* Re-initialize reverb instance if already available */ #ifdef SPLIT_REND_WITH_HEAD_ROT /* TD renderer Jot reverberator */ if ( hIvasDec->st_ivas->hReverb != NULL ) { if ( ( error = ivas_reverb_open( &hIvasDec->st_ivas->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } } /* CREND Jot reverberator */ if ( hIvasDec->st_ivas->hCrendWrapper != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend[0] != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend[0]->hReverb != NULL ) { if ( ( error = ivas_reverb_open( &hIvasDec->st_ivas->hCrendWrapper->hCrend[0]->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } } /* FB reverberator */ 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 ) { return error; } } #else /* TD renderer Jot reverberator */ if ( hIvasDec->st_ivas->hReverb != NULL ) { if ( ( error = ivas_reverb_open( &hIvasDec->st_ivas->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } } /* CREND Jot reverberator */ if ( hIvasDec->st_ivas->hCrendWrapper != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend->hReverb != NULL ) { if ( ( error = ivas_reverb_open( &hIvasDec->st_ivas->hCrendWrapper->hCrend->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } } /* DirAC CLDFB reverberator */ if ( hIvasDec->st_ivas->hDiracDecBin != NULL && hIvasDec->st_ivas->hDiracDecBin->hReverb != NULL ) { ivas_binaural_reverb_close( &( hIvasDec->st_ivas->hDiracDecBin->hReverb ) ); if ( ( error = ivas_binaural_reverb_init( &( hIvasDec->st_ivas->hDiracDecBin->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 ) { return error; } } #endif /* Fastconv CLDFB reverberator */ 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 ) { return error; } } #endif mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS ); #ifdef SPLIT_REND_WITH_HEAD_ROT Loading lib_rend/ivas_reverb.c +1 −1 File changed.Contains only whitespace changes. Show changes Loading
lib_dec/ivas_binRenderer_internal.c +34 −1 Original line number Diff line number Diff line Loading @@ -47,6 +47,19 @@ #endif #include "wmc_auto.h" #ifdef FIX_1053_REVERB_RECONFIGURATION /*------------------------------------------------------------------------- * Local constants *------------------------------------------------------------------------*/ #define REVERB_INPUT_DOWNMIX_CHANNELS ( 11 ) /* Downmix table for sparse frequency domain reverberator */ const float dmxmtx_table[BINAURAL_CHANNELS][REVERB_INPUT_DOWNMIX_CHANNELS] = { { 1.0f, 0.0f, 0.70709997f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.70709997f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f }, }; #endif /*------------------------------------------------------------------------- * ivas_binRenderer_filterModule() Loading Loading @@ -891,8 +904,11 @@ static void ivas_binaural_obtain_DMX( for ( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { #ifdef FIX_1053_REVERB_RECONFIGURATION float dmxConst = dmxmtx_table[chOutIdx][chIdx]; #else float dmxConst = hBinRenderer->hReverb->dmxmtx[chOutIdx][chIdx]; #endif for ( bandIdx = 0; bandIdx < hBinRenderer->conv_band; bandIdx++ ) { for ( k = 0; k < numTimeSlots; k++ ) Loading Loading @@ -1076,7 +1092,11 @@ ivas_error ivas_binRenderer_open( ) { BINAURAL_RENDERER_HANDLE hBinRenderer; #ifdef FIX_1053_REVERB_RECONFIGURATION int16_t convBand, k; #else int16_t convBand, chIdx, k; #endif ivas_error error; error = IVAS_ERR_OK; Loading Loading @@ -1236,7 +1256,19 @@ ivas_error ivas_binRenderer_open( return error; } #ifdef FIX_1053_REVERB_RECONFIGURATION /* initialize the dmx matrix */ if ( hBinRenderer->nInChannels != HOA3_CHANNELS ) { for ( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ ) { for ( k = 0; k < hBinRenderer->nInChannels; k++ ) { hBinRenderer->hReverb->dmxmtx[chIdx][k] = dmxmtx_table[chIdx][k]; } } } #else #ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM if ( hBinRenderer->nInChannels != HOA3_CHANNELS ) #endif Loading @@ -1249,6 +1281,7 @@ ivas_error ivas_binRenderer_open( } } } #endif } else { Loading
lib_dec/ivas_rom_dec.c +2 −1 Original line number Diff line number Diff line Loading @@ -390,6 +390,7 @@ const float dirac_dithering_ele_scale[DIRAC_DIFFUSE_LEVELS] = 6.716062e-01f, 1.011804e+00f, 1.796875e+00f, 2.804382e+00f, 4.623130e+00f, 7.802667e+00f, 1.045446e+01f, 1.379538e+01f }; #ifndef FIX_1053_REVERB_RECONFIGURATION /*----------------------------------------------------------------------------------* * FASTCONV and PARAMETRIC binaural renderer ROM tables *----------------------------------------------------------------------------------*/ Loading @@ -399,7 +400,7 @@ const float dmxmtx_table[BINAURAL_CHANNELS][11] = { 1.0f, 0.0f, 0.70709997f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.70709997f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f }, }; #endif /*----------------------------------------------------------------------* * MC ParamUpmix ROM tables Loading
lib_dec/lib_dec.c +75 −0 Original line number Diff line number Diff line Loading @@ -2176,8 +2176,12 @@ ivas_error IVAS_DEC_FeedRenderConfig( ) { RENDER_CONFIG_HANDLE hRenderConfig; #ifdef FIX_1053_REVERB_RECONFIGURATION ivas_error error; #else #ifdef SPLIT_REND_WITH_HEAD_ROT ivas_error error; #endif #endif if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hRenderConfig == NULL ) Loading Loading @@ -2217,6 +2221,77 @@ ivas_error IVAS_DEC_FeedRenderConfig( mvr2r( renderConfig.roomAcoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.roomAcoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef FIX_1053_REVERB_RECONFIGURATION /* Re-initialize reverb instance if already available */ #ifdef SPLIT_REND_WITH_HEAD_ROT /* TD renderer Jot reverberator */ if ( hIvasDec->st_ivas->hReverb != NULL ) { if ( ( error = ivas_reverb_open( &hIvasDec->st_ivas->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } } /* CREND Jot reverberator */ if ( hIvasDec->st_ivas->hCrendWrapper != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend[0] != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend[0]->hReverb != NULL ) { if ( ( error = ivas_reverb_open( &hIvasDec->st_ivas->hCrendWrapper->hCrend[0]->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } } /* FB reverberator */ 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 ) { return error; } } #else /* TD renderer Jot reverberator */ if ( hIvasDec->st_ivas->hReverb != NULL ) { if ( ( error = ivas_reverb_open( &hIvasDec->st_ivas->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } } /* CREND Jot reverberator */ if ( hIvasDec->st_ivas->hCrendWrapper != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend->hReverb != NULL ) { if ( ( error = ivas_reverb_open( &hIvasDec->st_ivas->hCrendWrapper->hCrend->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } } /* DirAC CLDFB reverberator */ if ( hIvasDec->st_ivas->hDiracDecBin != NULL && hIvasDec->st_ivas->hDiracDecBin->hReverb != NULL ) { ivas_binaural_reverb_close( &( hIvasDec->st_ivas->hDiracDecBin->hReverb ) ); if ( ( error = ivas_binaural_reverb_init( &( hIvasDec->st_ivas->hDiracDecBin->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 ) { return error; } } #endif /* Fastconv CLDFB reverberator */ 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 ) { return error; } } #endif mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS ); #ifdef SPLIT_REND_WITH_HEAD_ROT Loading