Loading lib_com/bitstream.c +2 −0 Original line number Diff line number Diff line Loading @@ -879,10 +879,12 @@ static ivas_error write_indices_element( for ( n = 0; n < n_channels; n++ ) { #ifndef MC_BITRATE_SWITCHING if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) ) { continue; } #endif reset_indices_enc( sts[n]->hBstr, MAX_NUM_INDICES ); } } Loading lib_com/ivas_stereo_mdct_bands_com.c +3 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,9 @@ void stereo_mdct_init_igf_start_band( { int16_t i, bitRateIndex, igfStartLine; const int16_t *swb_offset; #ifdef DEBUGGING stbParams->sfbIgfStart = 0; #endif bitRateIndex = IGF_MapBitRateToIndex( element_brate, bwidth, IVAS_CPE_MDCT, 0 ); swb_offset = &swb_offset_LB_new[bitRateIndex][1]; Loading lib_dec/init_dec.c +5 −0 Original line number Diff line number Diff line Loading @@ -616,17 +616,22 @@ ivas_error init_decoder( } /* TCX config. data structure */ #ifndef MC_BITRATE_SWITCHING /* for correct bit rate switching in MC we at least need the TcxCfg */ if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { #endif if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) count_malloc( sizeof( TCX_config ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxCfg\n" ) ); } #ifndef MC_BITRATE_SWITCHING } else { st->hTcxCfg = NULL; } #endif /* Tonal MDCT concealment data structure */ if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) Loading lib_dec/ivas_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -358,7 +358,11 @@ ivas_error ivas_dec( /* LFE channel decoder */ if ( st_ivas->mc_mode == MC_MODE_MCT ) { #ifndef MC_BITRATE_SWITCHING /* bay: this really killed the MC bitrate switching and took me one day to find it, at least a comment here why the messing with this pointers happens would have been nice */ st_ivas->hCPE[1]->hCoreCoder[1]->hTcxCfg = st_ivas->hCPE[1]->hCoreCoder[0]->hTcxCfg; #endif ivas_lfe_dec( st_ivas->hLFE, st, output_frame, st_ivas->bfi, output_lfe_ch ); } Loading lib_dec/ivas_init_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -1439,7 +1439,11 @@ void destroy_core_dec( hCoreCoder->hTcxDec = NULL; } if ( hCoreCoder->hTcxCfg != NULL && hCoreCoder->mct_chan_mode != MCT_CHAN_MODE_LFE ) if ( hCoreCoder->hTcxCfg != NULL #ifndef MC_BITRATE_SWITCHING && hCoreCoder->mct_chan_mode != MCT_CHAN_MODE_LFE #endif ) { count_free( hCoreCoder->hTcxCfg ); hCoreCoder->hTcxCfg = NULL; Loading Loading
lib_com/bitstream.c +2 −0 Original line number Diff line number Diff line Loading @@ -879,10 +879,12 @@ static ivas_error write_indices_element( for ( n = 0; n < n_channels; n++ ) { #ifndef MC_BITRATE_SWITCHING if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) ) { continue; } #endif reset_indices_enc( sts[n]->hBstr, MAX_NUM_INDICES ); } } Loading
lib_com/ivas_stereo_mdct_bands_com.c +3 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,9 @@ void stereo_mdct_init_igf_start_band( { int16_t i, bitRateIndex, igfStartLine; const int16_t *swb_offset; #ifdef DEBUGGING stbParams->sfbIgfStart = 0; #endif bitRateIndex = IGF_MapBitRateToIndex( element_brate, bwidth, IVAS_CPE_MDCT, 0 ); swb_offset = &swb_offset_LB_new[bitRateIndex][1]; Loading
lib_dec/init_dec.c +5 −0 Original line number Diff line number Diff line Loading @@ -616,17 +616,22 @@ ivas_error init_decoder( } /* TCX config. data structure */ #ifndef MC_BITRATE_SWITCHING /* for correct bit rate switching in MC we at least need the TcxCfg */ if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) { #endif if ( ( st->hTcxCfg = (TCX_CONFIG_HANDLE) count_malloc( sizeof( TCX_config ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for hTcxCfg\n" ) ); } #ifndef MC_BITRATE_SWITCHING } else { st->hTcxCfg = NULL; } #endif /* Tonal MDCT concealment data structure */ if ( ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) && st->mct_chan_mode != MCT_CHAN_MODE_LFE ) Loading
lib_dec/ivas_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -358,7 +358,11 @@ ivas_error ivas_dec( /* LFE channel decoder */ if ( st_ivas->mc_mode == MC_MODE_MCT ) { #ifndef MC_BITRATE_SWITCHING /* bay: this really killed the MC bitrate switching and took me one day to find it, at least a comment here why the messing with this pointers happens would have been nice */ st_ivas->hCPE[1]->hCoreCoder[1]->hTcxCfg = st_ivas->hCPE[1]->hCoreCoder[0]->hTcxCfg; #endif ivas_lfe_dec( st_ivas->hLFE, st, output_frame, st_ivas->bfi, output_lfe_ch ); } Loading
lib_dec/ivas_init_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -1439,7 +1439,11 @@ void destroy_core_dec( hCoreCoder->hTcxDec = NULL; } if ( hCoreCoder->hTcxCfg != NULL && hCoreCoder->mct_chan_mode != MCT_CHAN_MODE_LFE ) if ( hCoreCoder->hTcxCfg != NULL #ifndef MC_BITRATE_SWITCHING && hCoreCoder->mct_chan_mode != MCT_CHAN_MODE_LFE #endif ) { count_free( hCoreCoder->hTcxCfg ); hCoreCoder->hTcxCfg = NULL; Loading