Commit 20537e32 authored by Jan Kiene's avatar Jan Kiene
Browse files

Accept NONBE_FIX_ISSUE_2518

parent d75018af
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -100,8 +100,6 @@

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define NONBE_FIX_ISSUE_2206_MDCT_STEREO_FIX_2549       /* FhG: Correct scale inconsistency of old_inp_16k_fx buffer scale. */
#define NONBE_FIX_ISSUE_2518                            /* FhG: Fix issue 2518, noise during ACELP switching from 16KHz to 12k8Hz by improving Q_new calculation. */
#define NONBE_FIX_ISSUE_2518_TRANSENC_SAT_FIX           /* FhG: Fix issue 2518, fix wrong amplitude because of saturation of x_tran in transf_cdbk_enc_fx() for transient signals. */
#define NONBE_FIX_ISSUE_2569                            /* FhG: Fix issue 2569, overflow of mem_preemph16k_fx in LTV test. */
#define FIX_BASOP_2559_Q_SYNTH_HISTORY_RESET            /* FhG: BASOP issue 2559: reset hTcxDec->q_synth_history_fx in allocate_CoreCoder_TCX_fx() */
#define FIX_FLOAT_1578_OMASA_REND_SPIKES                /* Nokia: Float issue 1578: Fix spikes and collapsed perception in OMASA/MASA rendering to FOA/HOA */
+0 −14
Original line number Diff line number Diff line
@@ -117,9 +117,7 @@ ivas_error acelp_core_enc_fx(
            move16();
            hLPDmem->q_mem_syn = sub( Q_new, 1 );
            move16();
#ifdef NONBE_FIX_ISSUE_2518
            st->mem_deemp_preQ_fx = shl_sat( st->mem_deemp_preQ_fx, sub( Q_new, st->prev_Q_new ) );
#endif
        }

        Scale_sig32( st->Bin_E_old_fx, L_FFT / 2, sub( add( Q_new, Q_SCALE - 2 ), st->q_Bin_E_old ) ); // Q_new + Q_scale - 2
