Commit 7bc3e364 authored by vaclav's avatar vaclav
Browse files

accept switches from #637

parent 84c744e6
Loading
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -318,11 +318,7 @@ typedef enum
#define MIN_BRATE_SWB_SCE                       ACELP_9k60                  /* min. SCE bitrate where SWB is supported */
#define MIN_BRATE_SWB_STEREO                    IVAS_13k2                   /* min. stereo bitrate where SWB is supported */
#define MIN_BRATE_FB_STEREO                     IVAS_32k                    /* min. SCE and stereo bitrate where FB is supported */
#ifdef ISM_FB_16k4
#define MIN_BRATE_FB_ISM                        16000                       /* min. SCE bitrate where FB is supported in ISM format */
#else
#define MIN_BRATE_FB_ISM                        24000                       /* min. SCE bitrate where FB is supported in ISM format */
#endif

#define MIN_TDM_BRATE_WB_TBE_1k05               12000                       /* min. per channel bitrate where WB TBE @1.05 kbps is supported (0.35kbs at lower bitrates) */
#define MIN_BRATE_WB_TBE_1k05                   9650                        /* min. per channel bitrate where WB TBE @1.05 kbps is supported (0.35kbs at lower bitrates) */
@@ -1678,22 +1674,13 @@ typedef enum
typedef enum
{
    TDREND_POSTYPE_ABSOLUTE,                                                /* The source position is in absolute coordinates  */
#ifdef FIX_550_FIRST_FRAME_ACCESS_ALT
    TDREND_POSTYPE_NON_DIEGETIC                                             /* The source position is non-diegetic */
#else
    TDREND_POSTYPE_RELATIVE_TO_LISTENER                                     /* The source position is relative to the listener */
#endif
} TDREND_PosType_t;

typedef enum
{
    TDREND_PLAYSTATUS_INITIAL,
#ifndef FIX_550_FIRST_FRAME_ACCESS_ALT
    TDREND_PLAYSTATUS_PLAYING,
    TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC
#else
    TDREND_PLAYSTATUS_PLAYING
#endif
} TDREND_PlayStatus_t;

typedef enum
+0 −15
Original line number Diff line number Diff line
@@ -159,25 +159,10 @@
#define FIX_571_REVERB_NOT_ACTIVATED_ISM                /* Philips: Issue 571: Reverb not activated for discrete and parametric ISM */
#define FIX_QMETA_SID_5k2                               /* Nokia: Issue 137: enable using full 5.2k bitrate in MASA SID */

#define FIX_578_PARAMMC_ILD_BS                          /* FhG: Issue 578: transmitt also center ILD in band 0 when LFE is active in 3TC ParamMC */
#define FIX_UNCLR_ISSUE                                 /* VoiceAge: issue 574: Fix UNCLR mis-classifications in noisy speech stereo */
#define FIX_TCX_LOWRATE_LIMITATION                      /* VA: issue 577: TCX bitrate limitation only when DEBUGGING is active */
#define FIX_575_LOW_OVERLAP_PLC_RECOVERY                /* FhG: Issue 575 fix for PLC and transistion to TCX5*/

#define FIX_488_SYNC_DELAY                             /* Eri: Issue 488: Waveform and MD desynchronized in external renderer */

#define FIX_550_FIRST_FRAME_ACCESS                      /* Eri: Issue 550: TD Object renderer: first frame accesses wrong transport channel offsets */
#define FIX_550_FIRST_FRAME_ACCESS_ALT                  /* Eri: Issue 550: Should be merged with FIX_550_FIRST_FRAME_ACCESS above, or accepted at the same time */
#define FIX_569_TD_FILTER_LENGTH                        /* Eri: Issue 569: If an HRTF binary file exceeds the SFX_SPAT_BIN_MAX_FILTER_LENGTH the decoder crashes. This truncates the filter when generated from the model.  */

#define ISM_FB_16k4                                     /* VA: Issue: 579: change BW from SWB to FB in NxISM conditions to match the EVS codec */

#define FIX_580_PARAMMC_ENER_BURSTS                     /* FhG: issue 580: energy bursts due to ILD holding when energy relations change too much */

#define FIX_550_FIRST_FRAME_ACCESS                      /* Eri: Issue 550: TD Object renderer: first frame accesses wrong transport channel offsets */
#define FIX_550_FIRST_FRAME_ACCESS_ALT                  /* Eri: Issue 550: Should be merged with FIX_550_FIRST_FRAME_ACCESS above, or accepted at the same time */
#define FIX_569_TD_FILTER_LENGTH                        /* Eri: Issue 569: If an HRTF binary file exceeds the SFX_SPAT_BIN_MAX_FILTER_LENGTH the decoder crashes. This truncates the filter when generated from the model.  */

