Loading lib_com/ivas_prot.h +15 −0 Original line number Diff line number Diff line Loading @@ -2155,6 +2155,9 @@ void stereo_mdct_core_dec( void splitAvailableBits( const int16_t total_bits, /* i : total available bits for TCX coding */ const int16_t split_ratio, /* i : split ratio */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i : signal core coding for sba */ #endif int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ ); Loading @@ -2172,6 +2175,9 @@ void parse_stereo_from_bitstream( STEREO_MDCT_DEC_DATA_HANDLE hStereoMdct, /* i/o: MDCT stereo decoder structure */ Decoder_State **sts, /* i/o: decoder state structure */ const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i: flag core coding for sba */ #endif Decoder_State *st0, /* i/o: decoder state structure for Bstr */ int16_t ms_mask[NB_DIV][MAX_SFB] /* o : bandwise MS mask */ ); Loading Loading @@ -2507,6 +2513,11 @@ ivas_error stereo_memory_enc( const int16_t max_bwidth, /* i : maximum audio bandwidth */ float *tdm_last_ratio, /* o : TD stereo last ratio */ const IVAS_FORMAT ivas_format /* i : IVAS format */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t nchan_transport /* i : number transport chans */ #endif ); ivas_error stereo_memory_dec( Loading Loading @@ -3002,7 +3013,11 @@ void ivas_dirac_param_est_enc( *----------------------------------------------------------------------------------*/ /*! r: SBA format mode */ #ifdef LBR_SBA_CORE_CODING_TUNING SBA_MODE ivas_sba_mode_select( #else int16_t ivas_sba_mode_select( #endif const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); Loading lib_com/ivas_sba_config.c +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ *-------------------------------------------------------------------*/ /*! r: SBA format mode */ int16_t ivas_sba_mode_select( SBA_MODE ivas_sba_mode_select( const int32_t ivas_total_brate /* i : IVAS total bitrate */ ) { Loading lib_com/ivas_stereo_mdct_stereo_com.c +15 −5 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ void splitAvailableBits( const int16_t total_bits, /* i : total available bits for TCX coding */ const int16_t split_ratio, /* i : split ratio */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i : signal core coding for sba */ #endif int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ ) Loading @@ -53,7 +56,14 @@ void splitAvailableBits( assert( split_ratio >= 1 && split_ratio < SMDCT_BITRATE_RATIO_RANGE ); *bits_ch0 = split_ratio * total_bits / SMDCT_BITRATE_RATIO_RANGE; *bits_ch1 = total_bits + 0 - *bits_ch0; #ifdef LBR_SBA_CORE_CODING_TUNING /* for SBA mode bias the distribution towards the W channel */ if ( split_ratio < 7 && isSBAStereoMode ) { *bits_ch0 += (int16_t) ( 0.2 * *bits_ch0 ); } #endif *bits_ch1 = total_bits - *bits_ch0; return; } lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,7 @@ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define LBR_SBA_CORE_CODING_TUNING /* Contribution "3 Core Coder Tuning for low bitrate SBA with 2 TCs" */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_dec/ivas_cpe_dec.c +8 −1 Original line number Diff line number Diff line Loading @@ -361,6 +361,7 @@ ivas_error ivas_cpe_dec( if ( hCPE->element_mode != IVAS_CPE_DFT || ( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) ) { #ifndef LBR_SBA_CORE_CODING_TUNING if ( st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) { if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK ) Loading @@ -375,6 +376,12 @@ ivas_error ivas_cpe_dec( return error; } } #else if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK ) { return error; } #endif } if ( st_ivas->hMCT ) Loading Loading
lib_com/ivas_prot.h +15 −0 Original line number Diff line number Diff line Loading @@ -2155,6 +2155,9 @@ void stereo_mdct_core_dec( void splitAvailableBits( const int16_t total_bits, /* i : total available bits for TCX coding */ const int16_t split_ratio, /* i : split ratio */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i : signal core coding for sba */ #endif int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ ); Loading @@ -2172,6 +2175,9 @@ void parse_stereo_from_bitstream( STEREO_MDCT_DEC_DATA_HANDLE hStereoMdct, /* i/o: MDCT stereo decoder structure */ Decoder_State **sts, /* i/o: decoder state structure */ const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i: flag core coding for sba */ #endif Decoder_State *st0, /* i/o: decoder state structure for Bstr */ int16_t ms_mask[NB_DIV][MAX_SFB] /* o : bandwise MS mask */ ); Loading Loading @@ -2507,6 +2513,11 @@ ivas_error stereo_memory_enc( const int16_t max_bwidth, /* i : maximum audio bandwidth */ float *tdm_last_ratio, /* o : TD stereo last ratio */ const IVAS_FORMAT ivas_format /* i : IVAS format */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t nchan_transport /* i : number transport chans */ #endif ); ivas_error stereo_memory_dec( Loading Loading @@ -3002,7 +3013,11 @@ void ivas_dirac_param_est_enc( *----------------------------------------------------------------------------------*/ /*! r: SBA format mode */ #ifdef LBR_SBA_CORE_CODING_TUNING SBA_MODE ivas_sba_mode_select( #else int16_t ivas_sba_mode_select( #endif const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); Loading
lib_com/ivas_sba_config.c +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ *-------------------------------------------------------------------*/ /*! r: SBA format mode */ int16_t ivas_sba_mode_select( SBA_MODE ivas_sba_mode_select( const int32_t ivas_total_brate /* i : IVAS total bitrate */ ) { Loading
lib_com/ivas_stereo_mdct_stereo_com.c +15 −5 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ void splitAvailableBits( const int16_t total_bits, /* i : total available bits for TCX coding */ const int16_t split_ratio, /* i : split ratio */ #ifdef LBR_SBA_CORE_CODING_TUNING const int16_t isSBAStereoMode, /* i : signal core coding for sba */ #endif int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ ) Loading @@ -53,7 +56,14 @@ void splitAvailableBits( assert( split_ratio >= 1 && split_ratio < SMDCT_BITRATE_RATIO_RANGE ); *bits_ch0 = split_ratio * total_bits / SMDCT_BITRATE_RATIO_RANGE; *bits_ch1 = total_bits + 0 - *bits_ch0; #ifdef LBR_SBA_CORE_CODING_TUNING /* for SBA mode bias the distribution towards the W channel */ if ( split_ratio < 7 && isSBAStereoMode ) { *bits_ch0 += (int16_t) ( 0.2 * *bits_ch0 ); } #endif *bits_ch1 = total_bits - *bits_ch0; return; }
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,7 @@ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define LBR_SBA_CORE_CODING_TUNING /* Contribution "3 Core Coder Tuning for low bitrate SBA with 2 TCs" */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_dec/ivas_cpe_dec.c +8 −1 Original line number Diff line number Diff line Loading @@ -361,6 +361,7 @@ ivas_error ivas_cpe_dec( if ( hCPE->element_mode != IVAS_CPE_DFT || ( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) ) { #ifndef LBR_SBA_CORE_CODING_TUNING if ( st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) { if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK ) Loading @@ -375,6 +376,12 @@ ivas_error ivas_cpe_dec( return error; } } #else if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK ) { return error; } #endif } if ( st_ivas->hMCT ) Loading