Loading lib_com/ivas_prot.h +10 −0 Original line number Diff line number Diff line Loading @@ -319,8 +319,14 @@ ivas_error ivas_init_decoder( ivas_error ivas_output_buff_dec( float *p_output_f[], /* i/o: output audio buffers */ #ifdef FIX_1330_JBM_MEMORY const int16_t nchan_out_buff, /* i : number of output channels */ const int16_t Opt_tsm, /* i : TSM option flag */ DECODER_TC_BUFFER_HANDLE hTcBuffer /* i : TSM buffer handle */ #else const int16_t nchan_out_buff_old, /* i : previous frame number of output channels*/ const int16_t nchan_out_buff /* i : number of output channels */ #endif ); /*! r: flag to indicate if split rendering is enabled */ Loading Loading @@ -5868,8 +5874,12 @@ void ivas_omasa_separate_object_render_jbm( const uint16_t nSamplesRendered, /* i : number of samples rendered */ float input_f[][L_FRAME48k], /* i : separated object signal */ float *output_f[], /* o : rendered time signal */ #ifdef FIX_1330_JBM_MEMORY const int16_t subframes_rendered /* i : number of subframes rendered */ #else const int16_t subframes_rendered, /* i : number of subframes rendered */ const int16_t slots_rendered /* i : number of CLDFB slots rendered */ #endif ); void ivas_omasa_encode_masa_to_total( Loading lib_com/ivas_tools.c +12 −0 Original line number Diff line number Diff line Loading @@ -199,12 +199,24 @@ void ivas_buffer_deinterleaved_to_interleaved( ) { int16_t ch, m; #ifdef FIX_1330_JBM_MEMORY float buffer[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; /* temp buffer needed when "*audio[]" and "*audio_out[]" are the same */ for ( ch = 0; ch < n_channels; ch++ ) { mvr2r( audio[ch], buffer[ch], frame_length ); } #endif for ( ch = 0; ch < n_channels; ch++ ) { for ( m = 0; m < frame_length; m++ ) { #ifdef FIX_1330_JBM_MEMORY audio_out[m * n_channels + ch] = buffer[ch][m]; #else audio_out[m * n_channels + ch] = audio[ch][m]; #endif } } Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ #define FIX_1370_EXTERNAL_ORIENTATION_CHECK /* Nokia: add sanity check for Euler angles for external orientations */ #define NONBE_FIX_1197_OMASA_META_BUFFER /* Nokia: OMASA ISM_MASA_MODE_PARAM_ONE_OBJ history zero in rateswitching - port 251 */ #define FIX_1413_IGF_INIT_PRINTOUT /* FhG: use correct variable for IGF initiliazation */ #define FIX_1330_JBM_MEMORY /* VA: issue 1330: memory savings in the JBM decoder */ // object-editing feature porting #define FIX_HRTF_LOAD_API // solves API conflicts between HRTF and object-editing features Loading lib_dec/ivas_init_dec.c +17 −3 Original line number Diff line number Diff line Loading @@ -1258,6 +1258,9 @@ ivas_error ivas_init_decoder( int16_t sce_id, cpe_id; int16_t numCldfbAnalyses, numCldfbSyntheses; int16_t granularity, n_channels_transport_jbm; #ifdef FIX_1330_JBM_MEMORY int16_t nchan_out_buff; #endif int32_t output_Fs, ivas_total_brate; int32_t delay_ns; AUDIO_CONFIG output_config; Loading Loading @@ -2413,7 +2416,7 @@ ivas_error ivas_init_decoder( } } if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->Opt_tsm ) if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && hDecoderConfig->Opt_tsm ) { if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { Loading @@ -2428,6 +2431,13 @@ ivas_error ivas_init_decoder( * Allocate floating-point output audio buffers *-----------------------------------------------------------------*/ #ifdef FIX_1330_JBM_MEMORY nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, ivas_total_brate ); if ( ( error = ivas_output_buff_dec( st_ivas->p_output_f, nchan_out_buff, hDecoderConfig->Opt_tsm, st_ivas->hTcBuffer ) ) != IVAS_ERR_OK ) { return error; } #else #ifdef FIX_NCHAN_BUFFERS k = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); for ( n = 0; n < k; n++ ) Loading @@ -2446,7 +2456,7 @@ ivas_error ivas_init_decoder( { st_ivas->p_output_f[n] = NULL; } #endif return error; } Loading Loading @@ -2919,11 +2929,15 @@ void ivas_destroy_dec( /* floating-point output audio buffers */ for ( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ ) { #ifdef FIX_1330_JBM_MEMORY st_ivas->p_output_f[i] = NULL; #else if ( st_ivas->p_output_f[i] != NULL ) { free( st_ivas->p_output_f[i] ); st_ivas->p_output_f[i] = NULL; } #endif } /* main IVAS handle */ Loading lib_dec/ivas_ism_dec.c +20 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,11 @@ static ivas_error ivas_ism_bitrate_switching_dec( int16_t tc_nchan_tc_new; int16_t tc_nchan_allocate_new; int16_t tc_granularity_new; #ifdef FIX_1330_JBM_MEMORY int16_t nchan_out_buff; #else int16_t nchan_out_buff, nchan_out_buff_old; #endif nCPE_old = st_ivas->nCPE; nSCE_old = st_ivas->nSCE; Loading @@ -70,7 +74,9 @@ static ivas_error ivas_ism_bitrate_switching_dec( st_ivas->ism_mode = last_ism_mode; ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); st_ivas->ism_mode = ism_mode; #ifndef FIX_1330_JBM_MEMORY nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas, -1, -1 ); #endif if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL, 0 ) ) != IVAS_ERR_OK ) { Loading Loading @@ -288,6 +294,7 @@ static ivas_error ivas_ism_bitrate_switching_dec( return error; } #ifndef FIX_1330_JBM_MEMORY /*-----------------------------------------------------------------* * floating-point output audio buffers *-----------------------------------------------------------------*/ Loading @@ -298,7 +305,7 @@ static ivas_error ivas_ism_bitrate_switching_dec( { return error; } #endif /*-----------------------------------------------------------------* * JBM TC buffers *-----------------------------------------------------------------*/ Loading Loading @@ -338,6 +345,18 @@ static ivas_error ivas_ism_bitrate_switching_dec( mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } #ifdef FIX_1330_JBM_MEMORY /*-----------------------------------------------------------------* * floating-point output audio buffers *-----------------------------------------------------------------*/ nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, -1, -1 ); if ( ( error = ivas_output_buff_dec( st_ivas->p_output_f, nchan_out_buff, st_ivas->hDecoderConfig->Opt_tsm, st_ivas->hTcBuffer ) ) != IVAS_ERR_OK ) { return error; } #endif return IVAS_ERR_OK; } Loading Loading
lib_com/ivas_prot.h +10 −0 Original line number Diff line number Diff line Loading @@ -319,8 +319,14 @@ ivas_error ivas_init_decoder( ivas_error ivas_output_buff_dec( float *p_output_f[], /* i/o: output audio buffers */ #ifdef FIX_1330_JBM_MEMORY const int16_t nchan_out_buff, /* i : number of output channels */ const int16_t Opt_tsm, /* i : TSM option flag */ DECODER_TC_BUFFER_HANDLE hTcBuffer /* i : TSM buffer handle */ #else const int16_t nchan_out_buff_old, /* i : previous frame number of output channels*/ const int16_t nchan_out_buff /* i : number of output channels */ #endif ); /*! r: flag to indicate if split rendering is enabled */ Loading Loading @@ -5868,8 +5874,12 @@ void ivas_omasa_separate_object_render_jbm( const uint16_t nSamplesRendered, /* i : number of samples rendered */ float input_f[][L_FRAME48k], /* i : separated object signal */ float *output_f[], /* o : rendered time signal */ #ifdef FIX_1330_JBM_MEMORY const int16_t subframes_rendered /* i : number of subframes rendered */ #else const int16_t subframes_rendered, /* i : number of subframes rendered */ const int16_t slots_rendered /* i : number of CLDFB slots rendered */ #endif ); void ivas_omasa_encode_masa_to_total( Loading
lib_com/ivas_tools.c +12 −0 Original line number Diff line number Diff line Loading @@ -199,12 +199,24 @@ void ivas_buffer_deinterleaved_to_interleaved( ) { int16_t ch, m; #ifdef FIX_1330_JBM_MEMORY float buffer[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; /* temp buffer needed when "*audio[]" and "*audio_out[]" are the same */ for ( ch = 0; ch < n_channels; ch++ ) { mvr2r( audio[ch], buffer[ch], frame_length ); } #endif for ( ch = 0; ch < n_channels; ch++ ) { for ( m = 0; m < frame_length; m++ ) { #ifdef FIX_1330_JBM_MEMORY audio_out[m * n_channels + ch] = buffer[ch][m]; #else audio_out[m * n_channels + ch] = audio[ch][m]; #endif } } Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ #define FIX_1370_EXTERNAL_ORIENTATION_CHECK /* Nokia: add sanity check for Euler angles for external orientations */ #define NONBE_FIX_1197_OMASA_META_BUFFER /* Nokia: OMASA ISM_MASA_MODE_PARAM_ONE_OBJ history zero in rateswitching - port 251 */ #define FIX_1413_IGF_INIT_PRINTOUT /* FhG: use correct variable for IGF initiliazation */ #define FIX_1330_JBM_MEMORY /* VA: issue 1330: memory savings in the JBM decoder */ // object-editing feature porting #define FIX_HRTF_LOAD_API // solves API conflicts between HRTF and object-editing features Loading
lib_dec/ivas_init_dec.c +17 −3 Original line number Diff line number Diff line Loading @@ -1258,6 +1258,9 @@ ivas_error ivas_init_decoder( int16_t sce_id, cpe_id; int16_t numCldfbAnalyses, numCldfbSyntheses; int16_t granularity, n_channels_transport_jbm; #ifdef FIX_1330_JBM_MEMORY int16_t nchan_out_buff; #endif int32_t output_Fs, ivas_total_brate; int32_t delay_ns; AUDIO_CONFIG output_config; Loading Loading @@ -2413,7 +2416,7 @@ ivas_error ivas_init_decoder( } } if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->Opt_tsm ) if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && hDecoderConfig->Opt_tsm ) { if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { Loading @@ -2428,6 +2431,13 @@ ivas_error ivas_init_decoder( * Allocate floating-point output audio buffers *-----------------------------------------------------------------*/ #ifdef FIX_1330_JBM_MEMORY nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, ivas_total_brate ); if ( ( error = ivas_output_buff_dec( st_ivas->p_output_f, nchan_out_buff, hDecoderConfig->Opt_tsm, st_ivas->hTcBuffer ) ) != IVAS_ERR_OK ) { return error; } #else #ifdef FIX_NCHAN_BUFFERS k = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); for ( n = 0; n < k; n++ ) Loading @@ -2446,7 +2456,7 @@ ivas_error ivas_init_decoder( { st_ivas->p_output_f[n] = NULL; } #endif return error; } Loading Loading @@ -2919,11 +2929,15 @@ void ivas_destroy_dec( /* floating-point output audio buffers */ for ( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ ) { #ifdef FIX_1330_JBM_MEMORY st_ivas->p_output_f[i] = NULL; #else if ( st_ivas->p_output_f[i] != NULL ) { free( st_ivas->p_output_f[i] ); st_ivas->p_output_f[i] = NULL; } #endif } /* main IVAS handle */ Loading
lib_dec/ivas_ism_dec.c +20 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,11 @@ static ivas_error ivas_ism_bitrate_switching_dec( int16_t tc_nchan_tc_new; int16_t tc_nchan_allocate_new; int16_t tc_granularity_new; #ifdef FIX_1330_JBM_MEMORY int16_t nchan_out_buff; #else int16_t nchan_out_buff, nchan_out_buff_old; #endif nCPE_old = st_ivas->nCPE; nSCE_old = st_ivas->nSCE; Loading @@ -70,7 +74,9 @@ static ivas_error ivas_ism_bitrate_switching_dec( st_ivas->ism_mode = last_ism_mode; ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); st_ivas->ism_mode = ism_mode; #ifndef FIX_1330_JBM_MEMORY nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas, -1, -1 ); #endif if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL, 0 ) ) != IVAS_ERR_OK ) { Loading Loading @@ -288,6 +294,7 @@ static ivas_error ivas_ism_bitrate_switching_dec( return error; } #ifndef FIX_1330_JBM_MEMORY /*-----------------------------------------------------------------* * floating-point output audio buffers *-----------------------------------------------------------------*/ Loading @@ -298,7 +305,7 @@ static ivas_error ivas_ism_bitrate_switching_dec( { return error; } #endif /*-----------------------------------------------------------------* * JBM TC buffers *-----------------------------------------------------------------*/ Loading Loading @@ -338,6 +345,18 @@ static ivas_error ivas_ism_bitrate_switching_dec( mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } #ifdef FIX_1330_JBM_MEMORY /*-----------------------------------------------------------------* * floating-point output audio buffers *-----------------------------------------------------------------*/ nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, -1, -1 ); if ( ( error = ivas_output_buff_dec( st_ivas->p_output_f, nchan_out_buff, st_ivas->hDecoderConfig->Opt_tsm, st_ivas->hTcBuffer ) ) != IVAS_ERR_OK ) { return error; } #endif return IVAS_ERR_OK; } Loading