Commit c1c6612c authored by vaclav's avatar vaclav
Browse files

alternative to st->icbwe_brate: new flag 'inactive_coder_type_flag'

parent 0c934c43
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@
#define NONBE_FIX_588_UPDATE_FASTCONV_SD                      /* FhG: issue 588: update FastConv SD HRTFs in CLDFB domain with new conversion method */
#define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ                 /* VA: issue 797:  fix of crash when the separated object is inactive and the MASA metadata is using very few bits */


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

/* ################## End DEVELOPMENT switches ######################### */
+1 −1
Original line number Diff line number Diff line
@@ -804,7 +804,7 @@ ivas_error acelp_core_dec(
                decod_tran( st, st->L_frame, tc_subfr, Aq, Es_pred, pitch_buf, voice_factors, exc, exc2, bwe_exc, unbits, sharpFlag, gain_buf );
            }
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
            else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && ( st->core_brate + st->extl_brate + st->icbwe_brate <= MAX_GSC_INACTIVE_BRATE ) ) )
            else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->inactive_coder_type_flag ) )
#else
            else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->total_brate <= MAX_GSC_INACTIVE_BRATE ) )
#endif
+12 −3
Original line number Diff line number Diff line
@@ -405,9 +405,6 @@ void decision_matrix_dec(

    /* set core bitrate */
    st->core_brate = st->total_brate - st->extl_brate;
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    st->icbwe_brate = 0;
#endif

    /*-----------------------------------------------------------------*
     * Read HQ signaling bits from the bitstream
@@ -561,5 +558,17 @@ void decision_matrix_dec(
        st->last_extl = st->extl;
    }

#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    /*-----------------------------------------------------------------*
     * set inactive coder_type flag in ACELP core
     *-----------------------------------------------------------------*/

    st->inactive_coder_type_flag = 0; /* AVQ by default */
    if ( st->total_brate <= MAX_GSC_INACTIVE_BRATE )
    {
        st->inactive_coder_type_flag = 1; /* GSC */
    }
#endif

    return;
}
+3 −3
Original line number Diff line number Diff line
@@ -82,12 +82,12 @@ ivas_error init_decoder(
    st->bwidth = NB;
    st->last_bwidth = NB;
    st->extl_brate = 0;
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    st->icbwe_brate = 0;
#endif

    st->coder_type = GENERIC;
    st->last_coder_type = GENERIC;
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    st->inactive_coder_type_flag = 0;
#endif
    st->last_L_frame = st->L_frame;
    st->last_core_brate = st->core_brate;
    st->last_core = -1;
+12 −3
Original line number Diff line number Diff line
@@ -344,9 +344,6 @@ void ivas_decision_matrix_dec(

    /* set core bitrate */
    st->core_brate = st->total_brate - st->extl_brate - icbwe_brate;
#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    st->icbwe_brate = icbwe_brate;
#endif

    /*-----------------------------------------------------------------*
     * Read transform core (TCX vs. HQ) signaling bit from the bitstream
@@ -438,6 +435,18 @@ void ivas_decision_matrix_dec(
        st->nb_subfr = NB_SUBFR;
    }

#ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ
    /*-----------------------------------------------------------------*
     * set inactive coder_type flag in ACELP core
     *-----------------------------------------------------------------*/

    st->inactive_coder_type_flag = 0; /* AVQ by default */
    if ( st->total_brate <= MAX_GSC_INACTIVE_BRATE )
    {
        st->inactive_coder_type_flag = 1; /* GSC */
    }
#endif

    /*-----------------------------------------------------------------*
     * Reconfigure in case when output_Fs < input_Fs
     *-----------------------------------------------------------------*/
Loading