Commit a933ba7c authored by vaillancour's avatar vaillancour
Browse files

Propose fix to silence clang18 (1) on the encoder side, for stereo bitrate

parent 449b92ed
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,8 @@
#define FIX_1904_HARM_GSC_ENC                           /* VA: #1904 Harmonization of EVS and IVAS GSC code */
#define FIX_2271_OOB_INDEXING_IN_PIT_OL2                /* VA: Fix for issue 2271, to silence clang18 */

#define FIX_CLANG_18_ENC                        /* VA: Fix some encoder clang-18 warnings */

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

/* #################### Start NON-BE switches ############################ */
+4 −0
Original line number Diff line number Diff line
@@ -609,7 +609,11 @@ void AVQ_cod_lpc_fx(
    Word16 i, l, pos;
    Word32 I;
    Word32 x1[8];
#ifdef FIX_CLANG_18_ENC
    UWord16 I16 = 0;
#else
    UWord16 I16;
#endif


    /* quantize all subvector using estimated gain */
+4 −0
Original line number Diff line number Diff line
@@ -1132,7 +1132,11 @@ void core_signal_analysis_high_bitrate_ivas_fx(
                IF( EQ_16( transform_type[frameno], TCX_20 ) && NE_16( st->hTcxCfg->tcx_last_overlap_mode, TRANSITION_OVERLAP ) )
                {
                    Word16 Q;
#ifdef FIX_CLANG_18_ENC
                    Copy_Scale_sig_16_32_no_sat( mdstWin, L_tmpbuf, L_subframe, 16 );
#else
                    Copy_Scale_sig_16_32_no_sat( mdstWin, L_tmpbuf, N_MAX + L_MDCT_OVLP_MAX, 16 );
#endif

                    Q = add( q_mdstWin, 16 );
                    move16();
+3 −0
Original line number Diff line number Diff line
@@ -116,6 +116,9 @@ ivas_error ivas_core_enc_fx(
    {
        set_zero_fx( bwe_exc_extended_fx[i], L_FRAME32k + NL_BUFF_OFFSET );
        set16_fx( old_syn_12k8_16k_fx[i], 0, L_FRAME16k );
#ifdef FIX_CLANG_18_ENC
        set16_fx( voice_factors_fx[i], 0, NB_SUBFR16k );
#endif
    }

    push_wmops( "ivas_core_enc" );
+8 −0
Original line number Diff line number Diff line
@@ -336,6 +336,14 @@ ivas_error ivas_cpe_enc_fx(

    Word16 q_band_energies_LR;
    Word16 q_fr_bands[2], q_lf_E[2];
#ifdef FIX_CLANG_18_ENC
    q_band_energies_LR = 0;
    q_lf_E[0] = 0;
    q_lf_E[1] = 0;
    move16();
    move16();
    move16();
#endif
    IF( NE_32( ( error = front_vad_fx( hCPE, NULL, hEncoderConfig, &hCPE->hFrontVad[0], st_ivas->hMCT != NULL, input_frame, vad_flag_dtx,
                                       fr_bands_fx, q_fr_bands, Etot_LR_fx, lf_E_fx, q_lf_E, localVAD_HE_SAD, vad_hover_flag, band_energies_LR_fx,
                                       &q_band_energies_LR, NULL, NULL, NULL, Q_inp, Q_buffer, Q_add, &front_create_flag ) ),