diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index d2886c39a762eb5ea677a10cb008da488317232f..28085ae0967758307d8d0784d279fc505e02bd66 100644 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -762,7 +762,9 @@ static ivas_error configureEncoder( /* IVAS_fmToDo: needs more work in case of bitrate switching */ hEncoderConfig->sba_order = 1; } +#ifndef SBA_CLEANING st_ivas->sba_mode = ivas_sba_mode_select( hEncoderConfig->ivas_total_brate ); +#endif } else if ( hEncoderConfig->ivas_format == MASA_FORMAT ) { @@ -868,12 +870,16 @@ static ivas_error configureEncoder( return IVAS_ERROR( IVAS_ERR_NOT_IMPLEMENTED, "Channel-aware mode is not supported in IVAS yet." ); } +#ifdef SBA_CLEANING + if ( hEncoderConfig->Opt_AGC_ON && !( hEncoderConfig->ivas_format == SBA_FORMAT && ivas_sba_mode_select( hEncoderConfig->ivas_total_brate ) == SBA_MODE_SPAR ) ) +#else if ( hEncoderConfig->Opt_AGC_ON && !( hEncoderConfig->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR ) ) +#endif { return IVAS_ERROR( IVAS_ERR_NOT_SUPPORTED_OPTION, "AGC supported in SBA format at bitrates >= 24.4 kbps only." ); } - if ( hEncoderConfig->Opt_PCA_ON && !( hEncoderConfig->ivas_format == SBA_FORMAT && hEncoderConfig->ivas_total_brate == PCA_BRATE && hEncoderConfig->ivas_total_brate == IVAS_256k && hEncoderConfig->sba_order == 1 ) ) + if ( hEncoderConfig->Opt_PCA_ON && !( hEncoderConfig->ivas_format == SBA_FORMAT && hEncoderConfig->ivas_total_brate == PCA_BRATE && hEncoderConfig->sba_order == 1 ) ) { return IVAS_ERROR( IVAS_ERR_NOT_SUPPORTED_OPTION, "PCA supported at SBA FOA 256 kbps only." ); }