Commit 7e7b102e authored by multrus's avatar multrus
Browse files

Merge remote-tracking branch 'origin/ivas-float-update' into 1640_ref_port-mr-1347-from-float

parents 62e399cc 5192d1d7
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -630,6 +630,13 @@ int main(
            fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
            goto cleanup;
        }
#ifdef CONF_DISTATT
        if ( ( error = RenderConfigReader_getDistanceAttenuation( renderConfigReader, renderConfig.distAtt ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Failed to get Distance Attenuation \n\n" );
            goto cleanup;
        }
#endif
        if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ||
               arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
+3 −1
Original line number Diff line number Diff line
@@ -325,7 +325,9 @@ typedef struct _IVAS_RENDER_CONFIG
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA roomAcoustics;
    ISAR_SPLIT_REND_CONFIG_DATA split_rend_config;
    float directivity[IVAS_MAX_NUM_OBJECTS * 3];

#ifdef CONF_DISTATT
    float distAtt[3];
#endif
} IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE;

typedef struct
+2 −0
Original line number Diff line number Diff line
@@ -185,6 +185,8 @@
#define NONBE_FIX_ISM_XOVER_BR                          /* FhG: issue 1072: select OSBA coding method depending on number of object and bitrate */
#define NONBE_FIX_984_OMASA_EXT_OUTPUT                  /* Nok: issue 1497 - porting OMASA EXT MR   */
#define NONBE_FIX_1028_1DB_TCX_LEVEL_DROP               /* VA: Harmonize the logic setting LP weighting factor between TCX encoder and TCX decoder */
#define CONF_DISTATT                                    /* Eri: Make distance attenuation configurable */
#define FIX_1052_EXT_OUTPUT                             /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */ 

/* #################### End BASOP porting switches ############################ */

+36 −4
Original line number Diff line number Diff line
@@ -1099,7 +1099,19 @@ ivas_error ivas_init_decoder(

    if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
    {
#ifdef FIX_1052_EXT_OUTPUT
        if ( st_ivas->ivas_format == STEREO_FORMAT )
        {
            hDecoderConfig->nchan_out = CPE_CHANNELS;
        }
        else if ( st_ivas->ivas_format == MC_FORMAT )
        {
            hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config );
        }
        else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
#else
        if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
#endif
        {
            hDecoderConfig->nchan_out = audioCfg2channels( IVAS_AUDIO_CONFIG_HOA3 );
            hDecoderConfig->nchan_out += st_ivas->nchan_ism;
@@ -1126,7 +1138,19 @@ ivas_error ivas_init_decoder(

    st_ivas->intern_config = output_config;

#ifdef FIX_1052_EXT_OUTPUT
    if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->ivas_format == MC_FORMAT )
    {
        ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->transport_config );
        st_ivas->intern_config = st_ivas->transport_config;
    }
    else
    {
        ivas_output_init( &( st_ivas->hOutSetup ), output_config );
    }
#else
    ivas_output_init( &( st_ivas->hOutSetup ), output_config );
#endif

    if ( st_ivas->ivas_format == SBA_ISM_FORMAT && output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
    {
@@ -3018,11 +3042,18 @@ static ivas_error doSanityChecks_IVAS(
    /* Verify stereo output configuration */
    if ( st_ivas->ivas_format == STEREO_FORMAT )
    {
#ifdef FIX_1052_EXT_OUTPUT
        if ( output_config != IVAS_AUDIO_CONFIG_MONO && output_config != IVAS_AUDIO_CONFIG_STEREO && output_config != IVAS_AUDIO_CONFIG_5_1 && output_config != IVAS_AUDIO_CONFIG_7_1 && output_config != IVAS_AUDIO_CONFIG_5_1_2 && output_config != IVAS_AUDIO_CONFIG_5_1_4 && output_config != IVAS_AUDIO_CONFIG_7_1_4 && output_config != IVAS_AUDIO_CONFIG_LS_CUSTOM && output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
#else
        if ( output_config != IVAS_AUDIO_CONFIG_MONO && output_config != IVAS_AUDIO_CONFIG_STEREO && output_config != IVAS_AUDIO_CONFIG_5_1 && output_config != IVAS_AUDIO_CONFIG_7_1 && output_config != IVAS_AUDIO_CONFIG_5_1_2 && output_config != IVAS_AUDIO_CONFIG_5_1_4 && output_config != IVAS_AUDIO_CONFIG_7_1_4 && output_config != IVAS_AUDIO_CONFIG_LS_CUSTOM )
#endif
        {
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Wrong output configuration specified for Stereo!" );
        }
    }
#ifdef FIX_1052_EXT_OUTPUT
    if ( output_config != IVAS_AUDIO_CONFIG_MONO && output_config != IVAS_AUDIO_CONFIG_STEREO && output_config != IVAS_AUDIO_CONFIG_5_1 && output_config != IVAS_AUDIO_CONFIG_7_1 && output_config != IVAS_AUDIO_CONFIG_5_1_2 && output_config != IVAS_AUDIO_CONFIG_5_1_4 && output_config != IVAS_AUDIO_CONFIG_7_1_4 && output_config != IVAS_AUDIO_CONFIG_LS_CUSTOM && output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
#else
    else if ( st_ivas->ivas_format == ISM_FORMAT )
    {
        /* Verify ISM output configuration */
@@ -3054,6 +3085,7 @@ static ivas_error doSanityChecks_IVAS(
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for Multi-channel" );
        }
    }
#endif

        if ( ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && output_Fs != 48000 )
        {
+4 −0
Original line number Diff line number Diff line
@@ -691,7 +691,11 @@ ivas_error ivas_jbm_dec_tc(
                /* Delay the separated channel to sync with CLDFB delay of the DirAC synthesis, and synthesize the LFE signal. */
                if ( output_config == IVAS_AUDIO_CONFIG_5_1 || output_config == IVAS_AUDIO_CONFIG_7_1 ||
                     output_config == IVAS_AUDIO_CONFIG_5_1_4 || output_config == IVAS_AUDIO_CONFIG_7_1_4 ||
#ifdef FIX_1052_EXT_OUTPUT
                     output_config == IVAS_AUDIO_CONFIG_5_1_2 || ( output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) || output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
#else
                     output_config == IVAS_AUDIO_CONFIG_5_1_2 || ( output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) )
#endif
                {
                    ivas_lfe_synth_with_filters( st_ivas->hMasa->hMasaLfeSynth, p_output, output_frame, n, LFE_CHANNEL );
                }
Loading