Loading apps/decoder.c +33 −2 Original line number Diff line number Diff line Loading @@ -457,9 +457,14 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SPLIT_REND_LCLD_5MS asked_frame_size = arg.renderFramesize; #endif if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { #ifndef SPLIT_REND_LCLD_5MS asked_frame_size = arg.renderFramesize; #endif if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading @@ -472,11 +477,12 @@ int main( goto cleanup; } #ifndef SPLIT_REND_LCLD_5MS if ( arg.renderFramesize != asked_frame_size ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for split rendering!\n" ); } #endif arg.enableHeadRotation = true; } #endif Loading Loading @@ -630,6 +636,7 @@ int main( } #ifdef SPLIT_REND_WITH_HEAD_ROT #ifndef SPLIT_REND_LCLD_5MS if ( arg.renderFramesize == IVAS_RENDER_FRAMESIZE_5MS && ( renderConfig.split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || renderConfig.split_rend_config.dof == 0 ) ) { Loading @@ -647,7 +654,7 @@ int main( } #endif #endif if ( RenderConfigReader_read( renderConfigReader, arg.renderConfigFilename, &renderConfig ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); Loading @@ -660,6 +667,30 @@ int main( goto cleanup; } #ifdef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT if ( asked_frame_size != IVAS_RENDER_FRAMESIZE_20MS && ( renderConfig.split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || renderConfig.split_rend_config.dof == 0 ) ) { arg.renderFramesize = asked_frame_size; } else { arg.renderFramesize = IVAS_RENDER_FRAMESIZE_20MS; } if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK ) { return error; } if ( arg.renderFramesize != asked_frame_size ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for non-0dof split rendering!\n" ); } #endif #endif if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) Loading apps/renderer.c +23 −1 Original line number Diff line number Diff line Loading @@ -1903,7 +1903,8 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { if ( splitBinNeedsNewFrame ) #ifdef SPLIT_REND_LCLD_5MS if ( numSamplesRead > 0 ) { if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) { Loading @@ -1917,7 +1918,24 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } #endif if ( splitBinNeedsNewFrame ) { #ifndef SPLIT_REND_LCLD_5MS if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } IVAS_REND_ReadOnlyAudioBuffer tmpBuffer = getReadOnlySubBuffer( inBuffer, (int16_t) args.inConfig.binBuses[i].inputChannelIndex, numChannels ); if ( ( error = IVAS_REND_FeedInputAudio( hIvasRend, splitBinIds[i], tmpBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif if ( ( error = IVAS_REND_FeedSplitBinauralBitstream( hIvasRend, splitBinIds[i], &bitsBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -2217,6 +2235,9 @@ cleanup: } split_rend_reader_writer_close( &hSplitRendFileReadWrite ); #ifdef SPLIT_REND_LCLD_5MS SplitRendBFIFileReader_close( &splitRendBFIReader ); #endif #endif for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i ) Loading @@ -2229,6 +2250,7 @@ cleanup: RotationFileReader_close( &headRotReader ); RotationFileReader_close( &externalOrientationFileReader ); RotationFileReader_close( &referenceRotReader ); Vector3PairFileReader_close( &referenceVectorReader ); destroy_td_hrtf( hHrtfTD ); destroy_SetOfHRTF( hSetOfHRTF ); Loading lib_com/options.h +7 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,8 @@ /*#define SPLIT_REND_WITH_HEAD_ROT_DEBUG*/ /* debugging switch for split rendering */ /*#define SPLIT_POSE_CORRECTION_DEBUG*/ /* debugging switch for split rendering pose correction */ /*#define SPLIT_MD_CODING_DEBUG*/ /* debugging switch for split rendering metadata coding */ /*#define DEBUG_WRITE_PREDICTORS*/ /* debugging switch for LCDL predictors*/ /*#define DEBUG_WRITE_MS_PRED*/ /* debugging switch for LCLD mid-side prediction*/ #endif /* DEBUGGING */ Loading Loading @@ -179,6 +181,11 @@ #define NONBE_FIX_986_MC_BW_SWITCHING /* FhG: fix crash in bw and br switching with MC */ #define NONBE_FIX_975_JBM_USAN /* FhG: Fix issue #975, USAN in JBM decoding ad 13.2kbps */ #define NONBE_FIX_982_OMASA_DELAY_COMP_5MS /* FhG : issue #982 : 5ms and 20ms output different for OMASA */ #ifdef SPLIT_REND_WITH_HEAD_ROT #define SPLIT_REND_LCLD_5MS /* Dlb: LCLD 5ms framing operation */ #endif /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ Loading lib_dec/ivas_init_dec.c +15 −2 Original line number Diff line number Diff line Loading @@ -247,10 +247,17 @@ static ivas_error ivas_dec_init_split_rend( } } #ifdef SPLIT_REND_LCLD_5MS if ( ( error = ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, &st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, cldfb_in_flag, pcm_out_flag, (int16_t) st_ivas->hDecoderConfig->render_framesize ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, &st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, cldfb_in_flag, pcm_out_flag ) ) != IVAS_ERR_OK ) { return error; } #endif #ifdef SPLIT_REND_WITH_HEAD_ROT if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->ivas_format == SBA_ISM_FORMAT ) Loading @@ -259,8 +266,11 @@ static ivas_error ivas_dec_init_split_rend( } #endif #ifdef SPLIT_REND_LCLD_5MS error = ivas_split_renderer_open( &st_ivas->hSplitBinRend.splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, cldfb_in_flag, pcm_out_flag, (int16_t) st_ivas->hDecoderConfig->render_framesize ); #else error = ivas_split_renderer_open( &st_ivas->hSplitBinRend.splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, cldfb_in_flag, pcm_out_flag, st_ivas->hDecoderConfig->render_framesize == IVAS_RENDER_FRAMESIZE_5MS ); #endif return error; } #endif Loading Loading @@ -2515,7 +2525,9 @@ void ivas_initialize_handles_dec( st_ivas->hSplitBinRend.hMultiBinCldfbData = NULL; st_ivas->hSplitBinRend.hSplitRendBits = NULL; st_ivas->hSplitBinRend.hCldfbDataOut = NULL; #ifndef SPLIT_REND_LCLD_5MS st_ivas->hSplitBinRend.tdDataOut = NULL; #endif st_ivas->hSplitBinRend.numTdSamplesPerChannelCached = 0; ivas_init_split_rend_handles( &st_ivas->hSplitBinRend.splitrend ); #endif Loading Loading @@ -2665,11 +2677,12 @@ void ivas_destroy_dec( free( st_ivas->hSplitBinRend.hCldfbDataOut ); st_ivas->hSplitBinRend.hCldfbDataOut = NULL; } #ifndef SPLIT_REND_LCLD_5MS if ( st_ivas->hSplitBinRend.tdDataOut != NULL ) { free( st_ivas->hSplitBinRend.tdDataOut ); } #endif #endif /* Parametric binaural renderer handle */ Loading lib_dec/ivas_mc_paramupmix_dec.c +27 −3 Original line number Diff line number Diff line Loading @@ -66,11 +66,15 @@ const int16_t MC_PARAMUPMIX_CHIDX2[MC_PARAMUPMIX_COMBINATIONS] = { 2, 3, 6, 7 }; static void ps_pred_process_sf( MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, DECODER_TC_BUFFER_HANDLE hTcBuffer, float qmf_mod_re[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_mod_im[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_side_re[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_side_im[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float *param_interpol, const int16_t ch, const int16_t slots_rendered ); #ifndef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, float *output_f[MAX_OUTPUT_CHANNELS], const int16_t slot_index_start ); #else static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, float *output_f[MAX_OUTPUT_CHANNELS] ); #endif #else static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, float *output_f[MAX_OUTPUT_CHANNELS] ); #endif static void ivas_param_upmix_dec_decorr_subframes( Decoder_Struct *st_ivas, const int16_t nSamplesForRendering ); Loading Loading @@ -230,8 +234,10 @@ void ivas_mc_paramupmix_dec_render( int16_t slots_to_render, first_sf, last_sf, subframe_idx; uint16_t slot_size, ch; float *output_f_local[MAX_OUTPUT_CHANNELS]; #ifndef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t slot_index_start; #endif #endif MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; Loading Loading @@ -267,18 +273,22 @@ void ivas_mc_paramupmix_dec_render( assert( slots_to_render == 0 ); #endif { #ifndef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT slot_index_start = 0; #endif #endif for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) { int16_t n_samples_sf = slot_size * st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; #ifndef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local, slot_index_start ); slot_index_start += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; #else ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local ); #endif #else ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local ); #endif Loading Loading @@ -654,7 +664,7 @@ static void ps_pred_process_sf( return; } #ifndef SPLIT_REND_LCLD_5MS static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ #ifdef SPLIT_REND_WITH_HEAD_ROT Loading @@ -664,6 +674,12 @@ static void ivas_mc_paramupmix_dec_sf( float *output_f[MAX_OUTPUT_CHANNELS] /* i/o: synthesized core-coder transport channels */ #endif ) #else static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *output_f[MAX_OUTPUT_CHANNELS] /* i/o: synthesized core-coder transport channels */ ) #endif { int16_t i, ch, slot_idx, k; float *pPcm_temp[MC_PARAMUPMIX_COMBINATIONS * 2]; /* decorrelated and undecorrelated*/ Loading @@ -678,6 +694,9 @@ static void ivas_mc_paramupmix_dec_sf( #ifdef SPLIT_REND_WITH_HEAD_ROT float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; #ifdef SPLIT_REND_LCLD_5MS int16_t slot_index_start; #endif #else float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; Loading @@ -687,6 +706,11 @@ static void ivas_mc_paramupmix_dec_sf( assert( hMCParamUpmix ); push_wmops( "ivas_mc_paramupmix_dec_sf" ); #ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SPLIT_REND_LCLD_5MS slot_index_start = st_ivas->hTcBuffer->slots_rendered; #endif #endif for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) { pPcm_temp[2 * i] = output_f[i + 4]; /* un-decorrelated */ Loading Loading
apps/decoder.c +33 −2 Original line number Diff line number Diff line Loading @@ -457,9 +457,14 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SPLIT_REND_LCLD_5MS asked_frame_size = arg.renderFramesize; #endif if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { #ifndef SPLIT_REND_LCLD_5MS asked_frame_size = arg.renderFramesize; #endif if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading @@ -472,11 +477,12 @@ int main( goto cleanup; } #ifndef SPLIT_REND_LCLD_5MS if ( arg.renderFramesize != asked_frame_size ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for split rendering!\n" ); } #endif arg.enableHeadRotation = true; } #endif Loading Loading @@ -630,6 +636,7 @@ int main( } #ifdef SPLIT_REND_WITH_HEAD_ROT #ifndef SPLIT_REND_LCLD_5MS if ( arg.renderFramesize == IVAS_RENDER_FRAMESIZE_5MS && ( renderConfig.split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || renderConfig.split_rend_config.dof == 0 ) ) { Loading @@ -647,7 +654,7 @@ int main( } #endif #endif if ( RenderConfigReader_read( renderConfigReader, arg.renderConfigFilename, &renderConfig ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); Loading @@ -660,6 +667,30 @@ int main( goto cleanup; } #ifdef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT if ( asked_frame_size != IVAS_RENDER_FRAMESIZE_20MS && ( renderConfig.split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || renderConfig.split_rend_config.dof == 0 ) ) { arg.renderFramesize = asked_frame_size; } else { arg.renderFramesize = IVAS_RENDER_FRAMESIZE_20MS; } if ( ( error = IVAS_DEC_SetRenderFramesize( hIvasDec, arg.renderFramesize ) ) != IVAS_ERR_OK ) { return error; } if ( arg.renderFramesize != asked_frame_size ) { fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for non-0dof split rendering!\n" ); } #endif #endif if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) Loading
apps/renderer.c +23 −1 Original line number Diff line number Diff line Loading @@ -1903,7 +1903,8 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { if ( splitBinNeedsNewFrame ) #ifdef SPLIT_REND_LCLD_5MS if ( numSamplesRead > 0 ) { if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) { Loading @@ -1917,7 +1918,24 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } #endif if ( splitBinNeedsNewFrame ) { #ifndef SPLIT_REND_LCLD_5MS if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } IVAS_REND_ReadOnlyAudioBuffer tmpBuffer = getReadOnlySubBuffer( inBuffer, (int16_t) args.inConfig.binBuses[i].inputChannelIndex, numChannels ); if ( ( error = IVAS_REND_FeedInputAudio( hIvasRend, splitBinIds[i], tmpBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif if ( ( error = IVAS_REND_FeedSplitBinauralBitstream( hIvasRend, splitBinIds[i], &bitsBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -2217,6 +2235,9 @@ cleanup: } split_rend_reader_writer_close( &hSplitRendFileReadWrite ); #ifdef SPLIT_REND_LCLD_5MS SplitRendBFIFileReader_close( &splitRendBFIReader ); #endif #endif for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i ) Loading @@ -2229,6 +2250,7 @@ cleanup: RotationFileReader_close( &headRotReader ); RotationFileReader_close( &externalOrientationFileReader ); RotationFileReader_close( &referenceRotReader ); Vector3PairFileReader_close( &referenceVectorReader ); destroy_td_hrtf( hHrtfTD ); destroy_SetOfHRTF( hSetOfHRTF ); Loading
lib_com/options.h +7 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,8 @@ /*#define SPLIT_REND_WITH_HEAD_ROT_DEBUG*/ /* debugging switch for split rendering */ /*#define SPLIT_POSE_CORRECTION_DEBUG*/ /* debugging switch for split rendering pose correction */ /*#define SPLIT_MD_CODING_DEBUG*/ /* debugging switch for split rendering metadata coding */ /*#define DEBUG_WRITE_PREDICTORS*/ /* debugging switch for LCDL predictors*/ /*#define DEBUG_WRITE_MS_PRED*/ /* debugging switch for LCLD mid-side prediction*/ #endif /* DEBUGGING */ Loading Loading @@ -179,6 +181,11 @@ #define NONBE_FIX_986_MC_BW_SWITCHING /* FhG: fix crash in bw and br switching with MC */ #define NONBE_FIX_975_JBM_USAN /* FhG: Fix issue #975, USAN in JBM decoding ad 13.2kbps */ #define NONBE_FIX_982_OMASA_DELAY_COMP_5MS /* FhG : issue #982 : 5ms and 20ms output different for OMASA */ #ifdef SPLIT_REND_WITH_HEAD_ROT #define SPLIT_REND_LCLD_5MS /* Dlb: LCLD 5ms framing operation */ #endif /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ Loading
lib_dec/ivas_init_dec.c +15 −2 Original line number Diff line number Diff line Loading @@ -247,10 +247,17 @@ static ivas_error ivas_dec_init_split_rend( } } #ifdef SPLIT_REND_LCLD_5MS if ( ( error = ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, &st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, cldfb_in_flag, pcm_out_flag, (int16_t) st_ivas->hDecoderConfig->render_framesize ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, &st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, cldfb_in_flag, pcm_out_flag ) ) != IVAS_ERR_OK ) { return error; } #endif #ifdef SPLIT_REND_WITH_HEAD_ROT if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->ivas_format == SBA_ISM_FORMAT ) Loading @@ -259,8 +266,11 @@ static ivas_error ivas_dec_init_split_rend( } #endif #ifdef SPLIT_REND_LCLD_5MS error = ivas_split_renderer_open( &st_ivas->hSplitBinRend.splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, cldfb_in_flag, pcm_out_flag, (int16_t) st_ivas->hDecoderConfig->render_framesize ); #else error = ivas_split_renderer_open( &st_ivas->hSplitBinRend.splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, cldfb_in_flag, pcm_out_flag, st_ivas->hDecoderConfig->render_framesize == IVAS_RENDER_FRAMESIZE_5MS ); #endif return error; } #endif Loading Loading @@ -2515,7 +2525,9 @@ void ivas_initialize_handles_dec( st_ivas->hSplitBinRend.hMultiBinCldfbData = NULL; st_ivas->hSplitBinRend.hSplitRendBits = NULL; st_ivas->hSplitBinRend.hCldfbDataOut = NULL; #ifndef SPLIT_REND_LCLD_5MS st_ivas->hSplitBinRend.tdDataOut = NULL; #endif st_ivas->hSplitBinRend.numTdSamplesPerChannelCached = 0; ivas_init_split_rend_handles( &st_ivas->hSplitBinRend.splitrend ); #endif Loading Loading @@ -2665,11 +2677,12 @@ void ivas_destroy_dec( free( st_ivas->hSplitBinRend.hCldfbDataOut ); st_ivas->hSplitBinRend.hCldfbDataOut = NULL; } #ifndef SPLIT_REND_LCLD_5MS if ( st_ivas->hSplitBinRend.tdDataOut != NULL ) { free( st_ivas->hSplitBinRend.tdDataOut ); } #endif #endif /* Parametric binaural renderer handle */ Loading
lib_dec/ivas_mc_paramupmix_dec.c +27 −3 Original line number Diff line number Diff line Loading @@ -66,11 +66,15 @@ const int16_t MC_PARAMUPMIX_CHIDX2[MC_PARAMUPMIX_COMBINATIONS] = { 2, 3, 6, 7 }; static void ps_pred_process_sf( MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, DECODER_TC_BUFFER_HANDLE hTcBuffer, float qmf_mod_re[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_mod_im[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_side_re[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_side_im[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float *param_interpol, const int16_t ch, const int16_t slots_rendered ); #ifndef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, float *output_f[MAX_OUTPUT_CHANNELS], const int16_t slot_index_start ); #else static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, float *output_f[MAX_OUTPUT_CHANNELS] ); #endif #else static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, float *output_f[MAX_OUTPUT_CHANNELS] ); #endif static void ivas_param_upmix_dec_decorr_subframes( Decoder_Struct *st_ivas, const int16_t nSamplesForRendering ); Loading Loading @@ -230,8 +234,10 @@ void ivas_mc_paramupmix_dec_render( int16_t slots_to_render, first_sf, last_sf, subframe_idx; uint16_t slot_size, ch; float *output_f_local[MAX_OUTPUT_CHANNELS]; #ifndef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t slot_index_start; #endif #endif MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; Loading Loading @@ -267,18 +273,22 @@ void ivas_mc_paramupmix_dec_render( assert( slots_to_render == 0 ); #endif { #ifndef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT slot_index_start = 0; #endif #endif for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) { int16_t n_samples_sf = slot_size * st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; #ifndef SPLIT_REND_LCLD_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local, slot_index_start ); slot_index_start += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; #else ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local ); #endif #else ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local ); #endif Loading Loading @@ -654,7 +664,7 @@ static void ps_pred_process_sf( return; } #ifndef SPLIT_REND_LCLD_5MS static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ #ifdef SPLIT_REND_WITH_HEAD_ROT Loading @@ -664,6 +674,12 @@ static void ivas_mc_paramupmix_dec_sf( float *output_f[MAX_OUTPUT_CHANNELS] /* i/o: synthesized core-coder transport channels */ #endif ) #else static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *output_f[MAX_OUTPUT_CHANNELS] /* i/o: synthesized core-coder transport channels */ ) #endif { int16_t i, ch, slot_idx, k; float *pPcm_temp[MC_PARAMUPMIX_COMBINATIONS * 2]; /* decorrelated and undecorrelated*/ Loading @@ -678,6 +694,9 @@ static void ivas_mc_paramupmix_dec_sf( #ifdef SPLIT_REND_WITH_HEAD_ROT float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; #ifdef SPLIT_REND_LCLD_5MS int16_t slot_index_start; #endif #else float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; Loading @@ -687,6 +706,11 @@ static void ivas_mc_paramupmix_dec_sf( assert( hMCParamUpmix ); push_wmops( "ivas_mc_paramupmix_dec_sf" ); #ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SPLIT_REND_LCLD_5MS slot_index_start = st_ivas->hTcBuffer->slots_rendered; #endif #endif for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) { pPcm_temp[2 * i] = output_f[i + 4]; /* un-decorrelated */ Loading