Commit 41a1c182 authored by vaclav's avatar vaclav
Browse files

fix

parent 1c216005
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1599,6 +1599,7 @@ Word16 ivas_hq_classifier_dec_fx(
    Word16 *hqswb_clas                                          /* o  : HQ class                             Q0 */
);

#ifndef HARM_HQ_CORE2
void ivas_hq_hr_dec_fx(
    Decoder_State *st_fx,                                       /* i/o: decoder state structure fx              */
    Word32 *t_audio_q,                                          /* o  : transform-domain coefficients       Q12 */
@@ -1610,7 +1611,7 @@ void ivas_hq_hr_dec_fx(
    Word16 *SWB_fenv,                                           /* o  : SWB frequency envelopes             Q1  */
    const Word16 core_switching_flag                            /* i : Core switching flag                      */
);

#endif
#ifndef HARM_HQ_CORE
void ivas_hq_configure_fx(
    const Word16 length,                                        /* i  : Frame length                         Q0 */
+1 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@
#define FIX_2424_REMOVE_GAUSS_L2_ENC                    /* VA: basop issue 2424: Remove duplicated code in gauss_L2_ivas_fx() */
#define HARM_HQ_CORE                                    /* harmonize HQ core functions */
#define HARM_HQ_CORE_KEEP_EVS_BE                  // hack to keep EVS BE
//#define HARM_HQ_CORE2

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

+0 −1
Original line number Diff line number Diff line
@@ -17099,7 +17099,6 @@ const Word16 fg_inv_tbl_fx [HQ_MAX_BAND_LEN/8 + 1 ] =
    586,   512,  456,  410, 373, 342
};
const UWord32 exactdivodd[ODD_DIV_SIZE] =
{
    /*     exactdivodd[0]=1/1, exactdivodd[1]=1/3, exactdivodd[n]=1/(2*n+1),  exactdivodd[47]=1/95 ) */
+4 −0
Original line number Diff line number Diff line
@@ -693,7 +693,11 @@ void ivas_hq_core_dec_fx(
        ELSE
        {
            /* HQ high rate decoder */
#ifdef HARM_HQ_CORE2
            hq_hr_dec_fx( st_fx, t_audio_q, L_spec, num_bits, ynrm, &is_transient, &hqswb_clas, SWB_fenv_fx, core_switching_flag );
#else
            ivas_hq_hr_dec_fx( st_fx, t_audio_q, L_spec, num_bits, ynrm, &is_transient, &hqswb_clas, SWB_fenv_fx, core_switching_flag );
#endif
            Q_audio = 12;
            move16();
            Q_G_audio = Q_audio;
+56 −4
Original line number Diff line number Diff line
@@ -135,7 +135,11 @@ void hq_pred_hb_bws_fx(
 * HQ High rate decoding routine
 *--------------------------------------------------------------------------*/

#ifdef HARM_HQ_CORE2
void hq_hr_dec_fx(
#else
void ivas_hq_hr_dec_fx(
#endif
    Decoder_State *st_fx,            /* i/o: decoder state structure fx                     */
    Word32 *t_audio_q,               /* o  : transform-domain coefficients              Q12 */
    const Word16 length,             /* i  : frame length                               Q0  */
@@ -203,7 +207,16 @@ void ivas_hq_hr_dec_fx(
     * Decode classification
     *------------------------------------------------------------------*/

#ifdef HARM_HQ_CORE2
    IF( st_fx->element_mode == EVS_MONO )
    {
        bits = hq_classifier_dec_fx( st_fx, st_fx->core_brate, length, is_transient, hqswb_clas );
    }
    ELSE
#endif
    {
        bits = ivas_hq_classifier_dec_fx( st_fx, st_fx->core_brate, length, is_transient, hqswb_clas ); /* Q0 */
    }
    bits_left = sub( num_bits, bits ); /* Q0 */

    /*------------------------------------------------------------------*
@@ -211,8 +224,22 @@ void ivas_hq_hr_dec_fx(
     *------------------------------------------------------------------*/

#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_KEEP_EVS_BE
    Word16 tmp_length = length;
    move16();
    test();
    if ( st_fx->element_mode == EVS_MONO && EQ_16( length, L_FRAME48k ) )
    {
        tmp_length = L_SPEC48k;
        move16();
    }

    hq_configure_fx( tmp_length, *hqswb_clas, st_fx->core_brate, &num_sfm, &nb_sfm, &start_norm,
                     &num_env_bands, &numnrmibits, &hq_generic_offset, sfmsize, sfm_start, sfm_end );
#else
    hq_configure_fx( length, *hqswb_clas, st_fx->core_brate, &num_sfm, &nb_sfm, &start_norm,
                     &num_env_bands, &numnrmibits, &hq_generic_offset, sfmsize, sfm_start, sfm_end );
#endif
#else
    ivas_hq_configure_fx( length, *hqswb_clas, st_fx->core_brate, &num_sfm, &nb_sfm, &start_norm,
                          &num_env_bands, &numnrmibits, &hq_generic_offset, sfmsize, sfm_start, sfm_end );
@@ -300,8 +327,18 @@ void ivas_hq_hr_dec_fx(
     * Bit allocation
     *------------------------------------------------------------------*/

#ifdef HARM_HQ_CORE2
    IF( st_fx->element_mode == EVS_MONO )
    {
        hq_bit_allocation_fx( st_fx->core_brate, length, *hqswb_clas, &bits_left, normqlg2, nb_sfm, sfmsize, noise_level,
                              R, Rsubband, &sum, &core_sfm, num_env_bands );
    }
    ELSE
#endif
    {
        ivas_hq_bit_allocation_fx( st_fx->core_brate, length, *hqswb_clas, &bits_left, normqlg2, nb_sfm, sfmsize, noise_level,
                                   R, Rsubband, &sum, &core_sfm, num_env_bands );
    }

    test();
    test();
@@ -406,7 +443,20 @@ void ivas_hq_hr_dec_fx(
    IF( EQ_16( *is_transient, 1 ) )
    {
#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_KEEP_EVS_BE
        tmp_length = length;
        move16();
        test();
        if ( st_fx->element_mode == EVS_MONO && EQ_16( length, L_FRAME48k ) )
        {
            tmp_length = L_SPEC48k;
            move16();
        }

        de_interleave_spectrum_fx( t_audio_q, tmp_length );
#else
        de_interleave_spectrum_fx( t_audio_q, length );
#endif
#else
        ivas_de_interleave_spectrum_fx( t_audio_q, length );
#endif
@@ -428,6 +478,7 @@ void ivas_hq_hr_dec_fx(

    return;
}
#ifndef HARM_HQ_CORE2

void hq_hr_dec_fx(
    Decoder_State *st_fx,            /* i/o: decoder state structure fx                     */
@@ -725,3 +776,4 @@ void hq_hr_dec_fx(

    return;
}
#endif
Loading