Commit ed96b070 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

fix errors after merge

parent 75208303
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@
/*#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_1419_SPATIAL_UMX                            /* FhG: issue 1419: enable spatial upmix for mono/stereo; configurable via renderer config */
#define FIX_1419_EXTREND                                /* FhG: issue 1419, 1xxx: enable rendering of mono/stereo to other formats in the external renderer */
#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.  */


+9 −0
Original line number Diff line number Diff line
@@ -1445,6 +1445,13 @@ ivas_error ivas_init_decoder(
        st_ivas->hOutSetup.output_config = st_ivas->intern_config;
        st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config );
    }
#ifdef FIX_1419_SPATIAL_UMX

    if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT )
    {
        st_ivas->transport_config = ( st_ivas->ivas_format == MONO_FORMAT ) ? IVAS_AUDIO_CONFIG_MONO : IVAS_AUDIO_CONFIG_STEREO;
    }
#endif

    /* Only initialize transport setup if it is used */
    if ( st_ivas->transport_config != IVAS_AUDIO_CONFIG_INVALID )
@@ -3336,11 +3343,13 @@ static ivas_error doSanityChecks_IVAS(
        return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified!" );
    }

#ifndef FIX_1419_SPATIAL_UMX
    if ( ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) &&
         ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified!" );
    }
#endif

    if ( ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && output_Fs != 48000 )
    {
+5 −2
Original line number Diff line number Diff line
@@ -88,10 +88,12 @@ void ivas_renderer_select(
                /* spatial rendering configuration */
                if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
                {
                    if ( st_ivas->hDecoderConfig->Opt_Headrotation )
                    *internal_config = IVAS_AUDIO_CONFIG_MONO;
                    if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation )
                    {
                        *internal_config = IVAS_AUDIO_CONFIG_7_1_4;
                    }

                    *renderer_type = RENDERER_BINAURAL_MIXER_CONV_ROOM;
                }
                else /* HRIR based formats and split rendering */
@@ -111,7 +113,8 @@ void ivas_renderer_select(
                /* spatial rendering configuration */
                if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
                {
                    if ( st_ivas->hDecoderConfig->Opt_Headrotation )
                    *internal_config = IVAS_AUDIO_CONFIG_STEREO;
                    if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation )
                    {
                        *internal_config = IVAS_AUDIO_CONFIG_7_1_4;
                    }
+8 −0
Original line number Diff line number Diff line
@@ -3221,6 +3221,14 @@ ivas_error IVAS_DEC_GetAcousticEnvironment(

    st_ivas = hIvasDec->st_ivas;

#ifdef FIX_1419_SPATIAL_UMX

    /* case when config file contains no acoustic environment, the defaults are already set from ROM */
    if ( aeID == IVAS_DEFAULT_AEID && st_ivas->acousticEnvironmentsCount == 0 )
    {
        return IVAS_ERR_OK;
    }
#endif
    /* In case of default AE ID, select the first one available */
    if ( aeID == IVAS_DEFAULT_AEID && st_ivas->acousticEnvironmentsCount > 0 )
    {
+8 −8
Original line number Diff line number Diff line
@@ -1262,7 +1262,7 @@ static bool isIoConfigPairSupported(
    const AUDIO_CONFIG inConfig,
    const AUDIO_CONFIG outConfig )
{
#ifdef FIX_1419_EXTREND
#ifdef FIX_1466_EXTREND
    (void) inConfig;  // TODO tmp
    (void) outConfig; // TODO tmp
#else
@@ -2213,13 +2213,13 @@ static ivas_error updateMcPanGainsForAmbiOut(
{
    int16_t ch_in, ch_out, lfeIdx;
    int16_t numNonLfeInChannels, outAmbiOrder;
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1466_EXTREND
    AUDIO_CONFIG inConfig;
#endif
    const float *spkAzi, *spkEle;
    ivas_error error;

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

#endif
@@ -2228,7 +2228,7 @@ static ivas_error updateMcPanGainsForAmbiOut(
        return error;
    }

#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1466_EXTREND
    if ( inConfig == IVAS_AUDIO_CONFIG_MONO ||
         inConfig == IVAS_AUDIO_CONFIG_STEREO )
    {
@@ -2309,7 +2309,7 @@ static ivas_error updateMcPanGainsForAmbiOut(
    return IVAS_ERR_OK;
}

#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1466_EXTREND
static ivas_error updateMcPanGainsForBinauralOut(
    input_mc *inputMc,
    const AUDIO_CONFIG outConfig )
@@ -2353,7 +2353,7 @@ static ivas_error updateMcPanGains(
            error = updateMcPanGainsForAmbiOut( inputMc, outConfig );
            break;
        case IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL:
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1466_EXTREND
            if ( inputMc->base.inConfig == IVAS_AUDIO_CONFIG_MONO || inputMc->base.inConfig == IVAS_AUDIO_CONFIG_STEREO )
            {
                error = updateMcPanGainsForBinauralOut( inputMc, outConfig );
@@ -6315,7 +6315,7 @@ static ivas_error renderActiveInputsIsm(
    return IVAS_ERR_OK;
}

#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1466_EXTREND
static void renderMonoStereoToBinaural(
    const input_mc *mcInput,
    const AUDIO_CONFIG outConfig,
@@ -6937,7 +6937,7 @@ static ivas_error renderInputMc(
            renderMcToSba( mcInput, outAudio );
            break;
        case IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL:
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1466_EXTREND
            if ( mcInput->base.inConfig == IVAS_AUDIO_CONFIG_MONO || mcInput->base.inConfig == IVAS_AUDIO_CONFIG_STEREO )
            {
                renderMonoStereoToBinaural( mcInput, outConfig, outAudio );
Loading