Commit 2d38a862 authored by fotopoulou's avatar fotopoulou
Browse files

correct nchan_transport_old fix for bitrate switching

parent 1f971bdb
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -123,7 +123,10 @@ ivas_error ivas_corecoder_enc_reconfig(
        nchan_transport_real = st_ivas->nchan_transport;

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            nchan_transport_real += st_ivas->hEncoderConfig->nchan_ism;
        }
#endif
        /* in SCE+CPE McMASA nchan_transport is still 2, fix the numbers */
        if ( hEncoderConfig->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA )
+3 −2
Original line number Diff line number Diff line
@@ -341,12 +341,10 @@ ivas_error ivas_osba_enc_reconfig(
#endif
            st_ivas->nCPE += ( st_ivas->hEncoderConfig->nchan_ism + 1 ) >> 1;
        }
#ifndef NONBE_FIX_752_OSBA_MISCONFIG_MCT
        else if ( old_ism_mode == ISM_SBA_MODE_DISC && st_ivas->ism_mode == ISM_MODE_NONE )
        {
            nchan_transport_old += st_ivas->hEncoderConfig->nchan_ism;
        }
#endif
        else if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
#ifndef NONBE_FIX_752_OSBA_MISCONFIG_MCT
@@ -355,6 +353,9 @@ ivas_error ivas_osba_enc_reconfig(
            st_ivas->nCPE += ( st_ivas->hEncoderConfig->nchan_ism + 1 ) >> 1;
            nCPE_old = st_ivas->nCPE;
            nchan_transport_old = st_ivas->nchan_transport;
#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
            nchan_transport_old += st_ivas->hEncoderConfig->nchan_ism;
#endif
        }

        if ( ( error = ivas_corecoder_enc_reconfig( st_ivas, nSCE_old, nCPE_old, nchan_transport_old, ivas_total_brate / st_ivas->nchan_transport, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS, MC_MODE_NONE ) ) != IVAS_ERR_OK )