Commit c8e34f38 authored by vaclav's avatar vaclav
Browse files

HARM_HQ_CORE2

parent 4ab212b3
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@
#define FIX_2431_AVOID_CALLOC                           /* VA: basp issue 2431: avoid use of calloc() */
#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_CORE2
#define HARM_HQ_CORE_EVS_TO_BE_CHECKED                  // hack to keep EVS BE

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

+1 −1
Original line number Diff line number Diff line
@@ -10130,7 +10130,7 @@ void IGFEncConcatenateBitstream(
);

void hq_generic_hf_encoding_fx(
#ifdef HARM_HQ_CORE2
#ifdef HARM_HQ_CORE
    const Word16 element_mode, /* i  : element mode                             */
#endif
    const Word32 *coefs_fx,         /* i  : MDCT coefficients of weighted original   */
+1 −3
Original line number Diff line number Diff line
@@ -5031,13 +5031,11 @@ void ivas_hq_ecu_fx(
    test();
    test();
    test();

    evs_mode_selection = ( GE_32( st_fx->total_brate, 48000 ) && ( GE_16( output_frame, L_FRAME16k ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) &&
                                                                   ( ph_ecu_HqVoicing || ( ( ( GT_16( hHQ_core->env_stab_plc_fx, 16384 ) /* 0.5 in Q15 */ ) && ( LT_16( corr, 19661 ) /* 0.6 in Q15 */ ) ) || ( LT_16( hHQ_core->env_stab_plc_fx, 16384 ) /* 0.5 in Q15 */ && ( GT_16( corr, 27853 ) /* 0.85 in Q15 */ ) ) ) ) ) ) ||
                         ( LT_32( st_fx->total_brate, 48000 ) && ( ( ph_ecu_HqVoicing || GT_16( corr, 27853 ) /* 0.85 in Q15 */ ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) ) );

#ifdef HARM_HQ_CORE
    // temp. hack to keep EVS BE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
    IF( st_fx->element_mode == EVS_MONO )
    {
        evs_mode_selection = ( GE_32( st_fx->total_brate, 48000 ) && ( GE_16( output_frame, L_FRAME16k ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) && ( NE_16( ph_ecu_HqVoicing, 0 ) || ( ( ( NE_16( st_fx->hHQ_core->env_stab_plc_fx, 0 ) ) && ( LT_16( corr, 19661 ) ) ) || ( !( NE_16( st_fx->hHQ_core->env_stab_plc_fx, 0 ) ) && ( GT_16( corr, 27853 ) ) ) ) ) ) ) ||
+8 −3
Original line number Diff line number Diff line
@@ -505,14 +505,19 @@ void hq_hr_dec_fx(
     *------------------------------------------------------------------*/

#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
    Word16 tmp_length = length;
    if ( length == 960 )
    {
        tmp_length = L_SPEC48k; // this is temp. hack to keep EVS BE
        tmp_length = L_SPEC48k;
    }

    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
    hq_configure_evs_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 );
@@ -691,11 +696,11 @@ void hq_hr_dec_fx(

    IF( EQ_16( *is_transient, 1 ) )
    {
#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
        tmp_length = length;
        if ( length == 960 )
        {
            tmp_length = L_SPEC48k; // this is temp. hack to keep EVS BE
            tmp_length = L_SPEC48k;
        }

        de_interleave_spectrum_fx( t_audio_q, tmp_length );
+17 −8
Original line number Diff line number Diff line
@@ -102,14 +102,19 @@ void hq_hr_enc_fx(
     *------------------------------------------------------------------*/

#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
    Word16 tmp_length = length;
    if ( length == 960 )
    {
        tmp_length = L_SPEC48k; // this is temp. hack to keep EVS BE
        tmp_length = L_SPEC48k;
    }

    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
    hq_configure_evs_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 );
@@ -122,11 +127,11 @@ void hq_hr_enc_fx(
    /* Interleave MLT coefficients of 4 sub-vectors in case of transient */
    IF( EQ_16( is_transient, 1 ) )
    {
#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
        tmp_length = length;
        if ( length == 960 )
        {
            tmp_length = L_SPEC48k; // this is temp. hack to keep EVS BE
            tmp_length = L_SPEC48k;
        }

        interleave_spectrum_fx( t_audio, tmp_length );
@@ -168,14 +173,18 @@ void hq_hr_enc_fx(
    test();
    IF( EQ_16( hqswb_clas, HQ_GEN_SWB ) || EQ_16( hqswb_clas, HQ_GEN_FB ) )
    {
#ifdef HARM_HQ_CORE2
#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
        tmp_length = length;
        if ( st_fx->bwidth == FB )
        {
            tmp_length = L_SPEC48k; // this is temp. hack to keep EVS BE
            tmp_length = L_SPEC48k;
        }

        hq_generic_hf_encoding_fx( st_fx->element_mode, t_audio, hq_generic_fenv, hq_generic_offset, st_fx, &hq_generic_exc_clas, tmp_length );
#else
        hq_generic_hf_encoding_fx( st_fx->element_mode, t_audio, hq_generic_fenv, hq_generic_offset, st_fx, &hq_generic_exc_clas, length );
#endif
#else
        hq_generic_encoding_fx( t_audio, hq_generic_fenv, hq_generic_offset, st_fx, &hq_generic_exc_clas /*, length*/ );
#endif
@@ -426,7 +435,7 @@ void hq_hr_enc_ivas_fx(
    test();
    IF( EQ_16( hqswb_clas, HQ_GEN_SWB ) || EQ_16( hqswb_clas, HQ_GEN_FB ) )
    {
#ifdef HARM_HQ_CORE2
#ifdef HARM_HQ_CORE
        hq_generic_hf_encoding_fx( st->element_mode, t_audio_fx, hq_generic_fenv_fx, hq_generic_offset, st, &hq_generic_exc_clas, length );
#else
        hq_generic_hf_encoding_fx( t_audio_fx, hq_generic_fenv_fx, hq_generic_offset, st, &hq_generic_exc_clas, length );
@@ -546,7 +555,7 @@ void hq_hr_enc_ivas_fx(
    move16();

    /* Prepare synthesis for LB generation in case of switch to ACELP */
#ifdef HARM_HQ_CORE2
#ifdef HARM_HQ_CORE
    IF( st->element_mode > EVS_MONO )
#endif
    {
Loading