#define FIX_595_SHL_NOGLOB                              /* FhG: Issue 595: compilation with BASOP_NOGLOB disabled */
#define UPDATE_FASTCONV_SBA_FILTER                      /* Dlb: Issue 584: Update SBA CLDFB-Domain HRTFs */
#define FIX_570_SF_EXT_ORIENTATION
+0 −28
Original line number Diff line number Diff line
@@ -377,11 +377,7 @@ void IMDCT(
                    TCX_MDCT_Inverse( x + w * L_spec_TCX5, win, L_ola, L_win - L_ola, L_ola, st->element_mode );
                }

#ifndef FIX_575_LOW_OVERLAP_PLC_RECOVERY
                tcx_windowing_synthesis_current_frame( win, tcx_aldo_window_2, tcx_mdct_window_half, tcx_mdct_window_minimum, L_ola, tcx_mdct_window_half_length, tcx_mdct_window_min_length, ( w > 0 ) ? 0 : left_rect, ( w > 0 ) || ( w == 0 && index == 2 ) ? MIN_OVERLAP : hTcxCfg->tcx_last_overlap_mode, acelp_zir, hTcxDec->old_syn_Overl, syn_Overl_TDAC, st->old_Aq_12_8, tcx_mdct_window_trans, L_win, tcx_offset < 0 ? -tcx_offset : 0, ( w > 0 ) || ( frame_cnt > 0 ) ? 1 : st->last_core_bfi, ( w > 0 ) || ( frame_cnt > 0 ) ? 0 : st->last_is_cng, fullbandScale );
#else
                tcx_windowing_synthesis_current_frame( win, tcx_aldo_window_2, tcx_mdct_window_half, tcx_mdct_window_minimum, L_ola, tcx_mdct_window_half_length, tcx_mdct_window_min_length, ( w > 0 ) ? 0 : left_rect, ( w > 0 ) || ( w == 0 && index == 2 ) ? MIN_OVERLAP : hTcxCfg->tcx_last_overlap_mode, acelp_zir, hTcxDec->old_syn_Overl, syn_Overl_TDAC, st->old_Aq_12_8, tcx_mdct_window_trans, L_win, tcx_offset < 0 ? -tcx_offset : 0, ( w > 0 ) || ( frame_cnt > 0 ) ? 1 : st->last_core, ( w > 0 ) || ( frame_cnt > 0 ) ? 0 : st->last_is_cng, fullbandScale );
