Loading lib_com/ivas_prot.h +8 −0 Original line number Diff line number Diff line Loading @@ -2157,6 +2157,10 @@ void splitAvailableBits( const int16_t split_ratio, /* i : split ratio */ int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t sba_mode /* i : signal core coding for sba */ #endif ); int16_t write_stereo_to_bitstream Loading @@ -2174,6 +2178,10 @@ void parse_stereo_from_bitstream( const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ Decoder_State *st0, /* i/o: decoder state structure for Bstr */ int16_t ms_mask[NB_DIV][MAX_SFB] /* o : bandwise MS mask */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t sba_mode /* i: flag core coding for sba */ #endif ); void FindSplitRatio( Loading lib_com/ivas_stereo_mdct_stereo_com.c +16 −2 Original line number Diff line number Diff line Loading @@ -48,12 +48,26 @@ void splitAvailableBits( const int16_t split_ratio, /* i : split ratio */ int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t sba_mode /* i : signal core coding for sba */ #endif ) { assert( split_ratio >= 1 && split_ratio < SMDCT_BITRATE_RATIO_RANGE ); #ifdef LBR_SBA_CORE_CODING_TUNING *bits_ch0 = split_ratio * total_bits / SMDCT_BITRATE_RATIO_RANGE; /* for SBA mode bias the distribution towards the W channel */ if ( split_ratio < 7 && sba_mode ) { *bits_ch0 += (int16_t) ( 0.2 * *bits_ch0 ); } #else *bits_ch0 = split_ratio * total_bits / SMDCT_BITRATE_RATIO_RANGE; *bits_ch1 = total_bits + 0 - *bits_ch0; #endif *bits_ch1 = total_bits - *bits_ch0; return; } lib_com/options.h +3 −2 Original line number Diff line number Diff line Loading @@ -60,14 +60,14 @@ /*#define MEM_COUNT_DETAILS*/ /* RAM counting tool: print per sub-structure details */ /*#define DEBUG_MODE_INFO*/ /* output most important parameters to the subdirectory "res/" */ //#define DEBUG_MODE_INFO /* output most important parameters to the subdirectory "res/" */ #ifdef DEBUG_MODE_INFO /*#define DEBUG_MODE_ACELP*/ /* output most important ACELP core parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_TCX*/ /* output most important TCX core parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_DFT*/ /* output most important DFT stereo parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_TD*/ /* output most important TD stereo parameters to the subdirectory "res/ */ /*#define DEBUG_MODE_DIRAC*/ /* output most important DIRAC parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_MDCT*/ /* output most important MDCT parameters to the subdirectory "res/" */ #define DEBUG_MODE_MDCT /* output most important MDCT parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_PARAM_MC */ /* output Parametric MC paramters to the subdirectory "res/" */ /*#define DEBUG_MODE_PARAM_ISM*/ /* output Parametric ISM paramters to the subdirectory "res/" */ #define DEBUG_MODE_INFO_TWEAK /* enable command line switch to specify subdirectory for debug info output inside "./res/" */ Loading Loading @@ -158,6 +158,7 @@ #define ORDER_BITS_ADDITION /* issue 14: Transmit SBA order and planar bits at all bitrates */ #define LBR_SBA_CORE_CODING_TUNING /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif lib_dec/ivas_cpe_dec.c +12 −1 Original line number Diff line number Diff line Loading @@ -362,7 +362,12 @@ 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 ) ) { if ( st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) #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 ) ) #ifdef LBR_SBA_CORE_CODING_TUNING || ( st_ivas->ivas_format == SBA_FORMAT && hCPE->element_brate == IVAS_48k ) #endif ) { if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK ) { Loading @@ -376,6 +381,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 lib_dec/ivas_mct_dec_mct.c +6 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,12 @@ void ivas_mct_dec_mct( p_st[0] = sts[hBlock->ch1]; p_st[1] = sts[hBlock->ch2]; parse_stereo_from_bitstream( hBlock->hStereoMdct, p_st, 1, sts[0], hBlock->mask ); parse_stereo_from_bitstream( hBlock->hStereoMdct, p_st, 1, sts[0], hBlock->mask #ifdef LBR_SBA_CORE_CODING_TUNING , 0 #endif ); } return; Loading Loading
lib_com/ivas_prot.h +8 −0 Original line number Diff line number Diff line Loading @@ -2157,6 +2157,10 @@ void splitAvailableBits( const int16_t split_ratio, /* i : split ratio */ int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t sba_mode /* i : signal core coding for sba */ #endif ); int16_t write_stereo_to_bitstream Loading @@ -2174,6 +2178,10 @@ void parse_stereo_from_bitstream( const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ Decoder_State *st0, /* i/o: decoder state structure for Bstr */ int16_t ms_mask[NB_DIV][MAX_SFB] /* o : bandwise MS mask */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t sba_mode /* i: flag core coding for sba */ #endif ); void FindSplitRatio( Loading
lib_com/ivas_stereo_mdct_stereo_com.c +16 −2 Original line number Diff line number Diff line Loading @@ -48,12 +48,26 @@ void splitAvailableBits( const int16_t split_ratio, /* i : split ratio */ int16_t *bits_ch0, /* o : bits for channel 0 */ int16_t *bits_ch1 /* o : bits for channel 1 */ #ifdef LBR_SBA_CORE_CODING_TUNING , const int16_t sba_mode /* i : signal core coding for sba */ #endif ) { assert( split_ratio >= 1 && split_ratio < SMDCT_BITRATE_RATIO_RANGE ); #ifdef LBR_SBA_CORE_CODING_TUNING *bits_ch0 = split_ratio * total_bits / SMDCT_BITRATE_RATIO_RANGE; /* for SBA mode bias the distribution towards the W channel */ if ( split_ratio < 7 && sba_mode ) { *bits_ch0 += (int16_t) ( 0.2 * *bits_ch0 ); } #else *bits_ch0 = split_ratio * total_bits / SMDCT_BITRATE_RATIO_RANGE; *bits_ch1 = total_bits + 0 - *bits_ch0; #endif *bits_ch1 = total_bits - *bits_ch0; return; }
lib_com/options.h +3 −2 Original line number Diff line number Diff line Loading @@ -60,14 +60,14 @@ /*#define MEM_COUNT_DETAILS*/ /* RAM counting tool: print per sub-structure details */ /*#define DEBUG_MODE_INFO*/ /* output most important parameters to the subdirectory "res/" */ //#define DEBUG_MODE_INFO /* output most important parameters to the subdirectory "res/" */ #ifdef DEBUG_MODE_INFO /*#define DEBUG_MODE_ACELP*/ /* output most important ACELP core parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_TCX*/ /* output most important TCX core parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_DFT*/ /* output most important DFT stereo parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_TD*/ /* output most important TD stereo parameters to the subdirectory "res/ */ /*#define DEBUG_MODE_DIRAC*/ /* output most important DIRAC parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_MDCT*/ /* output most important MDCT parameters to the subdirectory "res/" */ #define DEBUG_MODE_MDCT /* output most important MDCT parameters to the subdirectory "res/" */ /*#define DEBUG_MODE_PARAM_MC */ /* output Parametric MC paramters to the subdirectory "res/" */ /*#define DEBUG_MODE_PARAM_ISM*/ /* output Parametric ISM paramters to the subdirectory "res/" */ #define DEBUG_MODE_INFO_TWEAK /* enable command line switch to specify subdirectory for debug info output inside "./res/" */ Loading Loading @@ -158,6 +158,7 @@ #define ORDER_BITS_ADDITION /* issue 14: Transmit SBA order and planar bits at all bitrates */ #define LBR_SBA_CORE_CODING_TUNING /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif
lib_dec/ivas_cpe_dec.c +12 −1 Original line number Diff line number Diff line Loading @@ -362,7 +362,12 @@ 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 ) ) { if ( st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) #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 ) ) #ifdef LBR_SBA_CORE_CODING_TUNING || ( st_ivas->ivas_format == SBA_FORMAT && hCPE->element_brate == IVAS_48k ) #endif ) { if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK ) { Loading @@ -376,6 +381,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
lib_dec/ivas_mct_dec_mct.c +6 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,12 @@ void ivas_mct_dec_mct( p_st[0] = sts[hBlock->ch1]; p_st[1] = sts[hBlock->ch2]; parse_stereo_from_bitstream( hBlock->hStereoMdct, p_st, 1, sts[0], hBlock->mask ); parse_stereo_from_bitstream( hBlock->hStereoMdct, p_st, 1, sts[0], hBlock->mask #ifdef LBR_SBA_CORE_CODING_TUNING , 0 #endif ); } return; Loading