Loading lib_com/ivas_prot.h +11 −0 Original line number Diff line number Diff line Loading @@ -5617,6 +5617,17 @@ ivas_error ivas_osba_render_sf( float *output_f[] /* o : rendered time signal */ ); #ifdef NONBE_1894_OSBA_SCALING void ivas_osba_stereo_add_channels( float *tc_f[], /* i : transport channels */ float *output_f[], /* i/o: output channels */ const float gain, /* i : gain bed value */ const int16_t nchan_out, /* i : number of output channels */ const int16_t nchan_ism, /* i : number of ISM channels */ const int16_t n_samples_to_render /* i : output frame length per channel */ ); #endif void ivas_osba_data_close( SBA_ISM_DATA_HANDLE *hSbaIsmData /* i/o: OSBA rendering handle */ ); Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,8 @@ #define NONBE_FIX_1052_SBA_EXT_FIX /* VA: SBA external output support fix - do not overwrite "output_config" parameter */ #define FIX_1113_CLDFB_REND_IN_ISAR /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */ #define NONBE_1894_OSBA_SCALING /* FhG: port OSBA scaling MRs (298,355,360) jointly */ /* #################### End BASOP porting switches ############################ */ /* clang-format on */ Loading lib_dec/ivas_jbm_dec.c +16 −0 Original line number Diff line number Diff line Loading @@ -1238,10 +1238,14 @@ ivas_error ivas_jbm_dec_render( ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output, *nSamplesRendered ); /* add already rendered SBA part */ #ifdef NONBE_1894_OSBA_SCALING ivas_osba_stereo_add_channels( p_tc, p_output, 1.0f, nchan_out, st_ivas->nchan_ism, *nSamplesRendered ); #else for ( n = 0; n < nchan_out; n++ ) { v_add( p_output[n], p_tc[n + st_ivas->nchan_ism], p_output[n], *nSamplesRendered ); } #endif } else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { Loading Loading @@ -1273,6 +1277,12 @@ ivas_error ivas_jbm_dec_render( else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); #ifdef NONBE_1894_OSBA_SCALING for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) { v_multc( p_output[n], 2.0f, p_output[n], *nSamplesRendered ); } #endif } else { Loading @@ -1295,6 +1305,12 @@ ivas_error ivas_jbm_dec_render( set_zero( p_output[n], *nSamplesRendered ); } } #ifdef NONBE_1894_OSBA_SCALING for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) { v_multc( p_output[n], 2.0f, p_output[n], *nSamplesRendered ); } #endif } } else if ( st_ivas->ivas_format == MC_FORMAT ) Loading lib_dec/ivas_osba_dec.c +62 −1 Original line number Diff line number Diff line Loading @@ -184,12 +184,20 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( for ( b = 0; b < num_cldfb_bands; b++ ) { st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] = #ifndef NONBE_1894_OSBA_SCALING ( 0.5f * st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] ) + ( 0.5f * Cldfb_RealBuffer[b] ); #else st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] + Cldfb_RealBuffer[b]; #endif st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] = #ifndef NONBE_1894_OSBA_SCALING ( 0.5f * st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] ) + ( 0.5f * Cldfb_ImagBuffer[b] ); #else st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] + Cldfb_ImagBuffer[b]; #endif } } } Loading @@ -206,7 +214,11 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( int16_t i; for ( i = 0; i < nSamplesAsked; i++ ) { #ifndef NONBE_1894_OSBA_SCALING output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i]; #else output_f[n][i] = output_f[channel_offset + n][i] + p_sepobj[n][i]; #endif } } } Loading Loading @@ -296,9 +308,58 @@ ivas_error ivas_osba_render_sf( { v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); } #ifndef NONBE_1894_OSBA_SCALING v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); #endif } return IVAS_ERR_OK; } #ifdef NONBE_1894_OSBA_SCALING /*-------------------------------------------------------------------------* * ivas_osba_stereo_add_channels() * * *-------------------------------------------------------------------------*/ void ivas_osba_stereo_add_channels( float *tc_f[], /* i : transport channels */ float *output_f[], /* i/o: output channels */ const float gain, /* i : gain bed value */ const int16_t nchan_out, /* i : number of output channels */ const int16_t nchan_ism, /* i : number of ISM channels */ const int16_t n_samples_to_render /* i : output frame length per channel */ ) { int16_t n; #if 0 if ( ism_mode == ISM_SBA_MODE_DISC ) { #endif if ( gain != 1.0f ) { assert( 0 && "Object editing is not implemented in this branch!" ); } else { for ( n = 0; n < nchan_out; n++ ) { v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render ); } } #if 0 } else { for ( n = 0; n < nchan_out; n++ ) { v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render ); } } #endif return; } #endif Loading
lib_com/ivas_prot.h +11 −0 Original line number Diff line number Diff line Loading @@ -5617,6 +5617,17 @@ ivas_error ivas_osba_render_sf( float *output_f[] /* o : rendered time signal */ ); #ifdef NONBE_1894_OSBA_SCALING void ivas_osba_stereo_add_channels( float *tc_f[], /* i : transport channels */ float *output_f[], /* i/o: output channels */ const float gain, /* i : gain bed value */ const int16_t nchan_out, /* i : number of output channels */ const int16_t nchan_ism, /* i : number of ISM channels */ const int16_t n_samples_to_render /* i : output frame length per channel */ ); #endif void ivas_osba_data_close( SBA_ISM_DATA_HANDLE *hSbaIsmData /* i/o: OSBA rendering handle */ ); Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,8 @@ #define NONBE_FIX_1052_SBA_EXT_FIX /* VA: SBA external output support fix - do not overwrite "output_config" parameter */ #define FIX_1113_CLDFB_REND_IN_ISAR /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */ #define NONBE_1894_OSBA_SCALING /* FhG: port OSBA scaling MRs (298,355,360) jointly */ /* #################### End BASOP porting switches ############################ */ /* clang-format on */ Loading
lib_dec/ivas_jbm_dec.c +16 −0 Original line number Diff line number Diff line Loading @@ -1238,10 +1238,14 @@ ivas_error ivas_jbm_dec_render( ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output, *nSamplesRendered ); /* add already rendered SBA part */ #ifdef NONBE_1894_OSBA_SCALING ivas_osba_stereo_add_channels( p_tc, p_output, 1.0f, nchan_out, st_ivas->nchan_ism, *nSamplesRendered ); #else for ( n = 0; n < nchan_out; n++ ) { v_add( p_output[n], p_tc[n + st_ivas->nchan_ism], p_output[n], *nSamplesRendered ); } #endif } else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { Loading Loading @@ -1273,6 +1277,12 @@ ivas_error ivas_jbm_dec_render( else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); #ifdef NONBE_1894_OSBA_SCALING for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) { v_multc( p_output[n], 2.0f, p_output[n], *nSamplesRendered ); } #endif } else { Loading @@ -1295,6 +1305,12 @@ ivas_error ivas_jbm_dec_render( set_zero( p_output[n], *nSamplesRendered ); } } #ifdef NONBE_1894_OSBA_SCALING for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) { v_multc( p_output[n], 2.0f, p_output[n], *nSamplesRendered ); } #endif } } else if ( st_ivas->ivas_format == MC_FORMAT ) Loading
lib_dec/ivas_osba_dec.c +62 −1 Original line number Diff line number Diff line Loading @@ -184,12 +184,20 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( for ( b = 0; b < num_cldfb_bands; b++ ) { st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] = #ifndef NONBE_1894_OSBA_SCALING ( 0.5f * st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] ) + ( 0.5f * Cldfb_RealBuffer[b] ); #else st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] + Cldfb_RealBuffer[b]; #endif st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] = #ifndef NONBE_1894_OSBA_SCALING ( 0.5f * st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] ) + ( 0.5f * Cldfb_ImagBuffer[b] ); #else st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] + Cldfb_ImagBuffer[b]; #endif } } } Loading @@ -206,7 +214,11 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( int16_t i; for ( i = 0; i < nSamplesAsked; i++ ) { #ifndef NONBE_1894_OSBA_SCALING output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i]; #else output_f[n][i] = output_f[channel_offset + n][i] + p_sepobj[n][i]; #endif } } } Loading Loading @@ -296,9 +308,58 @@ ivas_error ivas_osba_render_sf( { v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered ); } #ifndef NONBE_1894_OSBA_SCALING v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); #endif } return IVAS_ERR_OK; } #ifdef NONBE_1894_OSBA_SCALING /*-------------------------------------------------------------------------* * ivas_osba_stereo_add_channels() * * *-------------------------------------------------------------------------*/ void ivas_osba_stereo_add_channels( float *tc_f[], /* i : transport channels */ float *output_f[], /* i/o: output channels */ const float gain, /* i : gain bed value */ const int16_t nchan_out, /* i : number of output channels */ const int16_t nchan_ism, /* i : number of ISM channels */ const int16_t n_samples_to_render /* i : output frame length per channel */ ) { int16_t n; #if 0 if ( ism_mode == ISM_SBA_MODE_DISC ) { #endif if ( gain != 1.0f ) { assert( 0 && "Object editing is not implemented in this branch!" ); } else { for ( n = 0; n < nchan_out; n++ ) { v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render ); } } #if 0 } else { for ( n = 0; n < nchan_out; n++ ) { v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render ); } } #endif return; } #endif