Commit a07f86c5 authored by emerit's avatar emerit
Browse files

Merge branch 'main' into hrtf_binary

parents 6936ba94 961ff0bd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -161,6 +161,9 @@
#define FIX_197_CREND_INTERFACE 
#define SET_TNS_FLAG_IN_EVERY_FRAME                     /* FhG: issue 288 - mismatch between encoder and decoder wrt TNS usage in unified stereo  with frameloss */
#define FIX_FOR_TEST                                    /* allows tests to pass using old TD binary file, to be removed after merge*/
#define FIX_299_ISM_BWS                                 /* VA: issue 299 - fix Band-width switching issues in ISM format */


/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
+5 −1
Original line number Diff line number Diff line
@@ -1028,7 +1028,11 @@ void bandwidth_switching_detect(
    {
        st->bws_cnt1 = 0;
    }
    else if ( st->total_brate > ACELP_9k60 && st->last_core_brate < ACELP_9k60 && st->bwidth == SWB && st->last_bwidth == WB )
    else if ( st->total_brate > ACELP_9k60 && st->last_core_brate < ACELP_9k60 && st->bwidth == SWB && st->last_bwidth == WB
#ifdef FIX_299_ISM_BWS
              && st->last_low_rate_mode == 0
#endif
    )
    {
        st->bws_cnt1++;
    }
+3 −0
Original line number Diff line number Diff line
@@ -107,6 +107,9 @@ ivas_error init_decoder(
    st->last_good = UNVOICED_CLAS;
    st->clas_dec = UNVOICED_CLAS;
    st->low_rate_mode = 0;
#ifdef FIX_299_ISM_BWS
    st->last_low_rate_mode = 0;
#endif

    st->lp_gainp = 0.0f;
    st->lp_gainc = 0.0f;
+3 −0
Original line number Diff line number Diff line
@@ -934,6 +934,9 @@ typedef struct Decoder_State
    int16_t ini_frame;               /* initialization frames counter */
    int16_t prev_coder_type;         /* coding type of last frame */
    int16_t low_rate_mode;           /* low-rate mode flag */
#ifdef FIX_299_ISM_BWS
    int16_t last_low_rate_mode; /* previous frame low-rate mode flag */
#endif

    /*----------------------------------------------------------------------------------*
     * ACELP core parameters
+2 −0
Original line number Diff line number Diff line
@@ -641,6 +641,8 @@ void updt_dec_common(
        st->last_bits_frame_nominal = st->bits_frame_nominal;
    }

    st->last_low_rate_mode = st->low_rate_mode;

    /*-----------------------------------------------------------------*
     * Increase the counter of initialization frames
     * Limit the max number of init. frames