Commit eeb61fc8 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

re-open SPAR in OSBA BR switching between < and >= 384 kbps

parent b58902cd
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -304,7 +304,12 @@ ivas_error ivas_sba_dec_reconfigure(
            hSpar->hPCA = NULL;
        }

        if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) )
        if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || 
			(  ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) ||
               ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) ||
			( ( last_ivas_total_brate >= IVAS_384k && ivas_total_brate < IVAS_384k ) || 
			  ( last_ivas_total_brate < IVAS_384k && ivas_total_brate >= IVAS_384k ) && st_ivas->ivas_format == SBA_ISM_FORMAT)
			)
        {
            ivas_spar_dec_close( &( st_ivas->hSpar ), hDecoderConfig->output_Fs, 1 );

+11 −1
Original line number Diff line number Diff line
@@ -213,6 +213,13 @@ ivas_error ivas_osba_enc_reconfig(
        nbands_old = st_ivas->hQMetaData->q_direction->cfg.nbands;
        ndir_old = st_ivas->hQMetaData->no_directions;

        /*
        if ( ivas_total_brate == 256000 && hEncoderConfig->last_ivas_total_brate == 384000 )
        {
            printf( "cccc" );
        }
        */

        if ( ( analysis_order_old != st_ivas->sba_analysis_order ) || ( old_ism_mode != st_ivas->ism_mode ) )
        {
            int16_t i, n_old;
@@ -291,7 +298,10 @@ ivas_error ivas_osba_enc_reconfig(
        {
            hEncoderConfig->element_mode_init = IVAS_CPE_MDCT;
        }
        if ( nchan_transport_old != st_ivas->nchan_transport || ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) )
        if ( nchan_transport_old != st_ivas->nchan_transport || 
			( ivas_total_brate < IVAS_384k && hEncoderConfig->last_ivas_total_brate >= IVAS_384k ) || 
			( ivas_total_brate >= IVAS_384k && hEncoderConfig->last_ivas_total_brate < IVAS_384k ) 
			)
        {
            /* FB mixer handle */
            if ( hDirAC->hFbMixer != NULL )