Commit 484240f3 authored by vaclav's avatar vaclav
Browse files

remove FIX_1052_EXT_OUTPUT_SBA

parent f5c9d812
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -158,7 +158,6 @@

#define FIX_NUM_SUBFRAME_UPDATE
#define FIX_1052_EXT_OUTPUT                             /* issue 1052: define EXT decoder output configuration for all IVAS formats */ 
#define FIX_1052_EXT_OUTPUT_SBA

#define FIX_1053_REVERB_RECONFIGURATION                 /* Philips: issue 1053: fix for dynamic switching of acoustic environment */

+0 −55
Original line number Diff line number Diff line
@@ -59,10 +59,6 @@ static ivas_error ivas_read_format( Decoder_Struct *st_ivas, int16_t *num_bits_r

static ivas_error doSanityChecks_IVAS( Decoder_Struct *st_ivas );

#ifdef FIX_1052_EXT_OUTPUT_SBA
static AUDIO_CONFIG ivas_set_audio_config_from_sba_order( const int16_t sba_order );

#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
static ivas_error ivas_dec_reconfig_split_rend( Decoder_Struct *st_ivas );

@@ -1152,12 +1148,6 @@ ivas_error ivas_init_decoder(
        {
            hDecoderConfig->nchan_out = audioCfg2channels( st_ivas->transport_config );
        }
#ifdef FIX_1052_EXT_OUTPUT_SBA
        else if ( st_ivas->ivas_format == SBA_FORMAT )
        {
            hDecoderConfig->nchan_out = audioCfg2channels( ivas_set_audio_config_from_sba_order( st_ivas->sba_order ) );
        }
#endif
        else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
#else
        if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
@@ -1190,13 +1180,6 @@ ivas_error ivas_init_decoder(
        ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->transport_config );
        st_ivas->intern_config = st_ivas->transport_config;
    }
#ifdef FIX_1052_EXT_OUTPUT_SBA
    else if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->ivas_format == SBA_FORMAT )
    {
        st_ivas->intern_config = ivas_set_audio_config_from_sba_order( st_ivas->sba_order );
        ivas_output_init( &( st_ivas->hOutSetup ), st_ivas->intern_config );
    }
#endif
    else
    {
        ivas_output_init( &( st_ivas->hOutSetup ), output_config );
@@ -1426,11 +1409,7 @@ ivas_error ivas_init_decoder(
            return error;
        }

#ifdef FIX_1052_EXT_OUTPUT_SBA
        if ( output_config != IVAS_AUDIO_CONFIG_FOA && output_config != IVAS_AUDIO_CONFIG_STEREO && output_config != IVAS_AUDIO_CONFIG_MONO && !( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA ) )
#else
        if ( hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_FOA && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_STEREO && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_MONO )
#endif
        {
            if ( ( error = ivas_dirac_dec_config( st_ivas, DIRAC_OPEN ) ) != IVAS_ERR_OK )
            {
@@ -3239,37 +3218,3 @@ static ivas_error doSanityChecks_IVAS(

    return IVAS_ERR_OK;
}


#ifdef FIX_1052_EXT_OUTPUT_SBA
/*-------------------------------------------------------------------*
 * ivas_set_audio_config_from_sba_order()
 *
 *
 *-------------------------------------------------------------------*/

/*! r: audio configuration */
static AUDIO_CONFIG ivas_set_audio_config_from_sba_order(
    const int16_t sba_order /* i  : Ambisonic (SBA) order   */
)
{
    AUDIO_CONFIG audio_config;

    switch ( sba_order )
    {
        case SBA_FOA_ORDER:
            audio_config = IVAS_AUDIO_CONFIG_FOA;
            break;
        case SBA_HOA2_ORDER:
            audio_config = IVAS_AUDIO_CONFIG_HOA2;
            break;
        case SBA_HOA3_ORDER:
            audio_config = IVAS_AUDIO_CONFIG_HOA3;
            break;
        default:
            audio_config = IVAS_AUDIO_CONFIG_INVALID;
    }

    return audio_config;
}
#endif
+0 −8
Original line number Diff line number Diff line
@@ -346,15 +346,7 @@ void ivas_renderer_select(

        if ( ivas_format == SBA_FORMAT && ( output_config != IVAS_AUDIO_CONFIG_5_1 && output_config != IVAS_AUDIO_CONFIG_5_1_2 && output_config != IVAS_AUDIO_CONFIG_5_1_4 && output_config != IVAS_AUDIO_CONFIG_7_1 && output_config != IVAS_AUDIO_CONFIG_7_1_4 && output_config != IVAS_AUDIO_CONFIG_LS_CUSTOM && output_config != IVAS_AUDIO_CONFIG_MONO && output_config != IVAS_AUDIO_CONFIG_STEREO ) )
        {
#ifdef FIX_1052_EXT_OUTPUT_SBA
            if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
            {
                /* 'internal_config' was already set in ivas_set_audio_config_from_sba_order() */
            }
            else if ( output_config == IVAS_AUDIO_CONFIG_HOA2 || output_config == IVAS_AUDIO_CONFIG_FOA )
#else
            if ( output_config == IVAS_AUDIO_CONFIG_HOA2 || output_config == IVAS_AUDIO_CONFIG_FOA )
#endif
            {
                *internal_config = output_config;
            }
+0 −12
Original line number Diff line number Diff line
@@ -1556,11 +1556,7 @@ void ivas_spar_dec_upmixer_sf(
        }
    }

#ifdef FIX_1052_EXT_OUTPUT_SBA
    if ( hDecoderConfig->ivas_total_brate < IVAS_24k4 && ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) )
#else
    if ( ( hDecoderConfig->ivas_total_brate < IVAS_24k4 ) && ( ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_HOA2 ) || ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_HOA3 ) ) )
#endif
    {
        ivas_spar_calc_smooth_facs( cldfb_in_ts_re[0], cldfb_in_ts_im[0], num_spar_bands, hSpar->subframe_nbslots[hSpar->subframes_rendered], hSpar->subframes_rendered == 0, &hSpar->hFbMixer->pFb->fb_bin_to_band, hSpar->hMdDec->smooth_fac, hSpar->hMdDec->smooth_buf );
    }
@@ -1570,11 +1566,7 @@ void ivas_spar_dec_upmixer_sf(
        md_idx = hSpar->render_to_md_map[ts + slot_idx_start];
        ivas_spar_get_parameters( hSpar, hDecoderConfig, md_idx, numch_out, numch_in, num_spar_bands, mixer_mat );

#ifdef FIX_1052_EXT_OUTPUT_SBA
        if ( hDecoderConfig->ivas_total_brate < IVAS_24k4 && ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) )
#else
        if ( ( hDecoderConfig->ivas_total_brate < IVAS_24k4 ) && ( ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_HOA2 ) || ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_HOA3 ) ) )
#endif
        {
            for ( spar_band = 0; spar_band < num_spar_bands; spar_band++ )
            {
@@ -1663,11 +1655,7 @@ void ivas_spar_dec_upmixer_sf(
        }
    }

#ifdef FIX_1052_EXT_OUTPUT_SBA
    if ( hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_FOA && hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_STEREO && hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_MONO && !( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA ) )
#else
    if ( hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_FOA && hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_STEREO && hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_MONO )
#endif
    {
        ivas_dirac_dec_render_sf( st_ivas, output, nchan_internal, cldfb_in_ts_re, cldfb_in_ts_im );
    }