Commit 4c61945d authored by Manuel Jander's avatar Manuel Jander
Browse files

Resolve merge conflicts.

parents 4a398658 0aa89070
Loading
Loading
Loading
Loading
+19 −11
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ void Comp_and_apply_gain_fx(

    return;
}
#ifndef FIX_2338_HARM_GSC_GAIN_COMP


void Comp_and_apply_gain_ivas_fx(
@@ -238,6 +239,7 @@ void Comp_and_apply_gain_ivas_fx(

    return;
}
#endif


/*========================================================================*/
@@ -258,7 +260,6 @@ void Comp_and_apply_gain_ivas_fx(
/* _ (Word32*) etmp14    : Energy band 14                  Q_exc_diff*2+1 */
/* _ (Word32*) etmp15    : Energy band 15                  Q_exc_diff*2+1 */
/*------------------------------------------------------------------------*/

/*------------------------------------------------------------------------*/
/* RETURN ARGUMENTS :                                                     */
/* _ None                                                                 */
@@ -285,6 +286,7 @@ static Word16 Comp_band_log_ener(
    return tmp16;
}


void Ener_per_band_comp_fx(
    const Word16 exc_diff_fx[], /* i  : target signal                     Q_exc_diff     */
    Word16 y_gain4_fx[],        /* o  : Energy per band to quantize       Q12            */
@@ -403,6 +405,7 @@ static void GSC_gain_adj(
    /* Gain adjustment to fit ACELP generic inactive coding gain at low rate */
    Word16 Gain_off, i;
    Word16 Fac_div;

    Fac_div = 102;
    move16();

@@ -540,6 +543,7 @@ Word16 gsc_gaindec_fx(
            idx_g_fx = (Word16) get_next_indice_fx( st_fx, 7 );
            VDQ_vec_fx( y_gainQ_fx + 6, Mean_dic_NB_fx + 6, Gain_dic3_NBHR_fx, idx_g_fx, 4 );
        }

        test();
        IF( LE_32( core_brate_fx, ACELP_9k60 ) && ( coder_type == INACTIVE ) )
        {
@@ -576,7 +580,9 @@ Word16 gsc_gaindec_fx(
             *--------------------------------------------------------------------------------------*/

            idx_g_fx = (Word16) get_next_indice_fx( st_fx, 5 );

            VDQ_vec_fx( y_gainQ_fx, YGain_mean_LR_fx, YGain_dic1_LR_fx, idx_g_fx, 3 );

            IF( !( coder_type == INACTIVE && st_fx->tdm_LRTD_flag == 0 && EQ_16( st_fx->idchan, 1 ) ) || GT_32( st_fx->core_brate, GSC_LRES_GAINQ_LIMIT ) )
            {
                idx_g_fx = (Word16) get_next_indice_fx( st_fx, 5 );
@@ -600,7 +606,9 @@ Word16 gsc_gaindec_fx(
                move16();
                y_gainQ_fx[11] = 0;
                move16();

                ifft_rel_fx( y_gainQ_fx + 8, 8, 3 );

                FOR( i = 8; i < 16; i++ )
                {
                    y_gainQ_fx[i] = round_fx( L_shl( L_mult( y_gainQ_fx[i], 23101 ), 1 ) ); /*Q12 */
+4 −2
Original line number Diff line number Diff line
@@ -1364,9 +1364,10 @@ void highband_exc_dct_in_ivas_fx(
            move16();
        }
    }

#ifndef FIX_2338_HARM_GSC_GAIN_COMP
    IF( EQ_16( element_mode, EVS_MONO ) )
    {
#endif
        Comp_and_apply_gain_fx( exc_diffQ, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 0, Qexc_diffQ, *Q_exc );

        IF( exc_wo_nf != NULL )
@@ -1374,6 +1375,7 @@ void highband_exc_dct_in_ivas_fx(
            Comp_and_apply_gain_fx( exc_wo_nf, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 1, Qexc_diffQ, *Q_exc );
            Vr_add( exc_dct_in, exc_wo_nf, exc_wo_nf, L_frame );
        }
#ifndef FIX_2338_HARM_GSC_GAIN_COMP
    }
    ELSE
    {
@@ -1404,7 +1406,7 @@ void highband_exc_dct_in_ivas_fx(
            Scale_sig( exc_dct_in, L_frame, sub( *Q_exc, Q_old ) );
        }
    }

#endif
    /*--------------------------------------------------------------------------------------*
     * add the correction layer to the LF bins,
     * and add the quantized pulses or the noise for the higher part of the spectrum
+11 −2
Original line number Diff line number Diff line
@@ -1362,13 +1362,22 @@ void stereo_tcx_init_dec_fx(
    const Word16 last_element_mode                              /* i  : element mode of previous frame      */
);

void stereo_icBWE_enc_ivas_fx(
void stereo_icBWE_enc_fx(
    CPE_ENC_HANDLE hCPE,                                        /* i/o: CPE encoder structure                */
#ifdef REMOVE_SCALING_SHB_SPEECH
    const Word16 shb_speech_ref_fx16[],                         /* i  : SHB speech ref channel             Q0*/
    Word16 shb_speech_nonref_fx_16[],                           /* i/o: SHB speech non-ref channel         shb_speech_nonref_e*/
#else
    const Word32 shb_speech_ref_fx[],                           /* i  : SHB speech ref channel               */
    const Word16 shb_speech_ref_e,                              /* i  : SHB speech ref channel               */
    Word32 shb_speech_nonref_fx[],                              /* i/o: SHB speech non-ref channel           */
#endif
    Word16 shb_speech_nonref_e,                                 /* i/o: SHB speech non-ref channel           */
#ifdef REMOVE_SCALING_SHB_SPEECH
    const Word16 *voice_factors_fx                              /* i  : voicing factors                  Q15 */
#else
    const Word32 *voice_factors_fx                              /* i  : voicing factors                     Q31 */
#endif
);

void initMdctStereoDecData_fx(
@@ -6395,7 +6404,7 @@ UWord16 get_indice_st(

void stereo_mdct_core_enc_fx(
    CPE_ENC_HANDLE hCPE,                                        /* i/o: CPE encoder structure                   */
    Word16 new_samples[CPE_CHANNELS][L_INP],                    /* i  : new samples                           Q0*/
    Word16 new_samples[CPE_CHANNELS][L_INP],                    /* i  : new samples                       Qnew-1*/
    Word16 old_wsp[CPE_CHANNELS][L_WSP],                        /* i  : 12.8kHz weighted speech (for LTP      Qx*/
    Word16 pitch_buf_fx[CPE_CHANNELS][NB_SUBFR16k]              /* o  : floating pitch for each subframe      Q6*/
);
+15 −2
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@
/*#define DISABLE_LIMITER*/

/* ################### Start MAINTENANCE switches ########################### */
#define FIX_2255_ISAR_RENDER_POSES                           /* VA: issue 2255: fix missing check in isar_render_poses() */

/* ################### Start BE switches ################################# */
/* only BE switches wrt wrt. TS 26.251 V3.0 */
@@ -86,6 +85,7 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_FIX_ISSUE_2206
#define FIX_2255_ISAR_RENDER_POSES                      /* VA: issue 2255: fix missing check in isar_render_poses() */
#define FIX_1904_HARM_GSC_ENC                           /* VA: #1904 Harmonization of EVS and IVAS GSC code */
#define FIX_1478_UNINIT_ON_BFI                          /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */
#define FIX_2318_CLANG_DECODER                          /* VA: basop issue 2318: Initialize command-line parameter arg.non_diegetic_pan_gain_fx */
@@ -102,12 +102,24 @@
#define FIX_BASOP_2332_ASAN_OVERFLOW_IN_EXT_DIRAC_REND  /* Nokia: basop issue 2332: Uses predefined memory sizes instead computing wrong */
#define FIX_BASOP_2333_MCMASA_ANA_MEMORY_LEAK           /* Nokia: basop issue 2333: Add missing free for direction_vector_e to ivas_mcmasa_ana_fx.c */
#define HARM_COREDECODER_FUNCTIONS                      /* VA: basop issue 2347: Remove various duplicated code in core-decoder  */
#define FIX_BASOP_2358_SCALING_OOB                      /* Eri: Basip issue 2358: Clang-18 reports OOB access where scaling is applied to L_FRAME48k instead of output_frame */
#define FIX_BASOP_2351_EXTREND_SCALE                    /* FhG: basop issue 2351: Only scale initialized samples in renderer, related to 2326 */
#define FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE           /* FhG: Fix issue 2331: Uninitialized variable */
#define FIX_2362_TOTAL_BRATE_CALCULATION                /* FhG: basop issue 2362: fix calculation of st->total_brate in ivas_cpe_enc_fx() */
#define FIX_2330_CLANG_18_WARNINGS_REND                 /* FhG: Fix renderer warnings */
#define FIX_BASOP_2350_HARM_0B_BWE                      /* VA: basop issue 2350: harmonization of the 0b BWE */
#define FIX_BASOP_2350_HARM_0B_BWE_2                    /* VA: basop issue 2350: Simplify calling of hf_synth_fx() */
#define FIX_2349_HARM_FIND_UV                           /* VA: basop issue 2349: harmonization of find_uv() function */
#define FIX_2364_HARM_MULT_HARM                         /* VA: basop issue 2364 : harmonizing multi_harm_fx function */
#define FIX_2363_FIND_WSP                               /* VA: basop issue 2363 : harmonizing find_wsp function */
#define FIX_2370_UNUSED_BUFFERS_CORE_ENC                /* VA: basop issue 2370: remove temporary input buffers in core-encoder  */
#define FIX_2376_FIX_USAN_PRE_PROC                      /* VA: basop issue 2376: Resolve "USAN: SEGV in ivas_compute_core_buffers_fx() */
#define FIX_2367_REMOVE_CODE_ICBWE                      /* VA: basop issue 2367: Remove IC-BWE obsolete code  */
#define REMOVE_SCALING_SHB_SPEECH                       /* VA: remove unnecessary scaling and 32-bit buffers from ivas_core_enc_fx() */
#define FIX_2352_COPY_AQ_IN_TCX                         /* FhG: basop issue 2352: prevent copying uninitialized values from Aq_fx[][] to Aq_fx_32[][] in TCX */
#define FIX_2353_PTR_INIT                               /* FhG: basop issue 2353: initialize prm_sqQ-pointer, to prevent being uninitialized in case of bfi == 1 */
#define FIX_2356_GET_CHAN_ENERGIES                      /* FhG: basop issue 2356: correctly initialize exponents in getChannelEnergies_fx() */
#define FIX_2355_IGF_EXP_POWERSPEC                      /* FhG: basop issue 2355: make sure exp_pPowerSpectrumParameter_fx is initialized in all cases */

/* #################### End BE switches ################################## */

@@ -119,10 +131,11 @@
#define FIX_2302_LSF_CDBK_THRESHOLD                     /* VA: basop issue 2302: fix threshold for LSF Q codebook-type decision  */
#define FIX_1500_ISM_MD_DTX                             /* VA: float issue 1500: fix ISM elevation metadata smoothing in DTX */
#define FIX_2348_REPLACE_FEC_ENC                        /* VA: basop issue 2348: replace FEC_encode_ivas_fx with FEC_encode_fx  */
#define FIX_2338_HARM_GSC_GAIN_COMP                     /* VA: basop issue 2338: harmonization of band gain computation for both EVS and IVAS */
#define FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG       /* Eri: Basop issue 2317: Uninitialized value read in case of DTX and BW switching   */

/* ##################### End NON-BE switches ########################### */


/* ################## End MAINTENANCE switches ######################### */

/* clang-format on */
+12 −7
Original line number Diff line number Diff line
@@ -1711,7 +1711,7 @@ void Comp_and_apply_gain_fx(
    const Word16 ReUseGain,  /* i  : Reuse the gain in Ener_per_bd_yQ     */
    Word16 Qexc_diff,
    Word16 Q_exc );
#ifndef FIX_2338_HARM_GSC_GAIN_COMP
void Comp_and_apply_gain_ivas_fx(
    Word16 exc_diffQ[],      /* i/o: Quantized excitation                  */
    Word16 Ener_per_bd_iQ[], /* i  : Target ener per band              Q13 */
@@ -1720,7 +1720,7 @@ void Comp_and_apply_gain_ivas_fx(
    const Word16 ReUseGain,  /* i  : Reuse the gain in Ener_per_bd_yQ      */
    Word16 Qexc_diff,
    Word16 *Q_exc );
#endif
void pre_echo_att_fx(
    Word32 *Last_frame_ener_fx,      /* i/o: Energy of the last frame         2*Q_new+1*/
    Word16 *exc_fx,                  /* i/o: Excitation of the current frame  Q_new*/
@@ -10347,9 +10347,13 @@ void Copy_Scale_sig32(
void swb_pre_proc_ivas_fx(
    Encoder_State *st,      /* i/o: encoder state structure                  */
    Word16 *new_swb_speech, /* o  : original input signal at 32kHz - Q0      */
#ifndef REMOVE_SCALING_SHB_SPEECH
    Word32 *new_swb_speech_fx, /* o  : original input signal at 32kHz - Q - q_reImBuffer */
    Word16 *shb_speech,        /* o  : SHB target signal (6-14kHz) at 16kHz- Q(Q_shb_spch) */
#endif
    Word16 *shb_speech, /* o  : SHB target signal (6-14kHz) at 16kHz - Q0*/
#ifndef REMOVE_SCALING_SHB_SPEECH
    Word16 *Q_shb_spch,
#endif
    Word32 realBuffer[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i  : real buffer Q - q_reImbuffer             */
    Word32 imagBuffer[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i  : imag buffer Q - q_reImbuffer             */
    Word16 q_reImBuffer,                                        /* i  : scale data of real and imag CLDFB buffers*/
@@ -11036,7 +11040,7 @@ void bands_and_bit_alloc_ivas_fx(
    const Word16 element_mode,     /* i  : element mode                                          */
    const Word16 GSC_IVAS_mode     /* i  : GSC IVAS mode                                         */
);
#ifndef FIX_2363_FIND_WSP
void ivas_find_wsp_fx(
    const Word16 L_frame,    /* i  : length of the frame                   Q0*/
    const Word16 L_subfr,    /* i  : length of subframe                    Q0*/
@@ -11050,6 +11054,7 @@ void ivas_find_wsp_fx(
    const Word16 gamma,      /* i  : weighting factor                       Q15 */
    const Word16 L_look      /* i  : look-ahead                            Q0*/
);
#endif
Word16 RCcontextMapping_encode2_estimate_bandWise_start_fx(
    Word16 *x,           /* Q0 */
Loading