Loading apps/decoder.c +13 −1 Original line number Diff line number Diff line Loading @@ -488,18 +488,30 @@ int main( goto cleanup; } #ifdef CONF_DISTATT if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity_fx ) ) != IVAS_ERR_OK ) #else if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] ); goto cleanup; } #ifndef CONF_DISTATT FOR( Word16 i = 0; i < 4; i++ ) { renderConfig.directivity_fx[i * 3] = (Word16) ( renderConfig.directivity[i * 3] * ( 1u << 6 ) ); renderConfig.directivity_fx[i * 3 + 1] = (Word16) ( renderConfig.directivity[i * 3 + 1] * ( 1u << 6 ) ); renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( ( 1u << 15 ) - 1 ) ); } #endif #ifdef CONF_DISTATT if ( ( error = RenderConfigReader_getDistanceAttenuation( renderConfigReader, renderConfig.distAtt_fx ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get Distance Attenuation \n\n" ); goto cleanup; } #endif if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { Loading lib_com/common_api_types.h +4 −0 Original line number Diff line number Diff line Loading @@ -347,6 +347,10 @@ typedef struct _IVAS_RENDER_CONFIG ISAR_SPLIT_REND_CONFIG_DATA split_rend_config; float directivity[IVAS_MAX_NUM_OBJECTS * 3]; Word16 directivity_fx[IVAS_MAX_NUM_OBJECTS * 3]; // has the following q-factor pattern: {6, 6, 15, 6, 6, 15, 6, 6, 15, 6, 6, 15} #ifdef CONF_DISTATT float distAtt[3]; Word32 distAtt_fx[3]; /* {Q27, Q30, Q30} */ #endif } IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE; typedef struct Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define CONF_DISTATT /* Eri: Make distance attenuation configurable */ /* #################### End BASOP porting switches ############################ */ Loading lib_dec/ivas_objectRenderer_internal_fx.c +18 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,11 @@ ivas_error ivas_td_binaural_open_fx( *num_src = st_ivas->nchan_ism; move16(); } #ifdef CONF_DISTATT return ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, *num_src, st_ivas->ivas_format, st_ivas->transport_config, st_ivas->hRenderConfig->directivity_fx, st_ivas->hRenderConfig->distAtt_fx, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns, SrcInd ); #else return ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, *num_src, st_ivas->ivas_format, st_ivas->transport_config, st_ivas->hRenderConfig->directivity_fx, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns, SrcInd ); #endif } Loading Loading @@ -328,7 +332,19 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural( { continue; } #ifdef CONF_DISTATT IF( ( error = ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport, st_ivas->ivas_format, st_ivas->transport_config, st_ivas->hRenderConfig->directivity_fx, st_ivas->hRenderConfig->distAtt_fx, st_ivas->hTransSetup, &st_ivas->hTdRendHandles[i], &st_ivas->binaural_latency_ns, SrcInd ) ) != IVAS_ERR_OK ) #else IF( ( error = ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport, Loading @@ -339,6 +355,7 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural( &st_ivas->hTdRendHandles[i], &st_ivas->binaural_latency_ns, SrcInd ) ) != IVAS_ERR_OK ) #endif { return error; } Loading lib_dec/lib_dec_fx.c +3 −0 Original line number Diff line number Diff line Loading @@ -2827,6 +2827,9 @@ ivas_error IVAS_DEC_FeedRenderConfig( Copy32( renderConfig.roomAcoustics.pAcoustic_dsr_fx, hRenderConfig->roomAcoustics.pAcoustic_dsr_fx, CLDFB_NO_CHANNELS_MAX ); // Q30 Copy( renderConfig.directivity_fx, hRenderConfig->directivity_fx, 3 * MAX_NUM_OBJECTS ); #ifdef CONF_DISTATT Copy32( renderConfig.distAtt_fx, hRenderConfig->distAtt_fx, 3 ); #endif hRenderConfig->split_rend_config = renderConfig.split_rend_config; Loading Loading
apps/decoder.c +13 −1 Original line number Diff line number Diff line Loading @@ -488,18 +488,30 @@ int main( goto cleanup; } #ifdef CONF_DISTATT if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity_fx ) ) != IVAS_ERR_OK ) #else if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] ); goto cleanup; } #ifndef CONF_DISTATT FOR( Word16 i = 0; i < 4; i++ ) { renderConfig.directivity_fx[i * 3] = (Word16) ( renderConfig.directivity[i * 3] * ( 1u << 6 ) ); renderConfig.directivity_fx[i * 3 + 1] = (Word16) ( renderConfig.directivity[i * 3 + 1] * ( 1u << 6 ) ); renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( ( 1u << 15 ) - 1 ) ); } #endif #ifdef CONF_DISTATT if ( ( error = RenderConfigReader_getDistanceAttenuation( renderConfigReader, renderConfig.distAtt_fx ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get Distance Attenuation \n\n" ); goto cleanup; } #endif if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { Loading
lib_com/common_api_types.h +4 −0 Original line number Diff line number Diff line Loading @@ -347,6 +347,10 @@ typedef struct _IVAS_RENDER_CONFIG ISAR_SPLIT_REND_CONFIG_DATA split_rend_config; float directivity[IVAS_MAX_NUM_OBJECTS * 3]; Word16 directivity_fx[IVAS_MAX_NUM_OBJECTS * 3]; // has the following q-factor pattern: {6, 6, 15, 6, 6, 15, 6, 6, 15, 6, 6, 15} #ifdef CONF_DISTATT float distAtt[3]; Word32 distAtt_fx[3]; /* {Q27, Q30, Q30} */ #endif } IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE; typedef struct Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ #define NONBE_FIX_SBA_SIGNALING_BITS_B /* FhG: issue 1061: option B: signal sba order additionally in OSBA */ #define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define CONF_DISTATT /* Eri: Make distance attenuation configurable */ /* #################### End BASOP porting switches ############################ */ Loading
lib_dec/ivas_objectRenderer_internal_fx.c +18 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,11 @@ ivas_error ivas_td_binaural_open_fx( *num_src = st_ivas->nchan_ism; move16(); } #ifdef CONF_DISTATT return ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, *num_src, st_ivas->ivas_format, st_ivas->transport_config, st_ivas->hRenderConfig->directivity_fx, st_ivas->hRenderConfig->distAtt_fx, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns, SrcInd ); #else return ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, *num_src, st_ivas->ivas_format, st_ivas->transport_config, st_ivas->hRenderConfig->directivity_fx, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns, SrcInd ); #endif } Loading Loading @@ -328,7 +332,19 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural( { continue; } #ifdef CONF_DISTATT IF( ( error = ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport, st_ivas->ivas_format, st_ivas->transport_config, st_ivas->hRenderConfig->directivity_fx, st_ivas->hRenderConfig->distAtt_fx, st_ivas->hTransSetup, &st_ivas->hTdRendHandles[i], &st_ivas->binaural_latency_ns, SrcInd ) ) != IVAS_ERR_OK ) #else IF( ( error = ivas_td_binaural_open_unwrap_fx( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport, Loading @@ -339,6 +355,7 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural( &st_ivas->hTdRendHandles[i], &st_ivas->binaural_latency_ns, SrcInd ) ) != IVAS_ERR_OK ) #endif { return error; } Loading
lib_dec/lib_dec_fx.c +3 −0 Original line number Diff line number Diff line Loading @@ -2827,6 +2827,9 @@ ivas_error IVAS_DEC_FeedRenderConfig( Copy32( renderConfig.roomAcoustics.pAcoustic_dsr_fx, hRenderConfig->roomAcoustics.pAcoustic_dsr_fx, CLDFB_NO_CHANNELS_MAX ); // Q30 Copy( renderConfig.directivity_fx, hRenderConfig->directivity_fx, 3 * MAX_NUM_OBJECTS ); #ifdef CONF_DISTATT Copy32( renderConfig.distAtt_fx, hRenderConfig->distAtt_fx, 3 ); #endif hRenderConfig->split_rend_config = renderConfig.split_rend_config; Loading