Loading lib_com/ivas_prot.h +21 −0 Original line number Diff line number Diff line Loading @@ -5338,6 +5338,7 @@ void ivas_param_mc_mc2sba_cldfb( const float gain_lfe /* i : gain applied to LFE */ ); #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX void ivas_ism2sba( float *buffer_td[], /* i/o: TD signal buffers */ ISM_RENDERER_HANDLE hIsmRendererData, /* i/o: renderer data */ Loading @@ -5347,6 +5348,7 @@ void ivas_ism2sba( const int16_t sba_order /* i : SBA order */ ); #endif void ivas_ism2sba_sf( float *buffer_in[], /* i : TC buffer */ float *buffer_out[], /* o : TD signal buffers */ Loading Loading @@ -5720,11 +5722,13 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( float *output_f[] /* o : rendered time signal */ ); #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX ivas_error ivas_osba_dirac_td_binaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* o : output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ ); #endif ivas_error ivas_osba_ism_metadata_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Loading @@ -5733,11 +5737,21 @@ ivas_error ivas_osba_ism_metadata_dec( int16_t nb_bits_metadata[] /* o : number of ISM metadata bits */ ); #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX ivas_error ivas_osba_render_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ float *output_f[] /* o : rendered time signal */ ); #else ivas_error ivas_osba_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[], /* i/o: core-coder transport channels/object output */ const int16_t output_frame /* i : output frame length per channel */ ); #endif void ivas_osba_data_close( SBA_ISM_DATA_HANDLE *hSbaIsmData /* i/o: OSBA rendering handle */ Loading Loading @@ -5891,12 +5905,14 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( float *output_f[] /* o : rendered time signal */ ); #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX void ivas_omasa_dirac_rend( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* o : output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ ); #endif void ivas_omasa_rearrange_channels( float *output[], /* o : output synthesis signal */ const int16_t nchan_transport_ism, /* i : number of ISM TCs */ Loading Loading @@ -5928,6 +5944,7 @@ void ivas_omasa_separate_object_renderer_close( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX void ivas_omasa_separate_object_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float input_f[][L_FRAME48k], /* i : separated object signal */ Loading @@ -5935,9 +5952,13 @@ void ivas_omasa_separate_object_render( const int16_t output_frame /* i : output frame length per channel */ ); #endif void ivas_omasa_separate_object_render_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const uint16_t nSamplesRendered, /* i : number of samples rendered */ #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX float input_f[][L_FRAME48k], /* i : separated object signal */ #endif float *output_f[], /* o : rendered time signal */ const int16_t subframes_rendered, /* i : number of subframes rendered */ const int16_t slots_rendered /* i : number of CLDFB slots rendered */ Loading lib_dec/ivas_dirac_dec.c +31 −17 Original line number Diff line number Diff line Loading @@ -1691,6 +1691,9 @@ void ivas_dirac_dec_render( uint16_t slot_size, n_samples_sf, ch, nchan_intern; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; float *output_f_local[MAX_OUTPUT_CHANNELS]; #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; // VE2SB: TBV #endif hSpatParamRendCom = st_ivas->hSpatParamRendCom; Loading @@ -1700,7 +1703,11 @@ void ivas_dirac_dec_render( #endif for ( ch = 0; ch < nchan_intern; ch++ ) { #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX output_f_local[ch] = output_f_local_buff[ch]; #else output_f_local[ch] = output_f[ch]; #endif } slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); Loading Loading @@ -1734,6 +1741,13 @@ void ivas_dirac_dec_render( #endif } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX for ( ch = 0; ch < nchan_intern; ch++ ) { mvr2r( output_f_local_buff[ch], output_f[ch], *nSamplesRendered ); } #endif if ( hSpatParamRendCom->slots_rendered == hSpatParamRendCom->num_slots ) { if ( st_ivas->hDirAC->hConfig->dec_param_estim == 1 ) Loading @@ -1753,9 +1767,9 @@ void ivas_dirac_dec_render( /*------------------------------------------------------------------------- * ivas_dirac_dec() * ivas_dirac_dec_render_sf() * * DirAC decoding process * DirAC decoding renderer process *------------------------------------------------------------------------*/ void ivas_dirac_dec_render_sf( Loading lib_dec/ivas_init_dec.c +3 −0 Original line number Diff line number Diff line Loading @@ -2255,6 +2255,9 @@ ivas_error ivas_init_decoder( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for floating-point output audio buffer!\n" ) ); } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX set_zero( st_ivas->p_output_f[n], 48000 / FRAMES_PER_SEC ); #endif } #ifndef NONBE_UNIFIED_DECODING_PATHS } Loading lib_dec/ivas_ism_renderer.c +25 −4 Original line number Diff line number Diff line Loading @@ -254,6 +254,9 @@ void ivas_ism_render_sf( int16_t tc_offset; int16_t interp_offset; float gain, prev_gain; #ifdef NONBE_UNIFIED_DECODING_PATHS float tc_local[MAX_NUM_OBJECTS][L_FRAME48k]; #endif num_objects = st_ivas->nchan_transport; if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) Loading @@ -266,6 +269,12 @@ void ivas_ism_render_sf( tc_offset = st_ivas->hTcBuffer->n_samples_rendered; interp_offset = st_ivas->hTcBuffer->n_samples_rendered; #ifdef NONBE_UNIFIED_DECODING_PATHS for ( i = 0; i < num_objects; i++ ) { mvr2r( output_f[i], tc_local[i], n_samples_to_render ); } #endif for ( i = 0; i < nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; i++ ) { Loading Loading @@ -312,7 +321,11 @@ void ivas_ism_render_sf( if ( fabsf( gain ) > 0.0f || fabsf( prev_gain ) > 0.0f ) { g1 = &st_ivas->hIsmRendererData->interpolator[interp_offset]; #ifdef NONBE_UNIFIED_DECODING_PATHS tc = &tc_local[i][tc_offset]; #else tc = &st_ivas->hTcBuffer->tc[i][tc_offset]; #endif for ( k = 0; k < n_samples_to_render; k++ ) { g2 = 1.0f - *g1; Loading Loading @@ -487,7 +500,7 @@ void ivas_omasa_separate_object_renderer_close( return; } #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX /*-------------------------------------------------------------------------* * ivas_omasa_separate_object_render() * Loading Loading @@ -598,7 +611,7 @@ void ivas_omasa_separate_object_render( return; } #endif /*-------------------------------------------------------------------------* * ivas_omasa_separate_object_render_jbm() Loading @@ -609,6 +622,9 @@ void ivas_omasa_separate_object_render( void ivas_omasa_separate_object_render_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const uint16_t nSamplesRendered, /* i : number of samples rendered */ #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX float input_f[][L_FRAME48k], /* i : separated object signal */ #endif float *output_f[], /* o : rendered time signal */ const int16_t subframes_rendered, /* i : number of subframes rendered */ const int16_t slots_rendered /* i : number of CLDFB slots rendered */ Loading @@ -627,7 +643,9 @@ void ivas_omasa_separate_object_render_jbm( int16_t azimuth, elevation; int16_t num_objects; uint8_t single_separated; #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX float *input_f[MAX_TRANSPORT_CHANNELS]; #endif float *output_f_local[MAX_OUTPUT_CHANNELS]; int16_t offsetSamples; int16_t n_samples_sf, md_idx; Loading Loading @@ -658,10 +676,13 @@ void ivas_omasa_separate_object_render_jbm( { output_f_local[j] = output_f[j]; } #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX for ( obj = 0; obj < num_objects; obj++ ) { input_f[obj] = &st_ivas->hTcBuffer->tc[obj + 2][offsetSamples]; } #endif slots_to_render = nSamplesRendered / hSpatParamRendCom->slot_size; first_sf = subframes_rendered; last_sf = first_sf; Loading lib_dec/ivas_jbm_dec.c +116 −38 Original line number Diff line number Diff line Loading @@ -101,11 +101,25 @@ ivas_error ivas_jbm_dec_tc( { #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX p_output[n] = st_ivas->p_output_f[n]; if ( p_output[n] != NULL ) { set_zero( p_output[n], L_FRAME48k ); } #else p_output[n] = output_f[n]; #endif } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( !st_ivas->hDecoderConfig->Opt_tsm ) { for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ ) { st_ivas->hTcBuffer->tc[n] = st_ivas->p_output_f[n]; } } #endif /*----------------------------------------------------------------* * Decoding + pre-rendering *----------------------------------------------------------------*/ Loading Loading @@ -977,10 +991,29 @@ ivas_error ivas_jbm_dec_render( #endif } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( !st_ivas->hDecoderConfig->Opt_tsm ) { for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) { p_tc[n] = p_output[n]; } for ( n = 0; n < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; n++ ) { st_ivas->hTcBuffer->tc[n] = p_output[n]; } } else { #endif for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) { p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX } #endif #ifndef NONBE_UNIFIED_DECODING_PATHS /*----------------------------------------------------------------* Loading Loading @@ -1144,7 +1177,7 @@ ivas_error ivas_jbm_dec_render( ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); } } else /* SBA_MODE_SPAR */ else { if ( ( error = ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1204,6 +1237,12 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { #ifdef NONBE_UNIFIED_DECODING_PATHS if ( ( error = ivas_osba_render_sf( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) { return error; } #else float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *p_output_ism[MAX_OUTPUT_CHANNELS]; Loading @@ -1229,6 +1268,7 @@ ivas_error ivas_jbm_dec_render( } v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); } #endif } else if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ { Loading @@ -1254,7 +1294,7 @@ ivas_error ivas_jbm_dec_render( { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); } else /* SBA_MODE_SPAR */ else { if ( ( error = ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2419,6 +2459,10 @@ ivas_error ivas_jbm_dec_tc_buffer_open( } else { #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif if ( ( hTcBuffer->tc_buffer = (float *) malloc( nsamp_to_allocate * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JBM TC Buffer\n" ) ); Loading @@ -2440,6 +2484,13 @@ ivas_error ivas_jbm_dec_tc_buffer_open( { hTcBuffer->tc[ch_idx] = NULL; } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX } else { hTcBuffer->tc_buffer = NULL; } #endif } } Loading Loading @@ -2550,6 +2601,10 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } else { #endif #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif if ( ( hTcBuffer->tc_buffer = (float *) malloc( nsamp_to_allocate * sizeof( float ) ) ) == NULL ) { Loading @@ -2572,6 +2627,13 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( { hTcBuffer->tc[ch_idx] = NULL; } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX } else { hTcBuffer->tc_buffer = NULL; } #endif #ifdef NONBE_UNIFIED_DECODING_PATHS } #endif Loading Loading @@ -2603,6 +2665,13 @@ static void ivas_jbm_dec_tc_buffer_playout( first_sf = st_ivas->hTcBuffer->subframes_rendered; last_sf = first_sf; #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( !st_ivas->hDecoderConfig->Opt_tsm ) { return; } #endif while ( slots_to_render > 0 ) { slots_to_render -= st_ivas->hTcBuffer->subframe_nbslots[last_sf]; Loading Loading @@ -2817,10 +2886,19 @@ void ivas_jbm_dec_copy_tc_no_tsm( n_ch_cldfb = hTcBuffer->nchan_transport_jbm - hTcBuffer->nchan_buffer_full; /* copy full tcs*/ #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif for ( ch_idx = 0; ch_idx < n_ch_full_copy; ch_idx++ ) { mvr2r( tc[ch_idx], st_ivas->hTcBuffer->tc[ch_idx], hTcBuffer->n_samples_buffered ); } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX } ch_idx = 0; #endif /* CLDFB ana for ParamMC/ParamISM */ if ( n_ch_cldfb > 0 ) { Loading Loading
lib_com/ivas_prot.h +21 −0 Original line number Diff line number Diff line Loading @@ -5338,6 +5338,7 @@ void ivas_param_mc_mc2sba_cldfb( const float gain_lfe /* i : gain applied to LFE */ ); #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX void ivas_ism2sba( float *buffer_td[], /* i/o: TD signal buffers */ ISM_RENDERER_HANDLE hIsmRendererData, /* i/o: renderer data */ Loading @@ -5347,6 +5348,7 @@ void ivas_ism2sba( const int16_t sba_order /* i : SBA order */ ); #endif void ivas_ism2sba_sf( float *buffer_in[], /* i : TC buffer */ float *buffer_out[], /* o : TD signal buffers */ Loading Loading @@ -5720,11 +5722,13 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( float *output_f[] /* o : rendered time signal */ ); #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX ivas_error ivas_osba_dirac_td_binaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* o : output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ ); #endif ivas_error ivas_osba_ism_metadata_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Loading @@ -5733,11 +5737,21 @@ ivas_error ivas_osba_ism_metadata_dec( int16_t nb_bits_metadata[] /* o : number of ISM metadata bits */ ); #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX ivas_error ivas_osba_render_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ float *output_f[] /* o : rendered time signal */ ); #else ivas_error ivas_osba_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[], /* i/o: core-coder transport channels/object output */ const int16_t output_frame /* i : output frame length per channel */ ); #endif void ivas_osba_data_close( SBA_ISM_DATA_HANDLE *hSbaIsmData /* i/o: OSBA rendering handle */ Loading Loading @@ -5891,12 +5905,14 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( float *output_f[] /* o : rendered time signal */ ); #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX void ivas_omasa_dirac_rend( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* o : output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ ); #endif void ivas_omasa_rearrange_channels( float *output[], /* o : output synthesis signal */ const int16_t nchan_transport_ism, /* i : number of ISM TCs */ Loading Loading @@ -5928,6 +5944,7 @@ void ivas_omasa_separate_object_renderer_close( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX void ivas_omasa_separate_object_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float input_f[][L_FRAME48k], /* i : separated object signal */ Loading @@ -5935,9 +5952,13 @@ void ivas_omasa_separate_object_render( const int16_t output_frame /* i : output frame length per channel */ ); #endif void ivas_omasa_separate_object_render_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const uint16_t nSamplesRendered, /* i : number of samples rendered */ #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX float input_f[][L_FRAME48k], /* i : separated object signal */ #endif float *output_f[], /* o : rendered time signal */ const int16_t subframes_rendered, /* i : number of subframes rendered */ const int16_t slots_rendered /* i : number of CLDFB slots rendered */ Loading
lib_dec/ivas_dirac_dec.c +31 −17 Original line number Diff line number Diff line Loading @@ -1691,6 +1691,9 @@ void ivas_dirac_dec_render( uint16_t slot_size, n_samples_sf, ch, nchan_intern; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; float *output_f_local[MAX_OUTPUT_CHANNELS]; #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; // VE2SB: TBV #endif hSpatParamRendCom = st_ivas->hSpatParamRendCom; Loading @@ -1700,7 +1703,11 @@ void ivas_dirac_dec_render( #endif for ( ch = 0; ch < nchan_intern; ch++ ) { #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX output_f_local[ch] = output_f_local_buff[ch]; #else output_f_local[ch] = output_f[ch]; #endif } slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); Loading Loading @@ -1734,6 +1741,13 @@ void ivas_dirac_dec_render( #endif } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX for ( ch = 0; ch < nchan_intern; ch++ ) { mvr2r( output_f_local_buff[ch], output_f[ch], *nSamplesRendered ); } #endif if ( hSpatParamRendCom->slots_rendered == hSpatParamRendCom->num_slots ) { if ( st_ivas->hDirAC->hConfig->dec_param_estim == 1 ) Loading @@ -1753,9 +1767,9 @@ void ivas_dirac_dec_render( /*------------------------------------------------------------------------- * ivas_dirac_dec() * ivas_dirac_dec_render_sf() * * DirAC decoding process * DirAC decoding renderer process *------------------------------------------------------------------------*/ void ivas_dirac_dec_render_sf( Loading
lib_dec/ivas_init_dec.c +3 −0 Original line number Diff line number Diff line Loading @@ -2255,6 +2255,9 @@ ivas_error ivas_init_decoder( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for floating-point output audio buffer!\n" ) ); } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX set_zero( st_ivas->p_output_f[n], 48000 / FRAMES_PER_SEC ); #endif } #ifndef NONBE_UNIFIED_DECODING_PATHS } Loading
lib_dec/ivas_ism_renderer.c +25 −4 Original line number Diff line number Diff line Loading @@ -254,6 +254,9 @@ void ivas_ism_render_sf( int16_t tc_offset; int16_t interp_offset; float gain, prev_gain; #ifdef NONBE_UNIFIED_DECODING_PATHS float tc_local[MAX_NUM_OBJECTS][L_FRAME48k]; #endif num_objects = st_ivas->nchan_transport; if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) Loading @@ -266,6 +269,12 @@ void ivas_ism_render_sf( tc_offset = st_ivas->hTcBuffer->n_samples_rendered; interp_offset = st_ivas->hTcBuffer->n_samples_rendered; #ifdef NONBE_UNIFIED_DECODING_PATHS for ( i = 0; i < num_objects; i++ ) { mvr2r( output_f[i], tc_local[i], n_samples_to_render ); } #endif for ( i = 0; i < nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; i++ ) { Loading Loading @@ -312,7 +321,11 @@ void ivas_ism_render_sf( if ( fabsf( gain ) > 0.0f || fabsf( prev_gain ) > 0.0f ) { g1 = &st_ivas->hIsmRendererData->interpolator[interp_offset]; #ifdef NONBE_UNIFIED_DECODING_PATHS tc = &tc_local[i][tc_offset]; #else tc = &st_ivas->hTcBuffer->tc[i][tc_offset]; #endif for ( k = 0; k < n_samples_to_render; k++ ) { g2 = 1.0f - *g1; Loading Loading @@ -487,7 +500,7 @@ void ivas_omasa_separate_object_renderer_close( return; } #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX /*-------------------------------------------------------------------------* * ivas_omasa_separate_object_render() * Loading Loading @@ -598,7 +611,7 @@ void ivas_omasa_separate_object_render( return; } #endif /*-------------------------------------------------------------------------* * ivas_omasa_separate_object_render_jbm() Loading @@ -609,6 +622,9 @@ void ivas_omasa_separate_object_render( void ivas_omasa_separate_object_render_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const uint16_t nSamplesRendered, /* i : number of samples rendered */ #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX float input_f[][L_FRAME48k], /* i : separated object signal */ #endif float *output_f[], /* o : rendered time signal */ const int16_t subframes_rendered, /* i : number of subframes rendered */ const int16_t slots_rendered /* i : number of CLDFB slots rendered */ Loading @@ -627,7 +643,9 @@ void ivas_omasa_separate_object_render_jbm( int16_t azimuth, elevation; int16_t num_objects; uint8_t single_separated; #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX float *input_f[MAX_TRANSPORT_CHANNELS]; #endif float *output_f_local[MAX_OUTPUT_CHANNELS]; int16_t offsetSamples; int16_t n_samples_sf, md_idx; Loading Loading @@ -658,10 +676,13 @@ void ivas_omasa_separate_object_render_jbm( { output_f_local[j] = output_f[j]; } #ifndef NONBE_UNIFIED_DECODING_PATHS_FIX for ( obj = 0; obj < num_objects; obj++ ) { input_f[obj] = &st_ivas->hTcBuffer->tc[obj + 2][offsetSamples]; } #endif slots_to_render = nSamplesRendered / hSpatParamRendCom->slot_size; first_sf = subframes_rendered; last_sf = first_sf; Loading
lib_dec/ivas_jbm_dec.c +116 −38 Original line number Diff line number Diff line Loading @@ -101,11 +101,25 @@ ivas_error ivas_jbm_dec_tc( { #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX p_output[n] = st_ivas->p_output_f[n]; if ( p_output[n] != NULL ) { set_zero( p_output[n], L_FRAME48k ); } #else p_output[n] = output_f[n]; #endif } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( !st_ivas->hDecoderConfig->Opt_tsm ) { for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ ) { st_ivas->hTcBuffer->tc[n] = st_ivas->p_output_f[n]; } } #endif /*----------------------------------------------------------------* * Decoding + pre-rendering *----------------------------------------------------------------*/ Loading Loading @@ -977,10 +991,29 @@ ivas_error ivas_jbm_dec_render( #endif } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( !st_ivas->hDecoderConfig->Opt_tsm ) { for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) { p_tc[n] = p_output[n]; } for ( n = 0; n < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; n++ ) { st_ivas->hTcBuffer->tc[n] = p_output[n]; } } else { #endif for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) { p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX } #endif #ifndef NONBE_UNIFIED_DECODING_PATHS /*----------------------------------------------------------------* Loading Loading @@ -1144,7 +1177,7 @@ ivas_error ivas_jbm_dec_render( ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); } } else /* SBA_MODE_SPAR */ else { if ( ( error = ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1204,6 +1237,12 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { #ifdef NONBE_UNIFIED_DECODING_PATHS if ( ( error = ivas_osba_render_sf( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) { return error; } #else float output_ism[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *p_output_ism[MAX_OUTPUT_CHANNELS]; Loading @@ -1229,6 +1268,7 @@ ivas_error ivas_jbm_dec_render( } v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered ); } #endif } else if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ { Loading @@ -1254,7 +1294,7 @@ ivas_error ivas_jbm_dec_render( { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); } else /* SBA_MODE_SPAR */ else { if ( ( error = ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2419,6 +2459,10 @@ ivas_error ivas_jbm_dec_tc_buffer_open( } else { #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif if ( ( hTcBuffer->tc_buffer = (float *) malloc( nsamp_to_allocate * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JBM TC Buffer\n" ) ); Loading @@ -2440,6 +2484,13 @@ ivas_error ivas_jbm_dec_tc_buffer_open( { hTcBuffer->tc[ch_idx] = NULL; } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX } else { hTcBuffer->tc_buffer = NULL; } #endif } } Loading Loading @@ -2550,6 +2601,10 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } else { #endif #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif if ( ( hTcBuffer->tc_buffer = (float *) malloc( nsamp_to_allocate * sizeof( float ) ) ) == NULL ) { Loading @@ -2572,6 +2627,13 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( { hTcBuffer->tc[ch_idx] = NULL; } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX } else { hTcBuffer->tc_buffer = NULL; } #endif #ifdef NONBE_UNIFIED_DECODING_PATHS } #endif Loading Loading @@ -2603,6 +2665,13 @@ static void ivas_jbm_dec_tc_buffer_playout( first_sf = st_ivas->hTcBuffer->subframes_rendered; last_sf = first_sf; #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( !st_ivas->hDecoderConfig->Opt_tsm ) { return; } #endif while ( slots_to_render > 0 ) { slots_to_render -= st_ivas->hTcBuffer->subframe_nbslots[last_sf]; Loading Loading @@ -2817,10 +2886,19 @@ void ivas_jbm_dec_copy_tc_no_tsm( n_ch_cldfb = hTcBuffer->nchan_transport_jbm - hTcBuffer->nchan_buffer_full; /* copy full tcs*/ #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif for ( ch_idx = 0; ch_idx < n_ch_full_copy; ch_idx++ ) { mvr2r( tc[ch_idx], st_ivas->hTcBuffer->tc[ch_idx], hTcBuffer->n_samples_buffered ); } #ifdef NONBE_UNIFIED_DECODING_PATHS_FIX } ch_idx = 0; #endif /* CLDFB ana for ParamMC/ParamISM */ if ( n_ch_cldfb > 0 ) { Loading