Commit c60bb9cc authored by det's avatar det
Browse files

patched MR1257 into basop.

parent 7847d456
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -101,5 +101,6 @@
#define FIX_1109_OPTIM_MCT_STEREO_IGF_DEC       /* FhG: optimize mctStereoIGF_dec_fx() */
#define FIX_1110_OPTIM_DIRAC_DECORR_PROC        /* FhG: optimize ivas_dirac_dec_decorr_process() */
#define FIX_1100_REMOVE_LPC_RESCALING           /* VA: Remove the rescaling of LPC coefficient to Q12 as residu and syn-filt are already taking care of it*/
#define NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH                 /* FhG: issue 908: fix crash in OSBA BR switching with long test vectors */

#endif
+8 −3
Original line number Diff line number Diff line
@@ -326,7 +326,8 @@ ivas_error ivas_sba_dec_reconfigure_fx(
        test();
        test();
        test();
        IF( NE_16( nchan_transport_old, ivas_get_sba_num_TCs_fx( ivas_total_brate, sba_order_internal ) ) || ( GE_32( last_ivas_total_brate, IVAS_512k ) && LT_32( ivas_total_brate, IVAS_512k ) ) || ( LT_32( last_ivas_total_brate, IVAS_512k ) && GE_32( ivas_total_brate, IVAS_512k ) ) )
	//        IF( NE_16( nchan_transport_old, ivas_get_sba_num_TCs_fx( ivas_total_brate, sba_order_internal ) ) || ( GE_32( last_ivas_total_brate, IVAS_512k ) && LT_32( ivas_total_brate, IVAS_512k ) ) || ( LT_32( last_ivas_total_brate, IVAS_512k ) && GE_32( 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 ) ) 
	{
		ivas_spar_dec_close_fx( &( st_ivas->hSpar ), hDecoderConfig->output_Fs, 1 );

@@ -351,7 +352,11 @@ ivas_error ivas_sba_dec_reconfigure_fx(
        test();
        test();
        test();
#ifdef NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH
        IF( hSpar->hPCA == NULL && EQ_32( st_ivas->hDecoderConfig->ivas_total_brate, PCA_BRATE ) && EQ_16( st_ivas->sba_order, 1 ) && EQ_32( st_ivas->ivas_format, SBA_FORMAT ) || EQ_32( st_ivas->ivas_format,SBA_ISM_FORMAT ) )
#else
        IF( hSpar->hPCA == NULL && EQ_32( st_ivas->hDecoderConfig->ivas_total_brate, PCA_BRATE ) && EQ_16( st_ivas->sba_order, 1 ) && EQ_32( st_ivas->ivas_format, SBA_FORMAT ) )
#endif
        {
            IF( ( hSpar->hPCA = (PCA_DEC_STATE *) malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL )
            {
+4 −0
Original line number Diff line number Diff line
@@ -1095,7 +1095,11 @@ static ivas_error configureEncoder(
    }


#ifdef NONBE_FIX_908_OSBA_BR_SWITCHING_CRASH
    if ( hEncoderConfig->Opt_PCA_ON && !( ( hEncoderConfig->ivas_format == SBA_FORMAT || hEncoderConfig->ivas_format == SBA_ISM_FORMAT ) && hEncoderConfig->ivas_total_brate == PCA_BRATE && hEncoderConfig->sba_order == SBA_FOA_ORDER ) )
#else
    if ( hEncoderConfig->Opt_PCA_ON && !( hEncoderConfig->ivas_format == SBA_FORMAT && hEncoderConfig->ivas_total_brate == PCA_BRATE && hEncoderConfig->sba_order == SBA_FOA_ORDER ) )
#endif
    {
        return IVAS_ERROR( IVAS_ERR_NOT_SUPPORTED_OPTION, "PCA supported at SBA FOA 256 kbps only." );
    }