Commit a391a243 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1052_EXT_OUTPUT

parent 080fb8a9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@

/* #################### Start BASOP porting switches ############################ */

#define FIX_1052_EXT_OUTPUT                             /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */
#define NONBE_1215_FIX_JBM_MAX_SCALING                  /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */
#define NONBE_FIX_991_PARAMBIN_BINARY_HRTF              /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */
#define FIX_1050_EFAP_ALLOC                             /* FhG: issue 1050: reduction of memory allocated to EFAP handle */
+0 −47
Original line number Diff line number Diff line
@@ -1618,7 +1618,6 @@ ivas_error ivas_init_decoder_fx(
    IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
    {
        test();
#ifdef FIX_1052_EXT_OUTPUT
        IF( EQ_32( st_ivas->ivas_format, STEREO_FORMAT ) )
        {
            hDecoderConfig->nchan_out = CPE_CHANNELS;
@@ -1631,9 +1630,6 @@ ivas_error ivas_init_decoder_fx(
        ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) || EQ_32( st_ivas->ivas_format, SBA_FORMAT ) )
#else
        ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
#endif
#else
        IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
#endif
        {
#ifdef NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER
@@ -1669,7 +1665,6 @@ ivas_error ivas_init_decoder_fx(

    test();
    test();
#ifdef FIX_1052_EXT_OUTPUT
    IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && EQ_32( st_ivas->ivas_format, MC_FORMAT ) )
    {
        ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->transport_config );
@@ -1691,9 +1686,6 @@ ivas_error ivas_init_decoder_fx(
    {
        ivas_output_init( &( st_ivas->hOutSetup ), output_config );
    }
#else
    ivas_output_init( &( st_ivas->hOutSetup ), output_config );
#endif

    test();
    IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) )
@@ -4003,17 +3995,12 @@ static ivas_error doSanityChecks_IVAS(
        test();
        test();
        test();
#ifdef FIX_1052_EXT_OUTPUT
        test();
        IF( NE_32( output_config, IVAS_AUDIO_CONFIG_MONO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && NE_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#else
        IF( NE_32( output_config, IVAS_AUDIO_CONFIG_MONO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) && NE_32( 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
    /* Verify output configuration for other formats */
    ELSE
    {
@@ -4022,40 +4009,6 @@ static ivas_error doSanityChecks_IVAS(
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified!" );
        }
    }
#else
    ELSE IF( EQ_32( st_ivas->ivas_format, ISM_FORMAT ) )
    {
        /* Verify ISM output configuration */
        IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_INVALID ) )
        {
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for ISM" );
        }
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, SBA_FORMAT ) )
    {
        /* Verify SBA output coniguration */
        IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_INVALID ) )
        {
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for SBA" );
        }
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, MASA_FORMAT ) )
    {
        IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_INVALID ) )
        {
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for MASA!" );
        }
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, MC_FORMAT ) )
    {
        /* Verify MC output configuration */
        test();
        IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_INVALID ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
        {
            return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified for Multi-channel" );
        }
    }
#endif

    IF( ( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) && NE_32( output_Fs, 48000 ) )
    {
+0 −6
Original line number Diff line number Diff line
@@ -1316,16 +1316,10 @@ ivas_error ivas_jbm_dec_tc_fx(
                test();
                test();
                test();
#ifdef FIX_1052_EXT_OUTPUT
                test();
                /* Delay the separated channel to sync with CLDFB delay of the DirAC synthesis, and synthesize the LFE signal. */
                IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) ||
                    EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) || ( EQ_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && st_ivas->hOutSetup.num_lfe > 0 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#else
                /* Delay the separated channel to sync with CLDFB delay of the DirAC synthesis, and synthesize the LFE signal. */
                IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) ||
                    EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) || ( EQ_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && st_ivas->hOutSetup.num_lfe > 0 ) )
#endif
                {
                    ivas_lfe_synth_with_filters_fx( st_ivas->hMasa->hMasaLfeSynth, p_output_fx, output_frame, n, LFE_CHANNEL );
                }
+0 −18
Original line number Diff line number Diff line
@@ -572,13 +572,9 @@ ivas_error ivas_masa_decode_fx(
        hMasa->config.coherencePresent = !hQMetaData->all_coherence_zero;
        move16();

#ifdef FIX_1052_EXT_OUTPUT
        test();
        test();
        IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && ( EQ_32( ivas_format, MASA_FORMAT ) || EQ_32( ivas_format, MASA_ISM_FORMAT ) ) )
#else
        IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#endif
        {
            index_16bits_fx( hQMetaData, hMasa->data.sph_grid16 );
        }
@@ -867,13 +863,9 @@ ivas_error ivas_masa_dec_open_fx(
    move16();

    /* Create spherical grid only for external output */
#ifdef FIX_1052_EXT_OUTPUT
    test();
    test();
    IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && ( EQ_32( st_ivas->ivas_format, MASA_FORMAT ) || EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) )
#else
    IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#endif
    {
        IF( ( hMasa->data.sph_grid16 = (SPHERICAL_GRID_DATA *) malloc( sizeof( SPHERICAL_GRID_DATA ) ) ) == NULL )
        {
@@ -1409,7 +1401,6 @@ static ivas_error init_lfe_synth_data_fx(
    test();
    test();
    test();
#ifdef FIX_1052_EXT_OUTPUT
    test();
    IF( st_ivas->hOutSetup.separateChannelEnabled &&
        ( EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_7_1 ) ||
@@ -1419,15 +1410,6 @@ static ivas_error init_lfe_synth_data_fx(
          EQ_16( output_config, IVAS_AUDIO_CONFIG_FOA ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_HOA2 ) ||
          EQ_16( output_config, IVAS_AUDIO_CONFIG_HOA3 ) ||
          ( EQ_16( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && ( st_ivas->hOutSetup.num_lfe > 0 ) ) ) )
#else
    IF( st_ivas->hOutSetup.separateChannelEnabled &&
        ( EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_7_1 ) ||
          EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) ||
          EQ_16( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) ||
          EQ_16( output_config, IVAS_AUDIO_CONFIG_FOA ) || EQ_16( output_config, IVAS_AUDIO_CONFIG_HOA2 ) ||
          EQ_16( output_config, IVAS_AUDIO_CONFIG_HOA3 ) ||
          ( EQ_16( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && ( st_ivas->hOutSetup.num_lfe > 0 ) ) ) )
#endif
    {
        Word16 bufferSize;
        Word16 i;
+0 −4
Original line number Diff line number Diff line
@@ -165,11 +165,7 @@ ivas_error ivas_param_mc_dec_open_fx(
    test();
    test();
    test();
#ifdef FIX_1052_EXT_OUTPUT
    IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_OBJECTS_TD ) || EQ_32( st_ivas->transport_config, output_config ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
#else
    IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_OBJECTS_TD ) || EQ_32( st_ivas->transport_config, output_config ) )
#endif
    {
        hParamMC->synthesis_conf = PARAM_MC_SYNTH_DIRECT;
        move32();
Loading