Loading lib_dec/ivas_dirac_dec.c +6 −5 Original line number Diff line number Diff line Loading @@ -1969,7 +1969,7 @@ void ivas_dirac_dec( float *output_f_local[MAX_OUTPUT_CHANNELS]; float cng_td_buffer[L_FRAME16k]; int16_t nchan_out, n, n_samples_sf; nchan_out = st_ivas->hDecoderConfig->nchan_out; nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n_samples_sf = JBM_CLDFB_SLOTS_IN_SUBFRAME * st_ivas->hDirAC->slot_size; Loading Loading @@ -2460,14 +2460,15 @@ void ivas_dirac_dec_render_sf( /* LFE synthesis */ if ( st_ivas->mc_mode == MC_MODE_MCMASA && !hDirAC->hOutSetup.separateChannelEnabled && !( hDirAC->hOutSetup.output_config == AUDIO_CONFIG_LS_CUSTOM && hDirAC->hOutSetup.num_lfe == 0 ) ) { #ifdef JBM_MASA /* TODO: JBM needs to be adapted....*/ #endif ivas_lfe_synth_with_cldfb( st_ivas->hMasa->hMasaLfeSynth, Cldfb_RealBuffer, Cldfb_ImagBuffer, Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS - 1], Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS - 1], slot_idx, #ifdef JBM_TSM_ON_TCS hDirAC->render_to_md_slot_map[index_slot], #else subframe_idx, #endif nchan_transport ); } Loading lib_dec/ivas_dirac_dec_binaural_functions.c +1 −1 Original line number Diff line number Diff line Loading @@ -2170,7 +2170,7 @@ static void ivas_dirac_dec_binaural_process_output_sf( if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { /* Process second / room effect part of binaural output when needed */ ivas_binaural_reverb_processSlot( st_ivas->hDiracDecBin->hReverb, numInChannels, inRe, inIm, reverbRe, reverbIm, 0 ); ivas_binaural_reverb_processSlot( st_ivas->hDiracDecBin->hReverb, numInChannels, inRe, inIm, reverbRe, reverbIm, slot ); } if ( !st_ivas->hDiracDecBin->useTdDecorr && max_band_decorr > 0 ) { Loading lib_dec/ivas_dirac_output_synthesis_dec.c +24 −24 Original line number Diff line number Diff line Loading @@ -1146,7 +1146,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( /*-----------------------------------------------------------------* * compute target PSDs *-----------------------------------------------------------------*/ #ifndef JBM_TSM_ON_TCS if ( hDirAC->hConfig->enc_param_start_band == 0 ) { diff_start_band = h_dirac_output_synthesis_params->use_onset_filters == 1 ? h_dirac_output_synthesis_params->max_band_decorr : 0; Loading Loading @@ -1174,7 +1174,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( h_dirac_output_synthesis_state->diffuse_responses_square, h_dirac_output_synthesis_state->cy_auto_diff_smooth ); } #endif /*-----------------------------------------------------------------* * compute variables for stereo transport signal type detection *-----------------------------------------------------------------*/ Loading lib_dec/ivas_ism_param_dec.c +16 −4 Original line number Diff line number Diff line Loading @@ -738,7 +738,7 @@ ivas_error ivas_param_ism_dec_open( st_ivas->hDirAC = hDirAC; #ifdef JBM_TSM_ON_TCS if ( st_ivas->hDecoderConfig->voip_active ) if ( st_ivas->hDecoderConfig->voip_active && st_ivas->renderer_type != RENDERER_MONO_DOWNMIX ) { int16_t nchan_transport = st_ivas->nchan_transport; hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ); Loading Loading @@ -1216,9 +1216,21 @@ void ivas_ism_dec_digest_tc( int16_t i, num_objects; int16_t azimuth, elevation; /* we have a full frame interpolator, adapt it */ /* for BE testing */ if ( ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ) == st_ivas->hTcBuffer->n_samples_available ) { int16_t interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ); for ( i = 0; i < interpolator_length; i++ ) { st_ivas->hIsmRendererData->interpolator[i] = (float) i / ( (float) interpolator_length - 1 ); } } else { ivas_jbm_dec_get_adapted_linear_interpolator( (int16_t) ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ), st_ivas->hTcBuffer->n_samples_available, st_ivas->hIsmRendererData->interpolator ); } /* also get the gains here */ num_objects = st_ivas->nchan_transport; for ( i = 0; i < num_objects; i++ ) Loading lib_dec/ivas_jbm_dec.c +36 −5 Original line number Diff line number Diff line Loading @@ -121,6 +121,10 @@ ivas_error ivas_jbm_dec_tc( { hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); } if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hDecoderConfig->nchan_out == 1 ) { ivas_ls_setup_conversion( st_ivas, output_frame, p_output, p_output ); } } else if ( st_ivas->ivas_format == ISM_FORMAT ) { Loading Loading @@ -300,6 +304,24 @@ ivas_error ivas_jbm_dec_tc( hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); } } if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) { if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) <= ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) { ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); } } if ( ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) >= ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) { if ( st_ivas->renderer_type == RENDERER_MC ) { ivas_ls_setup_conversion( st_ivas, output_frame, p_output, p_output ); } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); } } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { Loading Loading @@ -860,6 +882,11 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { /* we still need to copy the separate channel if available */ if ( st_ivas->hOutSetup.separateChannelEnabled ) { mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); } ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); } else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) Loading Loading @@ -1063,7 +1090,11 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ) /* i : IVAS output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; if ( st_ivas->ivas_format == ISM_FORMAT ) if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) { num_tc = 1; } else if ( st_ivas->ivas_format == ISM_FORMAT ) { if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) { Loading Loading @@ -1114,7 +1145,7 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ) /* i : IVAS num_tc = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; } } else if ( ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) > ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) else if ( ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) >= ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) { num_tc = st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; } Loading @@ -1125,9 +1156,9 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ) /* i : IVAS { num_tc++; } if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || if ( st_ivas->hOutSetup.separateChannelEnabled && (output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) ) { /* LFE is synthesized in TD with the TCs*/ num_tc++; Loading Loading
lib_dec/ivas_dirac_dec.c +6 −5 Original line number Diff line number Diff line Loading @@ -1969,7 +1969,7 @@ void ivas_dirac_dec( float *output_f_local[MAX_OUTPUT_CHANNELS]; float cng_td_buffer[L_FRAME16k]; int16_t nchan_out, n, n_samples_sf; nchan_out = st_ivas->hDecoderConfig->nchan_out; nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n_samples_sf = JBM_CLDFB_SLOTS_IN_SUBFRAME * st_ivas->hDirAC->slot_size; Loading Loading @@ -2460,14 +2460,15 @@ void ivas_dirac_dec_render_sf( /* LFE synthesis */ if ( st_ivas->mc_mode == MC_MODE_MCMASA && !hDirAC->hOutSetup.separateChannelEnabled && !( hDirAC->hOutSetup.output_config == AUDIO_CONFIG_LS_CUSTOM && hDirAC->hOutSetup.num_lfe == 0 ) ) { #ifdef JBM_MASA /* TODO: JBM needs to be adapted....*/ #endif ivas_lfe_synth_with_cldfb( st_ivas->hMasa->hMasaLfeSynth, Cldfb_RealBuffer, Cldfb_ImagBuffer, Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS - 1], Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS - 1], slot_idx, #ifdef JBM_TSM_ON_TCS hDirAC->render_to_md_slot_map[index_slot], #else subframe_idx, #endif nchan_transport ); } Loading
lib_dec/ivas_dirac_dec_binaural_functions.c +1 −1 Original line number Diff line number Diff line Loading @@ -2170,7 +2170,7 @@ static void ivas_dirac_dec_binaural_process_output_sf( if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { /* Process second / room effect part of binaural output when needed */ ivas_binaural_reverb_processSlot( st_ivas->hDiracDecBin->hReverb, numInChannels, inRe, inIm, reverbRe, reverbIm, 0 ); ivas_binaural_reverb_processSlot( st_ivas->hDiracDecBin->hReverb, numInChannels, inRe, inIm, reverbRe, reverbIm, slot ); } if ( !st_ivas->hDiracDecBin->useTdDecorr && max_band_decorr > 0 ) { Loading
lib_dec/ivas_dirac_output_synthesis_dec.c +24 −24 Original line number Diff line number Diff line Loading @@ -1146,7 +1146,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( /*-----------------------------------------------------------------* * compute target PSDs *-----------------------------------------------------------------*/ #ifndef JBM_TSM_ON_TCS if ( hDirAC->hConfig->enc_param_start_band == 0 ) { diff_start_band = h_dirac_output_synthesis_params->use_onset_filters == 1 ? h_dirac_output_synthesis_params->max_band_decorr : 0; Loading Loading @@ -1174,7 +1174,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( h_dirac_output_synthesis_state->diffuse_responses_square, h_dirac_output_synthesis_state->cy_auto_diff_smooth ); } #endif /*-----------------------------------------------------------------* * compute variables for stereo transport signal type detection *-----------------------------------------------------------------*/ Loading
lib_dec/ivas_ism_param_dec.c +16 −4 Original line number Diff line number Diff line Loading @@ -738,7 +738,7 @@ ivas_error ivas_param_ism_dec_open( st_ivas->hDirAC = hDirAC; #ifdef JBM_TSM_ON_TCS if ( st_ivas->hDecoderConfig->voip_active ) if ( st_ivas->hDecoderConfig->voip_active && st_ivas->renderer_type != RENDERER_MONO_DOWNMIX ) { int16_t nchan_transport = st_ivas->nchan_transport; hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ); Loading Loading @@ -1216,9 +1216,21 @@ void ivas_ism_dec_digest_tc( int16_t i, num_objects; int16_t azimuth, elevation; /* we have a full frame interpolator, adapt it */ /* for BE testing */ if ( ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ) == st_ivas->hTcBuffer->n_samples_available ) { int16_t interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ); for ( i = 0; i < interpolator_length; i++ ) { st_ivas->hIsmRendererData->interpolator[i] = (float) i / ( (float) interpolator_length - 1 ); } } else { ivas_jbm_dec_get_adapted_linear_interpolator( (int16_t) ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ), st_ivas->hTcBuffer->n_samples_available, st_ivas->hIsmRendererData->interpolator ); } /* also get the gains here */ num_objects = st_ivas->nchan_transport; for ( i = 0; i < num_objects; i++ ) Loading
lib_dec/ivas_jbm_dec.c +36 −5 Original line number Diff line number Diff line Loading @@ -121,6 +121,10 @@ ivas_error ivas_jbm_dec_tc( { hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); } if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hDecoderConfig->nchan_out == 1 ) { ivas_ls_setup_conversion( st_ivas, output_frame, p_output, p_output ); } } else if ( st_ivas->ivas_format == ISM_FORMAT ) { Loading Loading @@ -300,6 +304,24 @@ ivas_error ivas_jbm_dec_tc( hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); } } if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) { if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) <= ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) { ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); } } if ( ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) >= ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) { if ( st_ivas->renderer_type == RENDERER_MC ) { ivas_ls_setup_conversion( st_ivas, output_frame, p_output, p_output ); } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); } } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { Loading Loading @@ -860,6 +882,11 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { /* we still need to copy the separate channel if available */ if ( st_ivas->hOutSetup.separateChannelEnabled ) { mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); } ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); } else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) Loading Loading @@ -1063,7 +1090,11 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ) /* i : IVAS output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; if ( st_ivas->ivas_format == ISM_FORMAT ) if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) { num_tc = 1; } else if ( st_ivas->ivas_format == ISM_FORMAT ) { if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) { Loading Loading @@ -1114,7 +1145,7 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ) /* i : IVAS num_tc = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; } } else if ( ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) > ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) else if ( ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) >= ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) { num_tc = st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; } Loading @@ -1125,9 +1156,9 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ) /* i : IVAS { num_tc++; } if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || if ( st_ivas->hOutSetup.separateChannelEnabled && (output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) ) { /* LFE is synthesized in TD with the TCs*/ num_tc++; Loading