Commit 157c9a6f authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_501_TABLE_IDX_INIT

parent 4e7d890b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -147,7 +147,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */

#define FIX_196_REFACTOR_RENDERER_OUTPUT_CONFIG         /* Phi: issue 196 - refactoring renderer output configuration */
#define FIX_501_TABLE_IDX_INIT                          /* Dlb: Fix for the issue 501 */
#define FIX_506_WARNINGS                                /* FhG/Eri/Dlb/VA: Issue 508, Warnings on MacOS */
#define FIX_296_CFG_LFE_SCENE_DESC                       /* FhG: Fix issue 296 - add configurable LFE handling to the scene description file */
#define FIX_519_JBM_ACCESS_NULL_TC_BUFFER               /* FhG: fix issue 519, accessing a yet uninitialized TC Buffer in frame 0*/
+0 −4
Original line number Diff line number Diff line
@@ -119,14 +119,10 @@ ivas_error ivas_spar_dec_open(
        return error;
    }
    hSpar->hMdDec->td_decorr_flag = 1;
#ifdef FIX_501_TABLE_IDX_INIT
    if ( hSpar->hTdDecorr )
    {
        hSpar->hTdDecorr->ducking_flag = ivas_spar_br_table_consts[hSpar->hMdDec->table_idx].td_ducking;
    }
#else
    hSpar->hMdDec->table_idx = -1;
#endif

    /* set FB config. */
    active_w_mixing = -1;
+0 −33
Original line number Diff line number Diff line
@@ -84,11 +84,7 @@ static void ivas_parse_parameter_bitstream_dtx( ivas_spar_md_t *pSpar_md, Decode

static ivas_error ivas_deindex_real_index( const int16_t *index, const int16_t q_levels, const float min_value, const float max_value, float *quant, const int16_t num_ch_dim2 );

#ifdef FIX_501_TABLE_IDX_INIT
static void ivas_spar_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode, const int32_t last_active_brate );
#else
static void ivas_spar_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode );
#endif


/*-------------------------------------------------------------------------
@@ -292,7 +288,6 @@ ivas_error ivas_spar_md_dec_open(
        return error;
    }

#ifdef FIX_501_TABLE_IDX_INIT
    if ( hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 )
    {
        if ( sid_format == SID_SBA_2TC )
@@ -308,13 +303,6 @@ ivas_error ivas_spar_md_dec_open(
    {
        hMdDec->table_idx = ivas_get_spar_table_idx( hDecoderConfig->ivas_total_brate, sba_order, SPAR_CONFIG_BW, NULL, NULL );
    }
#else
    hMdDec->table_idx = 0; /* just to initialize state variables*/
    if ( ( hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) && ( sid_format == SID_SBA_2TC ) )
    {
        hMdDec->table_idx = ivas_get_spar_table_idx( IVAS_48k, sba_order, SPAR_CONFIG_BW, NULL, NULL );
    }
#endif
    if ( ( error = ivas_spar_md_dec_init( hMdDec, hDecoderConfig, num_channels, sba_order ) ) != IVAS_ERR_OK )
    {
        return error;
@@ -688,10 +676,8 @@ void ivas_spar_md_dec_process(

    ivas_spar_dec_parse_md_bs( hMdDec, st0, &nB, &bw, &dtx_vad, st_ivas->hDecoderConfig->ivas_total_brate,
                               ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, st_ivas->hQMetaData->sba_inactive_mode
#ifdef FIX_501_TABLE_IDX_INIT
                               ,
                               st_ivas->last_active_ivas_total_brate
#endif
    );

#if 0
@@ -1715,10 +1701,8 @@ static void ivas_spar_dec_parse_md_bs(
    const int32_t ivas_total_brate,
    const int16_t use_planar_coeff,
    const int16_t sba_inactive_mode
#ifdef FIX_501_TABLE_IDX_INIT
    ,
    const int32_t last_active_brate
#endif
)
{
    int16_t i, j, k, num_bands;
@@ -1730,9 +1714,7 @@ static void ivas_spar_dec_parse_md_bs(
    int16_t planarCP;
    float quant[IVAS_SPAR_MAX_C_COEFF];
    int16_t do_repeat[IVAS_MAX_NUM_BANDS];
#ifdef FIX_501_TABLE_IDX_INIT
    int16_t bw_final, bw_fact;
#endif

    *dtx_vad = 1;
    *bands_bw = 1;
@@ -1805,7 +1787,6 @@ static void ivas_spar_dec_parse_md_bs(

        ivas_parse_parameter_bitstream_dtx( &hMdDec->spar_md, st0, *bands_bw, *nB, hMdDec->spar_md_cfg.num_dmx_chans_per_band, hMdDec->spar_md_cfg.num_decorr_per_band );

#ifdef FIX_501_TABLE_IDX_INIT
        if ( last_active_brate >= IVAS_24k4 )
        {
            bw_final = 1;
@@ -1815,23 +1796,14 @@ static void ivas_spar_dec_parse_md_bs(
            bw_final = 2;
        }
        bw_fact = *bands_bw / bw_final;
#endif

        for ( i = *nB - 1; i >= 0; i-- )
        {
#ifdef FIX_501_TABLE_IDX_INIT
            ndec = hMdDec->spar_md_cfg.num_decorr_per_band[bw_fact * i];

            for ( b = bw_fact - 1; b >= 0; b-- )
            {
                idx = i * bw_fact + b;
#else
            ndec = hMdDec->spar_md_cfg.num_decorr_per_band[( *bands_bw ) * i];

            for ( b = *bands_bw - 1; b >= 0; b-- )
            {
                idx = i * *bands_bw + b;
#endif
                for ( j = 0; j < FOA_CHANNELS - 1; j++ )
                {
                    hMdDec->spar_md.band_coeffs[idx].pred_re[j] = hMdDec->spar_md.band_coeffs[i].pred_re[j];
@@ -1844,13 +1816,8 @@ static void ivas_spar_dec_parse_md_bs(
            }
        }

#ifdef FIX_501_TABLE_IDX_INIT
        *bands_bw = bw_final;
        *nB = num_bands / bw_final;
#else
        *nB = num_bands;
        *bands_bw = 1;
#endif

        return;
    }