Unverified Commit c95fb11d authored by norvell's avatar norvell
Browse files

Add BASOP/Float alignment under HQ_ALIGN_DUPLICATED_CODE

parent b0d052d7
Loading
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -2640,7 +2640,22 @@ void enforce_zero_for_min_envelope_fx(
    return;
}

#ifdef HQ_ALIGN_DUPLICATED_CODE
/*--------------------------------------------------------------------------*
 * apply_envelope()
 *
 * Apply spectral envelope without envelope adjustments and noisefill
 *--------------------------------------------------------------------------*/

void apply_envelope_enc_fx(
    const Word16 *coeff,     /* i/o: Normalized/scaled normalized spectrum  Q12 */
    const Word16 *norm,      /* i  : Envelope                               Q0  */
    const Word16 num_sfm,    /* i  : Total number of bands                  Q0  */
    const Word16 *sfm_start, /* i  : Sub band start indices                 Q0  */
    const Word16 *sfm_end,   /* i  : Sub band end indices                   Q0  */
    Word32 *coeff_out        /* o  : scaled normalized spectrum             Q12 */
)
#else
/*--------------------------------------------------------------------------*
 * apply_envelope()
 *
@@ -2655,6 +2670,7 @@ void apply_envelope_enc_ivas_fx(
    const Word16 *sfm_end,   /* i  : Sub band end indices                   Q0  */
    Word32 *coeff_out        /* o  : coded/noisefilled spectrum             Q12 */
)
#endif
{
    Word16 i;
    Word16 sfm;
@@ -2680,11 +2696,19 @@ void apply_envelope_enc_ivas_fx(
}


#ifdef HQ_ALIGN_DUPLICATED_CODE
/*--------------------------------------------------------------------------*
 * apply_envelope_fx()
 *
 * Apply spectral envelope with envelope adjustments
 *--------------------------------------------------------------------------*/
#else
/*--------------------------------------------------------------------------*
 * apply_envelope()
 *
 * Apply spectral envelope with envelope adjustments
 *--------------------------------------------------------------------------*/
#endif

void apply_envelope_fx(
    const Word16 *coeff,     /* i/o: Coded/noisefilled normalized spectrum  Q12 */
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@
#define HARM_2456_APPLY_SCALE                           /* FhG basop issue 2456: Harmonize apply_scale_ind(), apply_scale_ivas_fx() */
#define HARM_2454_TCX_RES_Q_SPEC                        /* FhG: harmonization of tcx_res_Q_spec_fx() and tcx_res_Q_spec_ivas_fx() */
#define FIX_FLOAT_1535_ARI_RES_Q_CLEANUP                /* FhG: remove dead code from tcx_ari_res_Q_spec() */
#define HQ_ALIGN_DUPLICATED_CODE                        /* Eri: Align duplicated code */

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

+4 −0
Original line number Diff line number Diff line
@@ -530,7 +530,11 @@ void hq_hr_enc_ivas_fx(
    {
        IF( NE_16( hqswb_clas, HQ_HVQ ) )
        {
#ifdef HQ_ALIGN_DUPLICATED_CODE
            apply_envelope_enc_fx( t_audio_q_norm, ynrm, num_sfm, sfm_start, sfm_end, t_audio_q_fx );
#else
            apply_envelope_enc_ivas_fx( t_audio_q_norm, ynrm, num_sfm, sfm_start, sfm_end, t_audio_q_fx );
#endif
            scale_sig32( t_audio_q_fx, length, sub( Q12, Q_audio ) ); // Q12
        }