Commit 76f46ee7 authored by Jonas Svedberg's avatar Jonas Svedberg
Browse files

modified ISM rate handling to test HQ rates from 16.4 to 48 kbps only . new burst files

parent df00f5a6
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -212,6 +212,8 @@ ivas_error ivas_ism_config(
            }
        }



        n_higher = sum_s( flag_higher, n_ISms );

        if ( diff > 0 && n_higher > 0 )
@@ -252,6 +254,17 @@ ivas_error ivas_ism_config(
                limit = ( ACELP_16k_LOW_LIMIT + SWB_TBE_1k6 ) / FRAMES_PER_SEC;
            }

#ifdef DEBUGGING
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING_DEBUG
            /* for dbg testing of HQ decoder,  high rate HQ coding requires 16.4kbps  to  48kbps  */
            if ( limit < 16400 / 50 )
            {
                limit = 16400 / 50;
            }
#endif
#endif


            if ( ism_imp[ch] == ISM_NO_META )
            {
                tmp = BITS_ISM_INACTIVE;
@@ -305,6 +318,17 @@ ivas_error ivas_ism_config(
                limit_high = ACELP_12k8_HIGH_LIMIT / FRAMES_PER_SEC;
            }

#ifdef DEBUGGING
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING_DEBUG
            /* for dbg testing of HQ decoder,  high rate HQ coding requires 16.4kbps  to  48kbps  */
            if ( limit_high > 48000 / 50 )
            {
                limit_high = 48000 / 50;
            }
#endif
#endif


            tmp = (int16_t) min( bits_CoreCoder[ch], limit_high );

            diff += bits_CoreCoder[ch] - tmp;
+3 −3
Original line number Diff line number Diff line
@@ -178,9 +178,9 @@
#define NONBE_1217_INIT_OBJ_EDIT                        /* VA: issue 1217: do object editing only when objects metadata is available */
#define NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING           /* Ericsson: issue 1180, corrected long term mute loop attnuation after 200ms  in PhECU-PLC  */

//# ifdef DEBUGGING 
//#   define NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING_DEBUG     /* Ericsson FORCE HQ in music mode at 32 kbps for PLC simulations, -force HQ is not  working at 32 kbps */  
//# endif
# ifdef DEBUGGING 
#   define NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING_DEBUG     /* Ericsson FORCE HQ in music mode at 32 kbps for PLC simulations, -force HQ is not  working at 32 kbps */  
# endif

/* ##################### End NON-BE switches ########################### */

+6 −3
Original line number Diff line number Diff line
@@ -422,14 +422,14 @@ static void trans_ana(
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING
            if ( element_mode != EVS_MONO )
            {
                if ( k == 0 && burst_len > BETA_MUTE_THR ) /* beta_mute final long term attenuation adjusted only once per frame in the first sub-band */
                if ( k == 0 && burst_len > BETA_MUTE_THR ) /* beta_mute final long term attenuation adjusted only once per frame in the first sub-band, Ref   Eq(184) in 26.447 */
                {
                    *beta_mute *= BETA_MUTE_FAC;
                }
            }
            else
            {
                if ( burst_len > BETA_MUTE_THR ) /* legacy incorrect EVS_MONO operation, kept for BE,  to be updated after EVS CR */
                if ( burst_len > BETA_MUTE_THR ) /* legacy incorrect(too fast) EVS_MONO operation, still kept for BE.  To be updated after EVS CR, ref Eq (184) in 26.447 */
                {
                    *beta_mute *= BETA_MUTE_FAC;
                }
@@ -2229,7 +2229,10 @@ void hq_ecu(
                         ( st->total_brate < 48000 && ( ( ph_ecu_HqVoicing || corr > 0.85 ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) ) );

    ivas_mode_selection = ( N < PH_ECU_N_LIMIT ) || ( corr < PH_ECU_CORR_LIMIT );

#ifdef  NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING_DEBUG 
    evs_mode_selection = 0;
    ivas_mode_selection = 0;
#endif 
    if ( ( ( st->element_mode == EVS_MONO ) && evs_mode_selection ) ||
         ( ( st->element_mode != EVS_MONO ) && evs_mode_selection && ivas_mode_selection ) )

+9 −0
Original line number Diff line number Diff line
@@ -141,6 +141,15 @@ static void rate_ism_importance(
        if ( ( hIsmMeta[ch]->ism_metadata_flag == 0 || lowrate_metadata_flag[ch] == 1 ) && hSCE[ch]->hCoreCoder[0]->localVAD == 0 )
        {
            ism_imp[ch] = ISM_NO_META;
 #ifdef DEBUGGING
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING_DEBUG
            if ( nchan_transport > 1 )
            {
              ism_imp[ch] = ISM_LOW_IMP;   /*use of ISM_NO_META may cause  too low rate sum when forcing to HQ encoding modes */
            }
#endif
#endif

        }
        else if ( ctype == INACTIVE || ctype == UNVOICED )
        {
+8 −5
Original line number Diff line number Diff line
@@ -336,6 +336,13 @@ int16_t mdct_classifier(
    /* Restrict usage of HQ_core to supported operating range */
    /* EVS: brate == st->total_brate */
    /* IVAS: brate is the nominal bitrate while st->total_brate may fluctuate. This sets a hard limit for HQ at HQ_16k40 */
#ifdef DEBUGGING
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING_DEBUG
    clas_final = HQ_CORE;
     /* note for ISM  the bitrate can adaptively drop below 16.4 kbps , or be higher than 8kbps, thus activating TCX20 */
#endif
#endif

    if ( st->total_brate <= HQ_16k40 || brate < HQ_16k40 || st->bwidth == NB || brate > IVAS_48k )
    {
        clas_final = TCX_20_CORE;
@@ -348,11 +355,7 @@ int16_t mdct_classifier(
    hTcxEnc->last_gain2 = gain2;


#ifdef DEBUGGING
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING_DEBUG
    clas_final = HQ_CORE;
#endif
#endif


    return clas_final;
}
Loading