Loading lib_com/bits_alloc.c +10 −4 Original line number Original line Diff line number Diff line Loading @@ -552,7 +552,9 @@ ivas_error config_acelp1( const int16_t tdm_lp_reuse_flag, /* i : LPC reuse flag (can be 1 only with secondary channel */ const int16_t tdm_lp_reuse_flag, /* i : LPC reuse flag (can be 1 only with secondary channel */ const int16_t tdm_low_rate_mode, /* i : secondary channel low rate mode flag */ const int16_t tdm_low_rate_mode, /* i : secondary channel low rate mode flag */ const int16_t idchan, /* i : stereo channel ID */ const int16_t idchan, /* i : stereo channel ID */ #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC const int16_t active_cnt, /* i : Active frame counter */ const int16_t active_cnt, /* i : Active frame counter */ #endif const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag*/ const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag*/ const int16_t tdm_LRTD_flag, /* i : LRTD stereo mode flag */ const int16_t tdm_LRTD_flag, /* i : LRTD stereo mode flag */ const int16_t GSC_IVAS_mode /* i : GSC IVAS mode */ const int16_t GSC_IVAS_mode /* i : GSC IVAS mode */ Loading Loading @@ -770,7 +772,11 @@ ivas_error config_acelp1( bits -= acelp_cfg->mid_lsf_bits; bits -= acelp_cfg->mid_lsf_bits; } } #ifdef NONBE_1325_TD_STEREO_QUANT_LSF_SEC else if ( tdm_lp_reuse_flag == 1 && idchan == 1 ) #else else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 ) else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 ) #endif { { bits -= TDM_IC_LSF_PRED_BITS; bits -= TDM_IC_LSF_PRED_BITS; } } Loading lib_com/ivas_cnst.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -172,8 +172,13 @@ typedef enum #define JBM_CLDFB_SLOTS_IN_SUBFRAME 4 #define JBM_CLDFB_SLOTS_IN_SUBFRAME 4 #define MAX_JBM_CLDFB_TIMESLOTS 32 #define MAX_JBM_CLDFB_TIMESLOTS 32 #define DEFAULT_JBM_CLDFB_TIMESLOTS 16 #define DEFAULT_JBM_CLDFB_TIMESLOTS 16 #ifdef JBM_MEMORY_OPT #define MAX_JBM_L_FRAME48k ( IVAS_MAX_FRAME_SIZE * 2 ) /* 1920: max. time-scaled frame buffer length (per channel) in samples */ #define MAX_JBM_L_FRAME_NS 40000000L /* 40 ms: time-scaled frame size in ns, proportional to MAX_JBM_L_FRAME48k */ #else #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_JBM_L_FRAME_NS 40000000L #endif #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ Loading lib_com/ivas_prot.h +23 −2 Original line number Original line Diff line number Diff line Loading @@ -259,12 +259,28 @@ uint32_t ivas_syn_output( int16_t *synth_out /* o : integer 16 bits synthesis signal */ int16_t *synth_out /* o : integer 16 bits synthesis signal */ ); ); #ifdef JBM_MEMORY_OPT void ivas_buffer_interleaved_to_deinterleaved( float *audio, /* i/o: audio buffer */ const int16_t n_channels, /* i : number of channels */ const int16_t frame_length, /* i : frame length (one channel) */ const int16_t n_samp_full /* i : full frame length (one channel) */ ); void ivas_buffer_deinterleaved_to_interleaved( float *audio[], /* i : deinterleaved audio buffer */ const int16_t n_channels, /* i : number of channels */ const int16_t frame_length, /* i : frame length (one channel) */ float *audio_out /* o : interleaved audio buffer */ ); #else void ivas_syn_output_f( void ivas_syn_output_f( float *synth[], /* i/o: float synthesis signal */ float *synth[], /* i/o: float synthesis signal */ const int16_t output_frame, /* i : output frame length (one channel) */ const int16_t output_frame, /* i : output frame length (one channel) */ const int16_t n_channels, /* i : number of output channels */ const int16_t n_channels, /* i : number of output channels */ float *synth_out /* o : integer 16 bits synthesis signal */ float *synth_out /* o : integer 16 bits synthesis signal */ ); ); #endif void ivas_initialize_handles_enc( void ivas_initialize_handles_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ Loading Loading @@ -832,8 +848,11 @@ ivas_error ivas_jbm_dec_flush_renderer( void ivas_jbm_dec_feed_tc_to_renderer( void ivas_jbm_dec_feed_tc_to_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSamplesForRendering, /* i : number of TC samples available for rendering */ const int16_t nSamplesForRendering, /* i : number of TC samples available for rendering */ int16_t *nSamplesResidual, /* o : number of samples not fitting into the renderer grid and buffer for the next call*/ int16_t *nSamplesResidual /* o : number of samples not fitting into the renderer grid and buffer for the next call*/ float *data /* i/o: transport channels/output synthesis signal */ #ifndef JBM_MEMORY_OPT , float *data /* i/o: time-scaled transport channels */ #endif ); ); void ivas_dec_prepare_renderer( void ivas_dec_prepare_renderer( Loading Loading @@ -2103,7 +2122,9 @@ void td_stereo_param_updt( const float lsp_old_PCh[], /* i : primary channel old LSPs */ const float lsp_old_PCh[], /* i : primary channel old LSPs */ const float lsf_old_PCh[], /* i : primary channel old LSFs */ const float lsf_old_PCh[], /* i : primary channel old LSFs */ const float pitch_buf_PCh[], /* i : primary channel pitch buffer */ const float pitch_buf_PCh[], /* i : primary channel pitch buffer */ #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC float tdm_lspQ_PCh[], /* o : Q LSPs for primary channel */ float tdm_lspQ_PCh[], /* o : Q LSPs for primary channel */ #endif float tdm_lsfQ_PCh[], /* o : Q LSFs for primary channel */ float tdm_lsfQ_PCh[], /* o : Q LSFs for primary channel */ float tdm_Pri_pitch_buf[], /* o : pitch values for primary channel */ float tdm_Pri_pitch_buf[], /* o : pitch values for primary channel */ const int16_t flag_ACELP16k, /* i : ACELP@16kHz flag */ const int16_t flag_ACELP16k, /* i : ACELP@16kHz flag */ Loading lib_com/ivas_stereo_td_bit_alloc.c +14 −4 Original line number Original line Diff line number Diff line Loading @@ -443,7 +443,9 @@ void td_stereo_param_updt( const float lsp_old_PCh[], /* i : primary channel old LSPs */ const float lsp_old_PCh[], /* i : primary channel old LSPs */ const float lsf_old_PCh[], /* i : primary channel old LSFs */ const float lsf_old_PCh[], /* i : primary channel old LSFs */ const float pitch_buf_PCh[], /* i : primary channel pitch buffer */ const float pitch_buf_PCh[], /* i : primary channel pitch buffer */ #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC float tdm_lspQ_PCh[], /* o : Q LSPs for primary channel */ float tdm_lspQ_PCh[], /* o : Q LSPs for primary channel */ #endif float tdm_lsfQ_PCh[], /* o : Q LSFs for primary channel */ float tdm_lsfQ_PCh[], /* o : Q LSFs for primary channel */ float tdm_Pri_pitch_buf[], /* o : pitch values for primary channel */ float tdm_Pri_pitch_buf[], /* o : pitch values for primary channel */ const int16_t flag_ACELP16k, /* i : ACELP@16kHz flag */ const int16_t flag_ACELP16k, /* i : ACELP@16kHz flag */ Loading @@ -456,14 +458,17 @@ void td_stereo_param_updt( if ( tdm_use_IAWB_Ave_lpc == 1 ) if ( tdm_use_IAWB_Ave_lpc == 1 ) { { mvr2r( IAWB_Ave, tdm_lsfQ_PCh, M ); mvr2r( IAWB_Ave, tdm_lsfQ_PCh, M ); #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC if ( tdm_lspQ_PCh != NULL ) if ( tdm_lspQ_PCh != NULL ) { { lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 ); lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 ); } } #endif } } else if ( flag_ACELP16k == 1 ) else if ( flag_ACELP16k == 1 ) { { #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC if ( tdm_lspQ_PCh != NULL ) if ( tdm_lspQ_PCh != NULL ) { { mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M ); mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M ); Loading @@ -472,18 +477,23 @@ void td_stereo_param_updt( } } else else { { #endif float lsp_temp[M]; float lsp_temp[M]; mvr2r( lsp_old_PCh, lsp_temp, M ); mvr2r( lsp_old_PCh, lsp_temp, M ); lsp_convert_poly( lsp_temp, L_FRAME, 0 ); lsp_convert_poly( lsp_temp, L_FRAME, 0 ); lsp2lsf( lsp_temp, tdm_lsfQ_PCh, M, INT_FS_12k8 ); lsp2lsf( lsp_temp, tdm_lsfQ_PCh, M, INT_FS_12k8 ); #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC } } #endif } } else else { { #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC if ( tdm_lspQ_PCh != NULL ) if ( tdm_lspQ_PCh != NULL ) { { mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M ); mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M ); } } #endif mvr2r( lsf_old_PCh, tdm_lsfQ_PCh, M ); mvr2r( lsf_old_PCh, tdm_lsfQ_PCh, M ); } } Loading lib_com/ivas_tools.c +65 −0 Original line number Original line Diff line number Diff line Loading @@ -148,6 +148,70 @@ uint32_t ivas_syn_output( return noClipping; return noClipping; } } #ifdef JBM_MEMORY_OPT /*-------------------------------------------------------------------* * ivas_buffer_interleaved_to_deinterleaved() * * Convert an interleaved buffer of audio channels to deinterleaved one *-------------------------------------------------------------------*/ void ivas_buffer_interleaved_to_deinterleaved( float *audio, /* i/o: audio buffer */ const int16_t n_channels, /* i : number of channels */ const int16_t frame_length, /* i : frame length (one channel) */ const int16_t n_samp_full /* i : full frame length (one channel) */ ) { int16_t offset, ch, m; float buffer[MAX_TRANSPORT_CHANNELS][MAX_JBM_L_FRAME48k]; for ( ch = 0; ch < n_channels; ch++ ) { for ( m = 0; m < frame_length; m++ ) { buffer[ch][m] = audio[m * n_channels + ch]; } } offset = 0; for ( ch = 0; ch < n_channels; ch++ ) { mvr2r( buffer[ch], audio + offset, frame_length ); offset += n_samp_full; } return; } /*-------------------------------------------------------------------* * ivas_buffer_deinterleaved_to_interleaved() * * Convert a deinterleaved buffer of audio channels to interleaved one *-------------------------------------------------------------------*/ void ivas_buffer_deinterleaved_to_interleaved( float *audio[], /* i/o: deinterleaved audio buffer */ const int16_t n_channels, /* i : number of channels */ const int16_t frame_length, /* i : frame length (one channel) */ float *audio_out /* o : interleaved audio buffer */ ) { int16_t ch, m; for ( ch = 0; ch < n_channels; ch++ ) { for ( m = 0; m < frame_length; m++ ) { audio_out[m * n_channels + ch] = audio[ch][m]; } } return; } #else /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * ivas_syn_output_f() * ivas_syn_output_f() Loading Loading @@ -181,6 +245,7 @@ void ivas_syn_output_f( return; return; } } #endif /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * mvr2r_inc() * mvr2r_inc() Loading Loading
lib_com/bits_alloc.c +10 −4 Original line number Original line Diff line number Diff line Loading @@ -552,7 +552,9 @@ ivas_error config_acelp1( const int16_t tdm_lp_reuse_flag, /* i : LPC reuse flag (can be 1 only with secondary channel */ const int16_t tdm_lp_reuse_flag, /* i : LPC reuse flag (can be 1 only with secondary channel */ const int16_t tdm_low_rate_mode, /* i : secondary channel low rate mode flag */ const int16_t tdm_low_rate_mode, /* i : secondary channel low rate mode flag */ const int16_t idchan, /* i : stereo channel ID */ const int16_t idchan, /* i : stereo channel ID */ #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC const int16_t active_cnt, /* i : Active frame counter */ const int16_t active_cnt, /* i : Active frame counter */ #endif const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag*/ const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag*/ const int16_t tdm_LRTD_flag, /* i : LRTD stereo mode flag */ const int16_t tdm_LRTD_flag, /* i : LRTD stereo mode flag */ const int16_t GSC_IVAS_mode /* i : GSC IVAS mode */ const int16_t GSC_IVAS_mode /* i : GSC IVAS mode */ Loading Loading @@ -770,7 +772,11 @@ ivas_error config_acelp1( bits -= acelp_cfg->mid_lsf_bits; bits -= acelp_cfg->mid_lsf_bits; } } #ifdef NONBE_1325_TD_STEREO_QUANT_LSF_SEC else if ( tdm_lp_reuse_flag == 1 && idchan == 1 ) #else else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 ) else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 ) #endif { { bits -= TDM_IC_LSF_PRED_BITS; bits -= TDM_IC_LSF_PRED_BITS; } } Loading
lib_com/ivas_cnst.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -172,8 +172,13 @@ typedef enum #define JBM_CLDFB_SLOTS_IN_SUBFRAME 4 #define JBM_CLDFB_SLOTS_IN_SUBFRAME 4 #define MAX_JBM_CLDFB_TIMESLOTS 32 #define MAX_JBM_CLDFB_TIMESLOTS 32 #define DEFAULT_JBM_CLDFB_TIMESLOTS 16 #define DEFAULT_JBM_CLDFB_TIMESLOTS 16 #ifdef JBM_MEMORY_OPT #define MAX_JBM_L_FRAME48k ( IVAS_MAX_FRAME_SIZE * 2 ) /* 1920: max. time-scaled frame buffer length (per channel) in samples */ #define MAX_JBM_L_FRAME_NS 40000000L /* 40 ms: time-scaled frame size in ns, proportional to MAX_JBM_L_FRAME48k */ #else #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_JBM_L_FRAME_NS 40000000L #endif #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ Loading
lib_com/ivas_prot.h +23 −2 Original line number Original line Diff line number Diff line Loading @@ -259,12 +259,28 @@ uint32_t ivas_syn_output( int16_t *synth_out /* o : integer 16 bits synthesis signal */ int16_t *synth_out /* o : integer 16 bits synthesis signal */ ); ); #ifdef JBM_MEMORY_OPT void ivas_buffer_interleaved_to_deinterleaved( float *audio, /* i/o: audio buffer */ const int16_t n_channels, /* i : number of channels */ const int16_t frame_length, /* i : frame length (one channel) */ const int16_t n_samp_full /* i : full frame length (one channel) */ ); void ivas_buffer_deinterleaved_to_interleaved( float *audio[], /* i : deinterleaved audio buffer */ const int16_t n_channels, /* i : number of channels */ const int16_t frame_length, /* i : frame length (one channel) */ float *audio_out /* o : interleaved audio buffer */ ); #else void ivas_syn_output_f( void ivas_syn_output_f( float *synth[], /* i/o: float synthesis signal */ float *synth[], /* i/o: float synthesis signal */ const int16_t output_frame, /* i : output frame length (one channel) */ const int16_t output_frame, /* i : output frame length (one channel) */ const int16_t n_channels, /* i : number of output channels */ const int16_t n_channels, /* i : number of output channels */ float *synth_out /* o : integer 16 bits synthesis signal */ float *synth_out /* o : integer 16 bits synthesis signal */ ); ); #endif void ivas_initialize_handles_enc( void ivas_initialize_handles_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ Loading Loading @@ -832,8 +848,11 @@ ivas_error ivas_jbm_dec_flush_renderer( void ivas_jbm_dec_feed_tc_to_renderer( void ivas_jbm_dec_feed_tc_to_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSamplesForRendering, /* i : number of TC samples available for rendering */ const int16_t nSamplesForRendering, /* i : number of TC samples available for rendering */ int16_t *nSamplesResidual, /* o : number of samples not fitting into the renderer grid and buffer for the next call*/ int16_t *nSamplesResidual /* o : number of samples not fitting into the renderer grid and buffer for the next call*/ float *data /* i/o: transport channels/output synthesis signal */ #ifndef JBM_MEMORY_OPT , float *data /* i/o: time-scaled transport channels */ #endif ); ); void ivas_dec_prepare_renderer( void ivas_dec_prepare_renderer( Loading Loading @@ -2103,7 +2122,9 @@ void td_stereo_param_updt( const float lsp_old_PCh[], /* i : primary channel old LSPs */ const float lsp_old_PCh[], /* i : primary channel old LSPs */ const float lsf_old_PCh[], /* i : primary channel old LSFs */ const float lsf_old_PCh[], /* i : primary channel old LSFs */ const float pitch_buf_PCh[], /* i : primary channel pitch buffer */ const float pitch_buf_PCh[], /* i : primary channel pitch buffer */ #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC float tdm_lspQ_PCh[], /* o : Q LSPs for primary channel */ float tdm_lspQ_PCh[], /* o : Q LSPs for primary channel */ #endif float tdm_lsfQ_PCh[], /* o : Q LSFs for primary channel */ float tdm_lsfQ_PCh[], /* o : Q LSFs for primary channel */ float tdm_Pri_pitch_buf[], /* o : pitch values for primary channel */ float tdm_Pri_pitch_buf[], /* o : pitch values for primary channel */ const int16_t flag_ACELP16k, /* i : ACELP@16kHz flag */ const int16_t flag_ACELP16k, /* i : ACELP@16kHz flag */ Loading
lib_com/ivas_stereo_td_bit_alloc.c +14 −4 Original line number Original line Diff line number Diff line Loading @@ -443,7 +443,9 @@ void td_stereo_param_updt( const float lsp_old_PCh[], /* i : primary channel old LSPs */ const float lsp_old_PCh[], /* i : primary channel old LSPs */ const float lsf_old_PCh[], /* i : primary channel old LSFs */ const float lsf_old_PCh[], /* i : primary channel old LSFs */ const float pitch_buf_PCh[], /* i : primary channel pitch buffer */ const float pitch_buf_PCh[], /* i : primary channel pitch buffer */ #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC float tdm_lspQ_PCh[], /* o : Q LSPs for primary channel */ float tdm_lspQ_PCh[], /* o : Q LSPs for primary channel */ #endif float tdm_lsfQ_PCh[], /* o : Q LSFs for primary channel */ float tdm_lsfQ_PCh[], /* o : Q LSFs for primary channel */ float tdm_Pri_pitch_buf[], /* o : pitch values for primary channel */ float tdm_Pri_pitch_buf[], /* o : pitch values for primary channel */ const int16_t flag_ACELP16k, /* i : ACELP@16kHz flag */ const int16_t flag_ACELP16k, /* i : ACELP@16kHz flag */ Loading @@ -456,14 +458,17 @@ void td_stereo_param_updt( if ( tdm_use_IAWB_Ave_lpc == 1 ) if ( tdm_use_IAWB_Ave_lpc == 1 ) { { mvr2r( IAWB_Ave, tdm_lsfQ_PCh, M ); mvr2r( IAWB_Ave, tdm_lsfQ_PCh, M ); #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC if ( tdm_lspQ_PCh != NULL ) if ( tdm_lspQ_PCh != NULL ) { { lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 ); lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 ); } } #endif } } else if ( flag_ACELP16k == 1 ) else if ( flag_ACELP16k == 1 ) { { #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC if ( tdm_lspQ_PCh != NULL ) if ( tdm_lspQ_PCh != NULL ) { { mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M ); mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M ); Loading @@ -472,18 +477,23 @@ void td_stereo_param_updt( } } else else { { #endif float lsp_temp[M]; float lsp_temp[M]; mvr2r( lsp_old_PCh, lsp_temp, M ); mvr2r( lsp_old_PCh, lsp_temp, M ); lsp_convert_poly( lsp_temp, L_FRAME, 0 ); lsp_convert_poly( lsp_temp, L_FRAME, 0 ); lsp2lsf( lsp_temp, tdm_lsfQ_PCh, M, INT_FS_12k8 ); lsp2lsf( lsp_temp, tdm_lsfQ_PCh, M, INT_FS_12k8 ); #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC } } #endif } } else else { { #ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC if ( tdm_lspQ_PCh != NULL ) if ( tdm_lspQ_PCh != NULL ) { { mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M ); mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M ); } } #endif mvr2r( lsf_old_PCh, tdm_lsfQ_PCh, M ); mvr2r( lsf_old_PCh, tdm_lsfQ_PCh, M ); } } Loading
lib_com/ivas_tools.c +65 −0 Original line number Original line Diff line number Diff line Loading @@ -148,6 +148,70 @@ uint32_t ivas_syn_output( return noClipping; return noClipping; } } #ifdef JBM_MEMORY_OPT /*-------------------------------------------------------------------* * ivas_buffer_interleaved_to_deinterleaved() * * Convert an interleaved buffer of audio channels to deinterleaved one *-------------------------------------------------------------------*/ void ivas_buffer_interleaved_to_deinterleaved( float *audio, /* i/o: audio buffer */ const int16_t n_channels, /* i : number of channels */ const int16_t frame_length, /* i : frame length (one channel) */ const int16_t n_samp_full /* i : full frame length (one channel) */ ) { int16_t offset, ch, m; float buffer[MAX_TRANSPORT_CHANNELS][MAX_JBM_L_FRAME48k]; for ( ch = 0; ch < n_channels; ch++ ) { for ( m = 0; m < frame_length; m++ ) { buffer[ch][m] = audio[m * n_channels + ch]; } } offset = 0; for ( ch = 0; ch < n_channels; ch++ ) { mvr2r( buffer[ch], audio + offset, frame_length ); offset += n_samp_full; } return; } /*-------------------------------------------------------------------* * ivas_buffer_deinterleaved_to_interleaved() * * Convert a deinterleaved buffer of audio channels to interleaved one *-------------------------------------------------------------------*/ void ivas_buffer_deinterleaved_to_interleaved( float *audio[], /* i/o: deinterleaved audio buffer */ const int16_t n_channels, /* i : number of channels */ const int16_t frame_length, /* i : frame length (one channel) */ float *audio_out /* o : interleaved audio buffer */ ) { int16_t ch, m; for ( ch = 0; ch < n_channels; ch++ ) { for ( m = 0; m < frame_length; m++ ) { audio_out[m * n_channels + ch] = audio[ch][m]; } } return; } #else /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * ivas_syn_output_f() * ivas_syn_output_f() Loading Loading @@ -181,6 +245,7 @@ void ivas_syn_output_f( return; return; } } #endif /*-------------------------------------------------------------------* /*-------------------------------------------------------------------* * mvr2r_inc() * mvr2r_inc() Loading