Commit 0cb7ff36 authored by vaclav's avatar vaclav
Browse files

formal improvements

parent c8e34f38
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -96,8 +96,8 @@ void ivas_fine_gain_pred_fx(
                    tmp1 = fine_gain_pred_sqrt_bw[bw_idx];
                }
                ELSE
#endif
                {
#endif
                    Word16 norm = norm_s( bw );
#ifdef HARM_HQ_CORE
                    Word16 tmp_exp = sub( 15, norm );
@@ -107,7 +107,9 @@ void ivas_fine_gain_pred_fx(
                    tmp1 = Sqrt16( shl( bw, norm ), &tmp_exp );
                    tmp1 = shr( tmp1, sub( sub( 15, tmp_exp ), Q11 ) );
                    Mpy_32_16_ss( L_tmp, tmp1, &L_tmp, &lsb ); /*31-exp+11-15=27-exp */
#ifdef HARM_HQ_CORE
                }
#endif
                Mpy_32_16_ss( L_tmp, tmp1, &L_tmp, &lsb );              /*31-exp+11-15=27-exp */
                gp = round_fx_sat( L_shl_sat( L_tmp, add( 1, exp ) ) ); /*27-exp+1+exp-16=12 */
                test();
+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_CORE_EVS_TO_BE_CHECKED                  // hack to keep EVS BE
#define HARM_HQ_CORE_KEEP_EVS_BE                  // hack to keep EVS BE

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

+1 −1
Original line number Diff line number Diff line
@@ -5035,7 +5035,7 @@ void ivas_hq_ecu_fx(
                                                                   ( 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_EVS_TO_BE_CHECKED
#ifdef HARM_HQ_CORE_KEEP_EVS_BE
    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 −4
Original line number Diff line number Diff line
@@ -505,11 +505,13 @@ void hq_hr_dec_fx(
     *------------------------------------------------------------------*/

#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
#ifdef HARM_HQ_CORE_KEEP_EVS_BE
    Word16 tmp_length = length;
    if ( length == 960 )
    move16();
    if ( 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,
@@ -696,11 +698,13 @@ void hq_hr_dec_fx(

    IF( EQ_16( *is_transient, 1 ) )
    {
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
#ifdef HARM_HQ_CORE_KEEP_EVS_BE
        tmp_length = length;
        if ( length == 960 )
        move16();
        if ( EQ_16( length, L_FRAME48k ) )
        {
            tmp_length = L_SPEC48k;
            move16();
        }

        de_interleave_spectrum_fx( t_audio_q, tmp_length );
+12 −6
Original line number Diff line number Diff line
@@ -102,11 +102,13 @@ void hq_hr_enc_fx(
     *------------------------------------------------------------------*/

#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
#ifdef HARM_HQ_CORE_KEEP_EVS_BE
    Word16 tmp_length = length;
    if ( length == 960 )
    move16();
    if ( 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,
@@ -127,11 +129,13 @@ 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_EVS_TO_BE_CHECKED
#ifdef HARM_HQ_CORE_KEEP_EVS_BE
        tmp_length = length;
        if ( length == 960 )
        move16();
        if ( EQ_16( length, L_FRAME48k ) )
        {
            tmp_length = L_SPEC48k;
            move16();
        }

        interleave_spectrum_fx( t_audio, tmp_length );
@@ -174,11 +178,13 @@ void hq_hr_enc_fx(
    IF( EQ_16( hqswb_clas, HQ_GEN_SWB ) || EQ_16( hqswb_clas, HQ_GEN_FB ) )
    {
#ifdef HARM_HQ_CORE
#ifdef HARM_HQ_CORE_EVS_TO_BE_CHECKED
#ifdef HARM_HQ_CORE_KEEP_EVS_BE
        tmp_length = length;
        if ( st_fx->bwidth == FB )
        move16();
        if ( EQ_16( length, L_FRAME48k ) )
        {
            tmp_length = L_SPEC48k;
            move16();
        }

        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 );
Loading