Loading lib_com/cnst.h +1 −2 Original line number Diff line number Diff line Loading @@ -67,8 +67,7 @@ #define MAX16B_FLT 32767.0f #define MIN16B_FLT ( -32768.0f ) #define PCM16_TO_FLT_FAC 32768.0f #define MDFT_NORM_SCALING ( 1.0f / PCM16_TO_FLT_FAC ) #define MAX_FRAME_COUNTER 200 #define MAX_BITS_PER_FRAME 10240 /* Bits per frame for max. bitrate 512kbps */ Loading lib_com/ivas_prot.h +2 −0 Original line number Diff line number Diff line Loading @@ -3717,7 +3717,9 @@ void ivas_spar_config( void ivas_sba_upmixer_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ #ifndef SPAR_SCALING_HARMONIZATION const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ #endif const int16_t output_frame /* i : output frame length */ ); Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ #define NTT_UPDATE_ITD_SW /* contribution 4: Update of ITD switch in stereo downmix for EVS */ #define NTT_REMOVE_EPS_ROM /* contribution 4: Reduction of ROM size in stereo downmix for EVS */ #define SPAR_SCALING_HARMONIZATION /* issue 80: Changes to harmonize scaling in spar */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif lib_dec/ivas_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -345,7 +345,11 @@ ivas_error ivas_dec( } else /* SBA_MODE_SPAR */ { ivas_sba_upmixer_renderer( st_ivas, output, nchan_remapped, output_frame ); /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */ ivas_sba_upmixer_renderer( st_ivas, output, #ifndef SPAR_SCALING_HARMONIZATION nchan_remapped, #endif output_frame ); /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */ } } else if ( st_ivas->ivas_format == MC_FORMAT ) Loading lib_dec/ivas_sba_rendering.c +13 −1 Original line number Diff line number Diff line Loading @@ -205,11 +205,17 @@ static void ivas_sba_mtx_mult( void ivas_sba_upmixer_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ #ifndef SPAR_SCALING_HARMONIZATION const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ #endif const int16_t output_frame /* i : output frame length */ ) { #ifdef SPAR_SCALING_HARMONIZATION int16_t i; #else int16_t i, ch, nchan_out; #endif float temp; int16_t nchan_internal; Loading @@ -220,8 +226,11 @@ void ivas_sba_upmixer_renderer( #else nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); #endif nchan_out = st_ivas->hDecoderConfig->nchan_out; #ifndef SPAR_SCALING_HARMONIZATION nchan_out = st_ivas->hDecoderConfig->nchan_out; #endif #ifndef SPAR_SCALING_HARMONIZATION for ( ch = 0; ch < nchan_remapped; ch++ ) { for ( i = 0; i < output_frame; i++ ) Loading @@ -241,6 +250,7 @@ void ivas_sba_upmixer_renderer( output[ch][i] = temp; } } #endif if ( st_ivas->nchan_transport >= 3 ) { Loading @@ -261,6 +271,7 @@ void ivas_sba_upmixer_renderer( ivas_sba_linear_renderer( output, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ); } #ifndef SPAR_SCALING_HARMONIZATION for ( ch = 0; ch < nchan_out; ch++ ) { for ( i = 0; i < output_frame; i++ ) Loading @@ -268,6 +279,7 @@ void ivas_sba_upmixer_renderer( output[ch][i] = output[ch][i] * PCM16_TO_FLT_FAC; } } #endif wmops_sub_end(); Loading Loading
lib_com/cnst.h +1 −2 Original line number Diff line number Diff line Loading @@ -67,8 +67,7 @@ #define MAX16B_FLT 32767.0f #define MIN16B_FLT ( -32768.0f ) #define PCM16_TO_FLT_FAC 32768.0f #define MDFT_NORM_SCALING ( 1.0f / PCM16_TO_FLT_FAC ) #define MAX_FRAME_COUNTER 200 #define MAX_BITS_PER_FRAME 10240 /* Bits per frame for max. bitrate 512kbps */ Loading
lib_com/ivas_prot.h +2 −0 Original line number Diff line number Diff line Loading @@ -3717,7 +3717,9 @@ void ivas_spar_config( void ivas_sba_upmixer_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ #ifndef SPAR_SCALING_HARMONIZATION const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ #endif const int16_t output_frame /* i : output frame length */ ); Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ #define NTT_UPDATE_ITD_SW /* contribution 4: Update of ITD switch in stereo downmix for EVS */ #define NTT_REMOVE_EPS_ROM /* contribution 4: Reduction of ROM size in stereo downmix for EVS */ #define SPAR_SCALING_HARMONIZATION /* issue 80: Changes to harmonize scaling in spar */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif
lib_dec/ivas_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -345,7 +345,11 @@ ivas_error ivas_dec( } else /* SBA_MODE_SPAR */ { ivas_sba_upmixer_renderer( st_ivas, output, nchan_remapped, output_frame ); /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */ ivas_sba_upmixer_renderer( st_ivas, output, #ifndef SPAR_SCALING_HARMONIZATION nchan_remapped, #endif output_frame ); /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */ } } else if ( st_ivas->ivas_format == MC_FORMAT ) Loading
lib_dec/ivas_sba_rendering.c +13 −1 Original line number Diff line number Diff line Loading @@ -205,11 +205,17 @@ static void ivas_sba_mtx_mult( void ivas_sba_upmixer_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ #ifndef SPAR_SCALING_HARMONIZATION const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ #endif const int16_t output_frame /* i : output frame length */ ) { #ifdef SPAR_SCALING_HARMONIZATION int16_t i; #else int16_t i, ch, nchan_out; #endif float temp; int16_t nchan_internal; Loading @@ -220,8 +226,11 @@ void ivas_sba_upmixer_renderer( #else nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); #endif nchan_out = st_ivas->hDecoderConfig->nchan_out; #ifndef SPAR_SCALING_HARMONIZATION nchan_out = st_ivas->hDecoderConfig->nchan_out; #endif #ifndef SPAR_SCALING_HARMONIZATION for ( ch = 0; ch < nchan_remapped; ch++ ) { for ( i = 0; i < output_frame; i++ ) Loading @@ -241,6 +250,7 @@ void ivas_sba_upmixer_renderer( output[ch][i] = temp; } } #endif if ( st_ivas->nchan_transport >= 3 ) { Loading @@ -261,6 +271,7 @@ void ivas_sba_upmixer_renderer( ivas_sba_linear_renderer( output, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ); } #ifndef SPAR_SCALING_HARMONIZATION for ( ch = 0; ch < nchan_out; ch++ ) { for ( i = 0; i < output_frame; i++ ) Loading @@ -268,6 +279,7 @@ void ivas_sba_upmixer_renderer( output[ch][i] = output[ch][i] * PCM16_TO_FLT_FAC; } } #endif wmops_sub_end(); Loading