Commit 2cabdfad authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into...

- Merge remote-tracking branch 'remotes/origin/main' into basop-2320-clang18-msan-use-of-uninitialized-value-in-lib_com-tools_fx-c-1354-16
parents 181180dd 2997f3e6
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@
#define FIX_2313_HF_RESET_16KHZ                         /* VA: basop issue 2313: Call hf_synth_reset_fx() also for 16 kHz output_Fs */
#define OPT_2308_FIND_TARGET                            /* VA: Issue 2308, Speeds up computation and improve accuracy of the impulse response */
#define OPT_NBE_2311_HARM_GSC_GAIN                      /* VA: issue 2311: non-BE part of the GSC gain harmonization */
#define FIX_2261_REMOVE_LP_RESCALING                    /* VA: Remove of unnecessary lpc coefficient rescaling */
#define FIX_2320_OOB_SCE_SWITCHING                      /* VA: basop issue 2320: Correct the length of the buffer to be scaled in SCE/CPE switching */

/* ##################### End NON-BE switches ########################### */
+6 −6
Original line number Diff line number Diff line
@@ -1053,13 +1053,13 @@ ivas_error acelp_core_enc_ivas_fx(
        move16();
        st->hLPDmem->q_mem_syn = st->Q_syn;
        move16();

        /* Scaling Aq to Q12 */
#ifndef FIX_2261_REMOVE_LP_RESCALING
        // Scaling Aq to Q12
        FOR( Word16 k = 0; k < NB_SUBFR16k; k++ )
        {
            Scale_sig( &Aq[( M + 1 ) * k], M + 1, sub( norm_s( Aq[( M + 1 ) * k] ), 2 ) );
        }

#endif
        /* synthesis at 12.8kHz sampling rate */
        syn_12k8_fx( st->L_frame, Aq, exc3_fx, syn1_fx, hLPDmem->mem_syn3, 1, sub( Q_new, 1 ), st->Q_syn );

@@ -1198,13 +1198,13 @@ ivas_error acelp_core_enc_ivas_fx(
            st->stab_fac_fx = lsf_stab_fx( lsf_new_fx, st->lsf_old_fx, 0, st->L_frame ); // Q15
            move16();
        }

        /* Scaling Aq to Q12 */
#ifndef FIX_2261_REMOVE_LP_RESCALING
        // Scaling Aq to Q12
        FOR( Word16 k = 0; k < NB_SUBFR16k; k++ )
        {
            Scale_sig( &Aq[( M + 1 ) * k], M + 1, sub( norm_s( Aq[( M + 1 ) * k] ), 2 ) );
        }

#endif
        test();
        IF( EQ_16( st->last_core, HQ_CORE ) && st->element_mode > EVS_MONO )
        {
+5 −1
Original line number Diff line number Diff line
@@ -225,7 +225,9 @@ ivas_error ivas_core_enc_fx(
                                                        // fft_buff_fx_exp = add(fft_buff_fx_exp,1);
        FOR( i = 0; i < st->nb_subfr; i++ )
        {
#ifndef FIX_2261_REMOVE_LP_RESCALING
            Scale_sig( &A_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( A_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12
#endif
            Scale_sig( &Aw_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( Aw_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12
        }
        IF( EQ_32( ivas_format, SBA_FORMAT ) )
@@ -337,10 +339,12 @@ ivas_error ivas_core_enc_fx(
        test();
        IF( ( EQ_16( st->core, TCX_20_CORE ) || EQ_16( st->core, TCX_10_CORE ) ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
        {
#ifndef FIX_2261_REMOVE_LP_RESCALING
            FOR( i = 0; i < st->nb_subfr; i++ )
            {
                Scale_sig( &Aw_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( Aw_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12
            }
#endif
            TCX_ENC_HANDLE hTcxEnc = st->hTcxEnc;
            Word16 Q_spec_old, L_spec;

+2 −1
Original line number Diff line number Diff line
@@ -630,8 +630,9 @@ ivas_error front_vad_spar_fx(
        }

        relE_fx = sub( Etot_fx[0], extract_h( st->lp_speech_32fx ) );
#ifndef FIX_2261_REMOVE_LP_RESCALING
        Scale_sig( A_fx, ( L_FRAME / L_SUBFR ) * ( M + 1 ), -2 ); // Q12

#endif
        st->mem_wsp_fx = (Word16) shl_sat( st->mem_wsp_fx, Q_inp_12k8 - st->mem_wsp_q ); /* Q_inp_12k8 */
        st->mem_wsp_q = Q_inp_12k8;
        move16();
+2 −1
Original line number Diff line number Diff line
@@ -238,11 +238,12 @@ ivas_error ivas_ism_enc_fx(
        /*----------------------------------------------------------------*
         * Front Pre-processing
         *----------------------------------------------------------------*/
#ifndef FIX_2261_REMOVE_LP_RESCALING
        FOR( i = 0; i < hSCE->hCoreCoder[0]->nb_subfr; i++ )
        {
            Scale_sig( &A_fx[sce_id][0][i * ( M + 1 )], M + 1, sub( norm_s( A_fx[sce_id][0][i * ( M + 1 )] ), 2 ) ); // scaling to Q12
        }

#endif
        set16_fx( old_wsp_fx[sce_id][0], 0, L_WSP );
        q_old_wsp = Q15;
        move16();
Loading