Commit c4a82e25 authored by vaclav's avatar vaclav
Browse files

- print out a message code and exit the encoder when channel-aware mode is requested in IVAS

parent 99516553
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -392,6 +392,10 @@ int main(
        }
    }

    /*------------------------------------------------------------------------------------------*
     * Handle Channel-aware mode
     *------------------------------------------------------------------------------------------*/

    IVAS_ENC_CHANNEL_AWARE_CONFIG caConfig = arg.caConfig;

    if ( arg.ca_config_file )
@@ -410,6 +414,13 @@ int main(
        fprintf( stdout, "Channel-aware mode:     ON, FEC indicator : %s  FEC offset: %d \n\n", ( caConfig.fec_indicator == IVAS_ENC_FEC_LO ) ? "LO" : "HI", caConfig.fec_offset );
    }

    if ( arg.inputFormat != IVAS_ENC_INPUT_MONO && ( caConfig.channelAwareModeEnabled || arg.ca_config_file ) )
    {
        fprintf( stderr, "Channel-aware mode is not supported in IVAS.\n\n" );
        usage_enc();
        goto cleanup;
    }

    /*------------------------------------------------------------------------------------------*
     * Configure and initialize (allocate memory for static variables) the encoder
     *------------------------------------------------------------------------------------------*/
+0 −5
Original line number Diff line number Diff line
@@ -869,11 +869,6 @@ static ivas_error configureEncoder(
        return IVAS_ERROR( IVAS_ERR_DTX_NOT_SUPPORTED, "DTX is not supported in this IVAS format and element mode." );
    }

    if ( hEncoderConfig->ivas_format != MONO_FORMAT && hEncoderConfig->Opt_RF_ON )
    {
        return IVAS_ERROR( IVAS_ERR_NOT_IMPLEMENTED, "Channel-aware mode is not supported in IVAS yet." );
    }

    if ( hEncoderConfig->Opt_AGC_ON && !( hEncoderConfig->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR ) )
    {
        return IVAS_ERROR( IVAS_ERR_NOT_SUPPORTED_OPTION, "AGC supported in SBA format at bitrates >= 24.4 kbps only." );