Loading lib_com/ivas_prot.h +3 −0 Original line number Diff line number Diff line Loading @@ -3719,6 +3719,9 @@ void generate_masking_noise_lb_dirac( HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables */ float *tdBuffer, /* i/o: time-domain signal, if NULL no LB-CNA */ const int16_t nCldfbTs, /* i : number of CLDFB slots that will be rendered */ #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i : common spatial rendering parameters handle */ #endif const int16_t cna_flag /* i : CNA flag for LB and HB */ ); Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,7 @@ #define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ #define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ #define NONBE_FIX_951_MCMASA_5MS_RENDERING /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2kbps to BINAURAL */ /* #################### End BASOP porting switches ############################ */ Loading lib_dec/fd_cng_dec.c +33 −1 Original line number Diff line number Diff line Loading @@ -1805,6 +1805,9 @@ void generate_masking_noise_lb_dirac( HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables */ float *tdBuffer, /* i/o: time-domain signal, if NULL no LB-CNA */ const int16_t nCldfbTs, /* i : number of CLDFB slots that will be rendered */ #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i : common spatial rendering parameters handle */ #endif const int16_t cna_flag /* i : CNA flag for LB and HB */ ) { Loading Loading @@ -1857,6 +1860,13 @@ void generate_masking_noise_lb_dirac( /* LB CLDFB - CNA from STFT: CNA applied only in channel 0*/ if ( cna_flag && tdBuffer != NULL ) { #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING int16_t cur_subframe; int16_t cur_subframe_start_outfs; int16_t cur_subframe_start_cngfs; int16_t slot_size_cng; #endif while ( n_samples_out > 0 ) { n_samples_out_loop = min( hFdCngCom->frameSize, n_samples_out ); Loading Loading @@ -1940,6 +1950,28 @@ void generate_masking_noise_lb_dirac( n_samples_out -= hFdCngCom->frameSize; n_samples_start += hFdCngCom->frameSize; } #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING /* move generated noise to the 5ms subframe starts in the tc buffer according to the output sampling frequency to avoid overwriting it with the synthesis in case of shared tc and synth channel memory, i.e. non-TSM mode */ slot_size_cng = hFdCngCom->frameSize / DEFAULT_JBM_CLDFB_TIMESLOTS; /* move start indices forward to the end of the last subframe */ cur_subframe_start_outfs = nCldfbTs * hSpatParamRendCom->slot_size; cur_subframe_start_cngfs = nCldfbTs * slot_size_cng; /* go from the last subframe back and move the LB noise */ for ( cur_subframe = hSpatParamRendCom->nb_subframes - 1; cur_subframe >= 0; cur_subframe-- ) { int16_t move_size, subframe_size_outfs; move_size = slot_size_cng * hSpatParamRendCom->subframe_nbslots[cur_subframe]; subframe_size_outfs = hSpatParamRendCom->subframe_nbslots[cur_subframe] * hSpatParamRendCom->slot_size; cur_subframe_start_outfs -= hSpatParamRendCom->subframe_nbslots[cur_subframe] * hSpatParamRendCom->slot_size; cur_subframe_start_cngfs -= hSpatParamRendCom->subframe_nbslots[cur_subframe] * slot_size_cng; /* move cna */ mvr2r( tdBuffer + cur_subframe_start_cngfs, tdBuffer + cur_subframe_start_outfs, move_size ); /* set everything else to zero */ set_zero( tdBuffer + cur_subframe_start_outfs + move_size, subframe_size_outfs - move_size ); } #endif } pop_wmops(); Loading lib_dec/ivas_dirac_dec.c +8 −0 Original line number Diff line number Diff line Loading @@ -1952,10 +1952,18 @@ void ivas_dirac_dec_render_sf( generate_masking_noise_dirac( st->hFdCngDec->hFdCngCom, st_ivas->cldfbAnaDec[1], #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING &st_ivas->hTcBuffer->tc[1][hSpatParamRendCom->num_freq_bands * hSpatParamRendCom->slots_rendered], #else st_ivas->hTcBuffer->tc[1], #endif Cldfb_RealBuffer[1][0], Cldfb_ImagBuffer[1][0], #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING slot_idx, #else index_slot, #endif st->cna_dirac_flag && st->flag_cna, ( st->core_brate == FRAME_NO_DATA || st->core_brate == SID_2k40 ) && st->cng_type == FD_CNG && st->cng_sba_flag ); } Loading lib_dec/ivas_jbm_dec.c +0 −1 Original line number Diff line number Diff line Loading @@ -1403,7 +1403,6 @@ ivas_error ivas_jbm_dec_render( { int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; nchan_remapped = st_ivas->nchan_transport; if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); Loading Loading
lib_com/ivas_prot.h +3 −0 Original line number Diff line number Diff line Loading @@ -3719,6 +3719,9 @@ void generate_masking_noise_lb_dirac( HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables */ float *tdBuffer, /* i/o: time-domain signal, if NULL no LB-CNA */ const int16_t nCldfbTs, /* i : number of CLDFB slots that will be rendered */ #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i : common spatial rendering parameters handle */ #endif const int16_t cna_flag /* i : CNA flag for LB and HB */ ); Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,7 @@ #define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ #define NONBE_FIX_947_STEREO_DMX_EVS_PHA /* Orange: Fix issues on PHA */ #define NONBE_FIX_951_MCMASA_5MS_RENDERING /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2kbps to BINAURAL */ /* #################### End BASOP porting switches ############################ */ Loading
lib_dec/fd_cng_dec.c +33 −1 Original line number Diff line number Diff line Loading @@ -1805,6 +1805,9 @@ void generate_masking_noise_lb_dirac( HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables */ float *tdBuffer, /* i/o: time-domain signal, if NULL no LB-CNA */ const int16_t nCldfbTs, /* i : number of CLDFB slots that will be rendered */ #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i : common spatial rendering parameters handle */ #endif const int16_t cna_flag /* i : CNA flag for LB and HB */ ) { Loading Loading @@ -1857,6 +1860,13 @@ void generate_masking_noise_lb_dirac( /* LB CLDFB - CNA from STFT: CNA applied only in channel 0*/ if ( cna_flag && tdBuffer != NULL ) { #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING int16_t cur_subframe; int16_t cur_subframe_start_outfs; int16_t cur_subframe_start_cngfs; int16_t slot_size_cng; #endif while ( n_samples_out > 0 ) { n_samples_out_loop = min( hFdCngCom->frameSize, n_samples_out ); Loading Loading @@ -1940,6 +1950,28 @@ void generate_masking_noise_lb_dirac( n_samples_out -= hFdCngCom->frameSize; n_samples_start += hFdCngCom->frameSize; } #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING /* move generated noise to the 5ms subframe starts in the tc buffer according to the output sampling frequency to avoid overwriting it with the synthesis in case of shared tc and synth channel memory, i.e. non-TSM mode */ slot_size_cng = hFdCngCom->frameSize / DEFAULT_JBM_CLDFB_TIMESLOTS; /* move start indices forward to the end of the last subframe */ cur_subframe_start_outfs = nCldfbTs * hSpatParamRendCom->slot_size; cur_subframe_start_cngfs = nCldfbTs * slot_size_cng; /* go from the last subframe back and move the LB noise */ for ( cur_subframe = hSpatParamRendCom->nb_subframes - 1; cur_subframe >= 0; cur_subframe-- ) { int16_t move_size, subframe_size_outfs; move_size = slot_size_cng * hSpatParamRendCom->subframe_nbslots[cur_subframe]; subframe_size_outfs = hSpatParamRendCom->subframe_nbslots[cur_subframe] * hSpatParamRendCom->slot_size; cur_subframe_start_outfs -= hSpatParamRendCom->subframe_nbslots[cur_subframe] * hSpatParamRendCom->slot_size; cur_subframe_start_cngfs -= hSpatParamRendCom->subframe_nbslots[cur_subframe] * slot_size_cng; /* move cna */ mvr2r( tdBuffer + cur_subframe_start_cngfs, tdBuffer + cur_subframe_start_outfs, move_size ); /* set everything else to zero */ set_zero( tdBuffer + cur_subframe_start_outfs + move_size, subframe_size_outfs - move_size ); } #endif } pop_wmops(); Loading
lib_dec/ivas_dirac_dec.c +8 −0 Original line number Diff line number Diff line Loading @@ -1952,10 +1952,18 @@ void ivas_dirac_dec_render_sf( generate_masking_noise_dirac( st->hFdCngDec->hFdCngCom, st_ivas->cldfbAnaDec[1], #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING &st_ivas->hTcBuffer->tc[1][hSpatParamRendCom->num_freq_bands * hSpatParamRendCom->slots_rendered], #else st_ivas->hTcBuffer->tc[1], #endif Cldfb_RealBuffer[1][0], Cldfb_ImagBuffer[1][0], #ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING slot_idx, #else index_slot, #endif st->cna_dirac_flag && st->flag_cna, ( st->core_brate == FRAME_NO_DATA || st->core_brate == SID_2k40 ) && st->cng_type == FD_CNG && st->cng_sba_flag ); } Loading
lib_dec/ivas_jbm_dec.c +0 −1 Original line number Diff line number Diff line Loading @@ -1403,7 +1403,6 @@ ivas_error ivas_jbm_dec_render( { int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; nchan_remapped = st_ivas->nchan_transport; if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); Loading