Commit b86d1387 authored by vaclav's avatar vaclav
Browse files

cleaning under CLEANUP_HQ_CORE

parent 96ae0d1c
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ void mdct_spectrum_denorm_fx(
    return;
}


#ifndef CLEANUP_HQ_CORE
void mdct_spectrum_denorm_ivas_fx(
    const Word32 inp_vector[],    /* i   : Q0  :                                       */
    Word32 L_y2[],                /* i/o : Qs  : decoded spectrum                      */
@@ -373,6 +373,7 @@ void mdct_spectrum_denorm_ivas_fx(

    return;
}
#endif

/*==========================================================================*/
/* FUNCTION      : void hq2_core_configure_fx()                             */
+1 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@
#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_2273_OOB_INDEXING_IN_PIT_FR4                /* VA: Fix to silence clang on ptr init */
#define CLEANUP_HQ_CORE

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

+4 −2
Original line number Diff line number Diff line
@@ -2277,6 +2277,7 @@ void mdct_spectrum_denorm_fx(
    const Word16 pd_thresh_fx     /* i   : Q15 :                                       */
);
#ifndef CLEANUP_HQ_CORE
void mdct_spectrum_denorm_ivas_fx(
    const Word32 inp_vector[],    /* i   : Q0  :                                       */
    Word32 L_y2[],                /* i/o : Qs  : decoded spectrum                      */
@@ -2289,7 +2290,7 @@ void mdct_spectrum_denorm_ivas_fx(
    const Word16 ld_slope_fx,     /* i   : Q15 :                                       */
    const Word16 pd_thresh_fx     /* i   : Q15 :                                       */
);
#endif
void hq2_core_configure_fx(
    const Word16 frame_length, /* Q0 */
    const Word16 num_bits,     /* Q0 */
@@ -3880,6 +3881,7 @@ void swb_bwe_enc_lr_fx(
    Word16 *ni_seed_fx            /* i/o: random seed for search buffer NI             */
);
#ifndef CLEANUP_HQ_CORE
void swb_bwe_enc_lr_ivas_fx(
    Encoder_State *st_fx,    /* i/o: encoder state structure                      */
    const Word32 L_m_core[], /* i  : lowband synthesis                            */
@@ -3904,7 +3906,7 @@ void swb_bwe_enc_lr_ivas_fx(
    const Word32 L_y2_ni[],       /* i  : band_width information                       */
    Word16 *ni_seed_fx            /* i/o: random seed for search buffer NI             */
);
#endif
void isf_enc_amr_wb_fx(
    Encoder_State *st, /* i/o: state structure                             */
    Word16 *isf_new,   /* i/o: quantized ISF vector                        */
+19 −3
Original line number Diff line number Diff line
@@ -565,6 +565,9 @@ void ivas_hq_core_dec_fx(
            }
            ELSE
            {
#ifdef CLEANUP_HQ_CORE
                /* this cannot happen in IVAS */
#else
                core_switching_hq_prepare_dec_fx( st_fx, &num_bits, output_frame );

                /* During ACELP->HQ core switching, limit the HQ core bitrate to 48kbps */
@@ -573,6 +576,7 @@ void ivas_hq_core_dec_fx(
                    num_bits = (Word16) ( HQ_48k / 50 );
                    move16();
                }
#endif
            }
        }
        IF( hq_recovery_flag )
@@ -625,11 +629,12 @@ void ivas_hq_core_dec_fx(
        }
    }

#ifndef CLEANUP_HQ_CORE
    IF( EQ_16( output_frame, L_FRAME8k ) )
    {
        hq_configure_bfi_fx( &nb_sfm, &num_Sb, num_bands_p, &sfmsize, &sfm_start, &sfm_end );
    }

#endif
    /*--------------------------------------------------------------------------
     * transform-domain decoding
     *--------------------------------------------------------------------------*/
@@ -645,11 +650,13 @@ void ivas_hq_core_dec_fx(
                            &hHQ_core->last_fec, hHQ_core->ph_ecu_HqVoicing, &hHQ_core->ph_ecu_active, gapsynth_fx, st_fx->prev_bfi, hHQ_core->old_is_transient, hHQ_core->mag_chg_1st_fx,
                            hHQ_core->Xavg_fx, &hHQ_core->beta_mute_fx, output_frame, st_fx );
        }
#ifndef CLEANUP_HQ_CORE
        ELSE
        {
            HQ_FEC_processing_fx( st_fx, t_audio_q, is_transient, hHQ_nbfec->ynrm_values_fx, hHQ_nbfec->r_p_values_fx, num_Sb, nb_sfm, num_bands_p,
                                  output_frame, sfm_start, sfm_end );
        }
#endif

        hHQ_core->old_is_transient[2] = hHQ_core->old_is_transient[1]; /* Q0 */
        move16();
@@ -675,6 +682,10 @@ void ivas_hq_core_dec_fx(
    {
        IF( EQ_16( hq_core_type, LOW_RATE_HQ_CORE ) )
        {
#ifdef CLEANUP_HQ_CORE
            /* this cannot happen in IVAS */

#else
            IF( EQ_16( st_fx->prev_bfi, 1 ) )
            {
                set32_fx( hHQ_core->last_ni_gain_fx, 0, BANDS_MAX );
@@ -685,6 +696,7 @@ void ivas_hq_core_dec_fx(

            /* HQ low rate decoder */
            hq_lr_dec_fx( st_fx, t_audio_q, inner_frame, num_bits, &is_transient );
#endif
            hqswb_clas = is_transient; /* Q0 */
            move16();
            Q_audio = 12;
@@ -914,6 +926,7 @@ void ivas_hq_core_dec_fx(
            move16();
        }

#ifndef CLEANUP_HQ_CORE
        IF( EQ_16( output_frame, L_FRAME8k ) )
        {
            test();
@@ -951,6 +964,7 @@ void ivas_hq_core_dec_fx(
            }
        }
        ELSE
#endif
        {
            test();
            IF( EQ_16( st_fx->bfi, 1 ) && GE_16( output_frame, L_FRAME16k ) )
@@ -986,6 +1000,7 @@ void ivas_hq_core_dec_fx(
        }
    }

#ifndef CLEANUP_HQ_CORE
    test();
    test();
    test();
@@ -1007,7 +1022,7 @@ void ivas_hq_core_dec_fx(
        }
        waveform_adj2_fix( st_fx->hPlcInfo, st_fx->hTonalMDCTConc->secondLastPcmOut, synth, 0, add( extract_l( st_fx->hPlcInfo->nbLostCmpt ), 1 ), st_fx->bfi );
    }

#endif
    IF( GE_16( output_frame, L_FRAME16k ) )
    {
        IF( EQ_16( hHQ_core->ph_ecu_HqVoicing, 1 ) )
@@ -1034,13 +1049,14 @@ void ivas_hq_core_dec_fx(
        move16();
    }

#ifndef CLEANUP_HQ_CORE
    IF( EQ_16( output_frame, L_FRAME8k ) )
    {
        Copy32( wtda_audio, hHQ_nbfec->oldIMDCTout_fx, L_FRAME8k / 2 );                                        /* q_wtda */
        Copy( &hHQ_nbfec->old_auOut_2fr_fx[output_frame], hHQ_nbfec->old_auOut_2fr_fx, output_frame );         /* Q_old_auOut */
        Copy_Scale_sig( synth, &hHQ_nbfec->old_auOut_2fr_fx[output_frame], output_frame, negate( *Q_synth ) ); /* Q0 */
    }

#endif
    /* prepare synthesis output buffer (as recent as possible) for HQ FEC */

    {
+4 −1
Original line number Diff line number Diff line
@@ -505,8 +505,11 @@ void hq_core_enc_ivas_fx(
    move16();
    IF( EQ_16( hq_core_type, LOW_RATE_HQ_CORE ) )
    {

#ifdef CLEANUP_HQ_CORE
        /* this cannot happen in IVAS */
#else
        hq_lr_enc_ivas_fx( st, t_audio_fx, inner_frame, &num_bits, is_transient );
#endif
    }
    ELSE
    {
Loading