#endif

                if ( w > 0 )
                {
@@ -398,13 +394,11 @@ void IMDCT(
            /* To assure that no garbage values are passed to overlap */
            set_zero( xn_buf + L_frame + tcx_offset + ( L_ola >> 1 ), overlap - tcx_offset - ( L_ola >> 1 ) );

#ifdef FIX_575_LOW_OVERLAP_PLC_RECOVERY
            if ( st->prev_bfi && frame_cnt == 0 && st->last_core != st->last_core_bfi && st->last_core_bfi == ACELP_CORE )
            {
                tcx_windowing_synthesis_past_frame( old_syn_overl, tcx_aldo_window_1_trunc, tcx_mdct_window_half, tcx_mdct_window_minimum, overlap, tcx_mdct_window_half_length, tcx_mdct_window_min_length, hTcxCfg->tcx_last_overlap_mode );
                v_add( xn_buf, old_syn_overl, xn_buf, overlap );
            }
#endif
        }
        else if ( !bfi && ( frame_cnt == 0 ) && ( hTcxCfg->tcx_curr_overlap_mode == FULL_OVERLAP ) )

@@ -1252,7 +1246,6 @@ void decoder_tcx_noisefilling(
                if ( ( frame_cnt == 0 ) && ( L_frameTCX == hTcxDec->L_frameTCX >> 1 ) && ( st->tcxonly ) && ( !st->tonal_mdct_plc_active ) && ( st->nbLostCmpt == 1 ) && ( hTcxCfg->tcx_last_overlap_mode != FULL_OVERLAP ) && ( hTcxCfg->tcx_curr_overlap_mode != FULL_OVERLAP ) )
                {
                    E_2ndlast = E_last = EPSILON;
#ifdef FIX_575_LOW_OVERLAP_PLC_RECOVERY
                    if ( st->element_mode > EVS_MONO )
                    {
                        for ( i = 0; i < L_frameTCX; i = i + 2 )
@@ -1269,19 +1262,11 @@ void decoder_tcx_noisefilling(
                            E_last += st->hTonalMDCTConc->lastBlockData.spectralData[i + 1] * st->hTonalMDCTConc->lastBlockData.spectralData[i + 1];
                        }
                    }
#else
                    for ( i = 0; i < infoIGFStartLine; i = i + 2 )
                    {
                        E_2ndlast += st->hTonalMDCTConc->lastBlockData.spectralData[i] * st->hTonalMDCTConc->lastBlockData.spectralData[i];
                        E_last += st->hTonalMDCTConc->lastBlockData.spectralData[i + 1] * st->hTonalMDCTConc->lastBlockData.spectralData[i + 1];
                    }
#endif
                    tmp2 = E_2ndlast / E_last;

                    /* replace higher energy TCX5 frame by lower one to avoid energy fluctuation */
                    if ( tmp2 > 2 )
                    {
#ifdef FIX_575_LOW_OVERLAP_PLC_RECOVERY
                        if ( st->element_mode > EVS_MONO )
                        {
                            for ( i = 0; i < L_frameTCX; i = i + 2 )
@@ -1296,16 +1281,9 @@ void decoder_tcx_noisefilling(
                                st->hTonalMDCTConc->lastBlockData.spectralData[i] = st->hTonalMDCTConc->lastBlockData.spectralData[i + 1];
                            }
                        }
#else
                        for ( i = 0; i < infoIGFStartLine; i = i + 2 )
                        {
                            st->hTonalMDCTConc->lastBlockData.spectralData[i] = st->hTonalMDCTConc->lastBlockData.spectralData[i + 1];
                        }
#endif
                    }
                    else if ( tmp2 < 0.5 )
                    {
#ifdef FIX_575_LOW_OVERLAP_PLC_RECOVERY
                        if ( st->element_mode > EVS_MONO )
                        {
                            for ( i = 0; i < L_frameTCX; i = i + 2 )
@@ -1320,12 +1298,6 @@ void decoder_tcx_noisefilling(
                                st->hTonalMDCTConc->lastBlockData.spectralData[i + 1] = st->hTonalMDCTConc->lastBlockData.spectralData[i];
                            }
                        }
#else
                        for ( i = 0; i < infoIGFStartLine; i = i + 2 )
                        {
                            st->hTonalMDCTConc->lastBlockData.spectralData[i + 1] = st->hTonalMDCTConc->lastBlockData.spectralData[i];
                        }
#endif
                    }
                }

+0 −4
Original line number Diff line number Diff line
@@ -104,11 +104,7 @@ void decod_audio(
    }

    /* safety check in case of bit errors */
#ifdef ISM_FB_16k4
    if ( st->GSC_noisy_speech && st->bwidth < SWB && st->GSC_IVAS_mode == 0 )
#else
    if ( st->GSC_noisy_speech && st->bwidth != SWB && st->GSC_IVAS_mode == 0 )
#endif
    {
        st->BER_detect = 1;
        st->GSC_noisy_speech = 0;
+0 −10
Original line number Diff line number Diff line
@@ -3090,19 +3090,13 @@ static void ivas_param_mc_bs_decode_parameter_values(
    int16_t i, j, k;
    float dequant_seq[PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE];
    float dequant_ordered[PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE];
#ifdef FIX_578_PARAMMC_ILD_BS
    int16_t n_lfe_idx;
#endif

    range_coding = bit_buffer[( *bit_pos )++];

    /* Decoding the sequence */
#ifdef FIX_578_PARAMMC_ILD_BS
    n_lfe_idx = map_size - map_size_wo_lfe;
    sz_seq = num_param_bands * ( map_size_wo_lfe ) + num_lfe_bands * n_lfe_idx;
#else
    sz_seq = num_param_bands * ( map_size_wo_lfe ) + num_lfe_bands;
#endif

    set_s( idx, 0, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE );
    set_zero( dequant_ordered, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE );
@@ -3163,14 +3157,10 @@ static void ivas_param_mc_bs_decode_parameter_values(

    for ( i = 0; i < num_lfe_bands; i++ )
    {
#ifdef FIX_578_PARAMMC_ILD_BS
        for ( j = 0; j < n_lfe_idx; j++ )
        {
            dequant_ordered[map_size - n_lfe_idx + j + i * map_size] = dequant_seq[k++];
        }
#else
        dequant_ordered[map_size - 1 + i * map_size] = dequant_seq[k++];
#endif
    }

    if ( !( *BER_detect ) )
Loading