@@ -968,18 +966,6 @@ ivas_error acelp_core_enc_fx(
     * Updates
     *-----------------------------------------------------------------*/

#ifndef NONBE_FIX_ISSUE_2518
    IF( st->element_mode > EVS_MONO )
    {
        if ( st->hBWE_TD != NULL )
        {
            st->Q_exc = Q_new;
            move16();
        }
        hLPDmem->q_lpd_old_exc = Q_new;
        move16();
    }
#endif

    updt_enc_fx( st, old_exc_fx, pitch_buf, Es_pred_fx, Aq, lsf_new_fx, lsp_new, old_bwe_exc_fx );

+0 −17
Original line number Diff line number Diff line
@@ -28,11 +28,7 @@ static void init_tcx_ivas_fx( Encoder_State *st, const Word16 L_frame_old, const
static void init_core_sig_ana_ivas_fx( Encoder_State *st );
static void init_modes_ivas_fx( Encoder_State *st, const Word32 last_total_brate );
static void init_sig_buffers_ivas_fx( Encoder_State *st, const Word16 L_frame_old, const Word16 L_subfr, const Word32 last_total_brate );
#ifdef NONBE_FIX_ISSUE_2518
static void init_acelp_ivas_fx( Encoder_State *st, Word16 L_frame_old, const Word32 last_total_brate );
#else
static void init_acelp_ivas_fx( Encoder_State *st, Word16 L_frame_old, Word16 shift, const Word32 last_total_brate );
#endif

/*-----------------------------------------------------------------------*
 * init_coder_ace_plus_fx()
@@ -1089,11 +1085,7 @@ void init_coder_ace_plus_ivas_fx(

    /* Initialize ACELP */

#ifdef NONBE_FIX_ISSUE_2518
    init_acelp_ivas_fx( st, L_frame_old, last_total_brate );
#else
    init_acelp_ivas_fx( st, L_frame_old, 0, last_total_brate );
#endif

    if ( st->ini_frame == 0 )
    {
@@ -1546,11 +1538,7 @@ static void init_core_sig_ana_ivas_fx( Encoder_State *st )
 *
 *
 *-----------------------------------------------------------------------*/
#ifdef NONBE_FIX_ISSUE_2518
static void init_acelp_ivas_fx( Encoder_State *st, Word16 L_frame_old, const Word32 last_total_brate )
#else
static void init_acelp_ivas_fx( Encoder_State *st, Word16 L_frame_old, Word16 shift, const Word32 last_total_brate )
#endif
{
    Word16 mem_syn_r_size_old;
    Word16 mem_syn_r_size_new;
@@ -1733,13 +1721,8 @@ static void init_acelp_ivas_fx( Encoder_State *st, Word16 L_frame_old, Word16 sh
                    move16();
                    Copy( hLPDmem->mem_syn2, tmp_buf + 1, M );
                    deemph_fx( tmp_buf + 1, st->preemph_fac, M, &tmp );
#ifdef NONBE_FIX_ISSUE_2518
                    Residu3_fx( Ap, tmp_buf + M, &tmp, 1, 0 );
                    hLPDmem->mem_w0 = sub_sat( shl_sat( st->wspeech_enc[-1], sub( hLPDmem->q_mem_syn, sub( Q15, st->exp_buf_wspeech_enc ) ) ), tmp );
#else
                    Residu3_fx( Ap, tmp_buf + M, &tmp, 1, 1 );
                    hLPDmem->mem_w0 = sub_sat( shr_sat( st->wspeech_enc[-1], shift ), tmp );
#endif
                    move16();
                }
            }
+0 −17
Original line number Diff line number Diff line
@@ -386,24 +386,7 @@ void core_coder_mode_switch_ivas_fx(
        move32();
        st->currEnergyHF_e_fx = 0;
        move16();
#ifndef NONBE_FIX_ISSUE_2518
        Word16 shift = getScaleFactor16( st->old_inp_16k_fx, L_INP_MEM );
        Scale_sig( st->old_inp_16k_fx, L_INP_MEM, shift );
        st->exp_old_inp_16k = sub( st->exp_old_inp_16k, shift );
        move16();
        shift = getScaleFactor16( st->old_inp_12k8_fx, L_INP_MEM );
        Scale_sig( st->old_inp_12k8_fx, L_INP_MEM, shift );
        st->exp_old_inp_12k8 = sub( st->exp_old_inp_12k8, shift );
        move16();
#endif
        init_coder_ace_plus_ivas_fx( st, last_total_brate, st->total_brate, MCT_flag );
#ifndef NONBE_FIX_ISSUE_2518
        if ( st->hLPDmem != NULL )
        {
            st->hLPDmem->q_lpd_old_exc = st->prev_Q_new;
            move16();
        }
#endif
    }

    test();
+0 −9
Original line number Diff line number Diff line
@@ -249,13 +249,11 @@ ivas_error init_encoder_fx(

    st->prev_Q_new = 0;
    move16();
#ifdef NONBE_FIX_ISSUE_2518
    if ( st->element_mode > EVS_MONO )
    {
        st->prev_Q_new = Q15;
        move16();
    }
#endif

    IF( EQ_32( st->input_Fs, 8000 ) )
    {
@@ -1151,13 +1149,6 @@ ivas_error init_encoder_fx(
        init_coder_ace_plus_ivas_fx( st, st->last_total_brate, igf_brate, 0 );
    }

#ifndef NONBE_FIX_ISSUE_2518
    IF( st->hLPDmem != NULL )
    {
        st->hLPDmem->q_lpd_old_exc = st->prev_Q_new;
        move16();
    }
#endif

    /*-----------------------------------------------------------------*
     * FD-CNG encoder
Loading