Commit 472db4b9 authored by bayers's avatar bayers
Browse files

fix setting of new_rate_CPE in the MC reconfiguration, was wrong for MC_MODE_MCT

parent d8029bc0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -896,9 +896,14 @@ ivas_error ivas_mc_dec_reconfig(
        ivas_mcmasa_set_separate_channel_mode( &separateChannelEnabled, &separateChannelIndex, st_ivas->hDecoderConfig->ivas_total_brate );
        ivas_mcmasa_split_brate( separateChannelEnabled, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nSCE, st_ivas->nCPE, &new_brate_SCE, &new_brate_CPE );
    }
    else if ( st_ivas->mc_mode == MC_MODE_MCT )
    {
        new_brate_SCE = 0;
        new_brate_CPE = ( st_ivas->hDecoderConfig->ivas_total_brate / ( st_ivas->nchan_transport - 1 ) ) * CPE_CHANNELS;
    }
    else
    {
        new_brate_SCE = st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport;
        new_brate_SCE = 0; /*st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport;*/
        new_brate_CPE = ( st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS;
    }
    if ( ( error = ivas_corecoder_dec_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, sba_dirac_stereo_flag_old, new_brate_SCE, new_brate_CPE, last_mc_mode ) ) != IVAS_ERR_OK )
+6 −1
Original line number Diff line number Diff line
@@ -829,9 +829,14 @@ ivas_error ivas_mc_enc_reconfig(
    {
        ivas_mcmasa_split_brate( st_ivas->hMcMasa->separateChannelEnabled, st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->nSCE, st_ivas->nCPE, &new_brate_SCE, &new_brate_CPE );
    }
    else if ( st_ivas->mc_mode == MC_MODE_MCT )
    {
        new_brate_SCE = 0;
        new_brate_CPE = ( st_ivas->hEncoderConfig->ivas_total_brate / (st_ivas->nchan_transport -1)) * CPE_CHANNELS;
    }
    else
    {
        new_brate_SCE = st_ivas->hEncoderConfig->ivas_total_brate / st_ivas->nchan_transport;
        new_brate_SCE = 0; /*st_ivas->hEncoderConfig->ivas_total_brate / st_ivas->nchan_transport;*/
        new_brate_CPE = ( st_ivas->hEncoderConfig->ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS;
    }