Commit 3ed731f8 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1466_EXTREND

parent a0e2f973
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -161,7 +161,6 @@

/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define FIX_1466_EXTREND                                /* FhG: issue 1466: enable rendering of mono/stereo to other formats in the external renderer */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER /* FhG: fix CLANG18 MSAN error in decoder init */
#define FIX_1481_CLANG18_MSAN_INIT_LAST_ELEM_BRATE      /* FhG: initialize last_element_brate to avoid CLANG18 MSAN complaint */
+0 −26
Original line number Diff line number Diff line
@@ -1268,7 +1268,6 @@ static bool isIoConfigPairSupported(
    const AUDIO_CONFIG inConfig,
    const AUDIO_CONFIG outConfig )
{
#ifdef FIX_1466_EXTREND
    /* input config cannot be binaural */
    if ( ( getAudioConfigType( inConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL ) &&
         ( inConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && inConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
@@ -1281,13 +1280,6 @@ static bool isIoConfigPairSupported(
    {
        return false;
    }
#else
    /* Rendering mono or stereo to binaural is not supported */
    if ( ( inConfig == IVAS_AUDIO_CONFIG_MONO || inConfig == IVAS_AUDIO_CONFIG_STEREO ) && getAudioConfigType( outConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL )
    {
        return false;
    }
#endif

    /* If not returned so far, config pair is supported */
    return true;
@@ -2229,22 +2221,17 @@ static ivas_error updateMcPanGainsForAmbiOut(
{
    int16_t ch_in, ch_out, lfeIdx;
    int16_t numNonLfeInChannels, outAmbiOrder;
#ifdef FIX_1466_EXTREND
    AUDIO_CONFIG inConfig;
#endif
    const float *spkAzi, *spkEle;
    ivas_error error;

#ifdef FIX_1466_EXTREND
    inConfig = inputMc->base.inConfig;

#endif
    if ( ( error = getAmbisonicsOrder( outConfig, &outAmbiOrder ) ) != IVAS_ERR_OK )
    {
        return error;
    }

#ifdef FIX_1466_EXTREND
    if ( inConfig == IVAS_AUDIO_CONFIG_MONO ||
         inConfig == IVAS_AUDIO_CONFIG_STEREO )
    {
@@ -2267,9 +2254,6 @@ static ivas_error updateMcPanGainsForAmbiOut(
        return IVAS_ERR_OK;
    }
    else if ( inConfig != IVAS_AUDIO_CONFIG_LS_CUSTOM )
#else
    if ( inputMc->base.inConfig != IVAS_AUDIO_CONFIG_LS_CUSTOM )
#endif
    {
        if ( ( error = getNumNonLfeChannelsInSpeakerLayout( inputMc->base.inConfig, &numNonLfeInChannels ) ) != IVAS_ERR_OK )
        {
@@ -2325,7 +2309,6 @@ static ivas_error updateMcPanGainsForAmbiOut(
    return IVAS_ERR_OK;
}

#ifdef FIX_1466_EXTREND
static ivas_error updateMcPanGainsForBinauralOut(
    input_mc *inputMc )
{
@@ -2344,7 +2327,6 @@ static ivas_error updateMcPanGainsForBinauralOut(

    return IVAS_ERR_OK;
}
#endif

static ivas_error updateMcPanGains(
    input_mc *inputMc,
@@ -2366,7 +2348,6 @@ static ivas_error updateMcPanGains(
            error = updateMcPanGainsForAmbiOut( inputMc, outConfig );
            break;
        case IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL:
#ifdef FIX_1466_EXTREND
            if ( inputMc->base.inConfig == IVAS_AUDIO_CONFIG_MONO || inputMc->base.inConfig == IVAS_AUDIO_CONFIG_STEREO )
            {
                error = updateMcPanGainsForBinauralOut( inputMc );
@@ -2374,7 +2355,6 @@ static ivas_error updateMcPanGains(
            }

            /* not mono or stereo */
#endif
            switch ( outConfig )
            {
                case IVAS_AUDIO_CONFIG_BINAURAL:
@@ -2433,13 +2413,11 @@ static ivas_error initMcBinauralRendering(
    int32_t binauralDelayNs;
    int32_t outSampleRate;
    int8_t useTDRend;
#ifdef FIX_1466_EXTREND

    if ( inputMc->base.inConfig == IVAS_AUDIO_CONFIG_MONO || inputMc->base.inConfig == IVAS_AUDIO_CONFIG_STEREO )
    {
        return IVAS_ERR_OK;
    }
#endif

    /* Allocate TD binaural renderer for custom loudspeaker layouts (regardless of headrotation)
      or planar MC layouts with headrotation, CREND for the rest */
@@ -6354,7 +6332,6 @@ static ivas_error renderActiveInputsIsm(
    return IVAS_ERR_OK;
}

#ifdef FIX_1466_EXTREND
static void renderMonoStereoToBinaural(
    const input_mc *mcInput,
    IVAS_REND_AudioBuffer outAudio )
@@ -6374,7 +6351,6 @@ static void renderMonoStereoToBinaural(

    return;
}
#endif

static ivas_error renderLfeToBinaural(
    const input_mc *mcInput,
@@ -6975,7 +6951,6 @@ static ivas_error renderInputMc(
            renderMcToSba( mcInput, outAudio );
            break;
        case IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL:
#ifdef FIX_1466_EXTREND
            if ( mcInput->base.inConfig == IVAS_AUDIO_CONFIG_MONO || mcInput->base.inConfig == IVAS_AUDIO_CONFIG_STEREO )
            {
                renderMonoStereoToBinaural( mcInput, outAudio );
@@ -6983,7 +6958,6 @@ static ivas_error renderInputMc(
            }

            /* not mono or stereo */
#endif
            switch ( outConfig )
            {
                case IVAS_AUDIO_CONFIG_BINAURAL: