Commit 61e87047 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_372_LIB_REND_VALIDATE_IO

parent ad24c98c
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -86,9 +86,7 @@ typedef enum
    IVAS_ERR_ISM_FILE_READER_INVALID_METADATA_FORMAT,
    IVAS_ERR_ISM_INVALID_METADATA_VALUE,
    IVAS_ERR_INVALID_MASA_FORMAT_METADATA_FILE,
#ifdef FIX_372_LIB_REND_VALIDATE_IO
    IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED,
#endif
#ifdef DEBUGGING
    IVAS_ERR_INVALID_FORCE_MODE,
#ifdef DEBUG_AGC_ENCODER_CMD_OPTION
@@ -169,10 +167,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Wrong number of channels";
        case IVAS_ERR_INVALID_BUFFER_SIZE:
            return "Invalid buffer size";
#ifdef FIX_372_LIB_REND_VALIDATE_IO
        case IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED:
            return "Unsupported input/output config pair";
#endif
        case IVAS_ERR_FAILED_FILE_OPEN:
            return "File open error";
        case IVAS_ERR_FAILED_FILE_WRITE:
+0 −1
Original line number Diff line number Diff line
@@ -149,7 +149,6 @@
#define BINAURALIZATION_DELAY_REPORT                    /* VA: Issue 255 - Changes the way the decoder delay is reported */
#define TUNE_360_OBJECT_WITH_NOISE                      /* VA: issue 360: consider objects being speech+noise for active speech coding */
#define FIX_350_MASA_DELAY_COMP                         /* Nokia: Issue 350: MASA audio/meta delay compensation */
#define FIX_372_LIB_REND_VALIDATE_IO                    /* FhG: Issue 372: IVAS_rend segfaults with unsupported I/O configs - add validation checks of I/O config */

#define FIX_376_SBA_ROTATE                             /*DLB: Fix for issue 376*/

+0 −10
Original line number Diff line number Diff line
@@ -1030,7 +1030,6 @@ static CREND_WRAPPER defaultCrendWrapper(
    return w;
}

#ifdef FIX_372_LIB_REND_VALIDATE_IO
static bool isIoConfigPairSupported( IVAS_REND_AudioConfig inConfig, IVAS_REND_AudioConfig outConfig )
{
    /* Rendering mono or stereo to binaural is not supported */
@@ -1043,7 +1042,6 @@ static bool isIoConfigPairSupported( IVAS_REND_AudioConfig inConfig, IVAS_REND_A
    /* If not returned so far, config pair is supported */
    return true;
}
#endif

static ivas_error setRendInputActiveIsm(
    void *input,
@@ -1060,12 +1058,10 @@ static ivas_error setRendInputActiveIsm(
    rendCtx = inputIsm->base.ctx;
    outConfig = *rendCtx.pOutConfig;

#ifdef FIX_372_LIB_REND_VALIDATE_IO
    if ( !isIoConfigPairSupported( inConfig, outConfig ) )
    {
        return IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED;
    }
#endif

    initRendInputBase( &inputIsm->base, inConfig, id, rendCtx );

@@ -1916,12 +1912,10 @@ static ivas_error setRendInputActiveMc(
    rendCtx = inputMc->base.ctx;
    outConfig = *rendCtx.pOutConfig;

#ifdef FIX_372_LIB_REND_VALIDATE_IO
    if ( !isIoConfigPairSupported( inConfig, outConfig ) )
    {
        return IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED;
    }
#endif

    initRendInputBase( &inputMc->base, inConfig, id, rendCtx );
    setZeroPanMatrix( inputMc->panGains );
@@ -2150,12 +2144,10 @@ static ivas_error setRendInputActiveSba(
    rendCtx = inputSba->base.ctx;
    outConfig = *rendCtx.pOutConfig;

#ifdef FIX_372_LIB_REND_VALIDATE_IO
    if ( !isIoConfigPairSupported( inConfig, outConfig ) )
    {
        return IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED;
    }
#endif

    initRendInputBase( &inputSba->base, inConfig, id, rendCtx );
    setZeroPanMatrix( inputSba->hoaDecMtx );
@@ -2519,12 +2511,10 @@ static ivas_error setRendInputActiveMasa(
    outConfig = *rendCtx.pOutConfig;
    (void) hRendCfg; /* Suppress warning */

#ifdef FIX_372_LIB_REND_VALIDATE_IO
    if ( !isIoConfigPairSupported( inConfig, outConfig ) )
    {
        return IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED;
    }
#endif

    initRendInputBase( &inputMasa->base, inConfig, id, rendCtx );