Commit 5a518fa7 authored by vaclav's avatar vaclav
Browse files

fix FIX_2252_TD_CNG_STARTS_SID

parent 3cdbe03a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@
#define FIX_2015_PREMPH_SAT_ALT_PART2                   /* VA: Add missing scaling factor to be passed to AVQ_cod() */
#define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH         /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */
#define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */
#define FIX_2252_TD_CNG_STARTS_SID                      /* VA: issues 2251 and 2252: Resolve "MSAN with bitstream that starts with an SID" */

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

+10 −0
Original line number Diff line number Diff line
@@ -76,10 +76,20 @@ void decision_matrix_dec_fx(
                    move16();

                    tmp16 = get_next_indice_fx( st, 1 ); // Q0
#ifdef FIX_2252_TD_CNG_STARTS_SID
                    IF ( EQ_16( tmp16, 1 ) )
#else
                    if ( EQ_16( tmp16, 1 ) )
#endif
                    {
                        st->L_frame = L_FRAME16k;
                        move16();
#ifdef FIX_2252_TD_CNG_STARTS_SID
                        st->nb_subfr = NB_SUBFR16k;
                        move16();
                        st->bwidth = WB;
                        move16();
#endif
                    }
                }
                ELSE
+18 −0
Original line number Diff line number Diff line
@@ -91,12 +91,30 @@ ivas_error init_decoder_fx(
    move16();
    st_fx->ini_frame = 0;
    move16();
#ifdef FIX_2252_TD_CNG_STARTS_SID
    IF( st->element_mode == EVS_MONO )
    {
        st->bwidth = NB;
        move16();
        st->last_bwidth = NB;
        move16();
    }
    ELSE
    {
        st_fx->bwidth = WB;
        move16();
        st_fx->last_bwidth = WB;
        move16();
    }
#else
    st_fx->bwidth = NB;
    move16();
    st_fx->last_bwidth = NB;
    move16();
#endif
    st_fx->extl_brate = 0;
    move16();

    st_fx->coder_type = GENERIC; /* low-rate mode flag */
    move16();
    st_fx->last_coder_type = GENERIC;
+6 −0
Original line number Diff line number Diff line
@@ -115,6 +115,12 @@ void ivas_decision_matrix_dec_fx(
            {
                st->L_frame = L_FRAME16k;
                move16();
#ifdef FIX_2252_TD_CNG_STARTS_SID
                st->nb_subfr = NB_SUBFR16k;
                move16();
                st->bwidth = WB;
                move16();
#endif
            }
            ELSE
            {