Commit fc3ac08d authored by vaclav's avatar vaclav
Browse files

issue 1299: fix to 'active_cnt' parameter to be in sync between encoder and...

issue 1299: fix to 'active_cnt' parameter to be in sync between encoder and decoder; under NONBE_1299_ACTIVE_CNT
parent b91f1a56
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@
#define NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING           /* Ericsson: issue 1180, corrected long term mute loop attnuation after 200ms  in PhECU-PLC  */
#define NONBE_1289_STEREO_SW_TO_MONO                    /* VA: issue 1289: Fix glitch when stereo signal is decoded to mono n TD->DFT switching */
#define NONBE_1296_TDREND_ITD_OUT_OF_BOUNDS_ACCESS      /* Eri: issue 1296: ITD resampling can occasionally read out of bounds, especially when the requested subframes are short (1.25 ms). Seen for headtracking+JBM. */
#define NONBE_1299_ACTIVE_CNT                           /* VA: issue 1299: fix to 'active_cnt' parameter to be in sync between encoder and decoder */

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

+4 −0
Original line number Diff line number Diff line
@@ -294,7 +294,11 @@ ivas_error init_decoder(
    st->last_active_brate = ACELP_7k20;
    st->last_CNG_L_frame = L_FRAME;

#ifdef NONBE_1299_ACTIVE_CNT
    st->active_cnt = CNG_TYPE_HO;
#else
    st->active_cnt = 20;
#endif

    if ( idchan == 0 && ( st->element_mode == EVS_MONO || st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD ) )
    {
+15 −0
Original line number Diff line number Diff line
@@ -401,14 +401,29 @@ ivas_error ivas_cpe_dec(
            sts[n]->active_cnt = 0;
            if ( sts[1] != NULL )
            {
#ifdef NONBE_1299_ACTIVE_CNT
                if ( sts[1]->ini_frame == 0 )
                {
                    sts[1]->active_cnt = CNG_TYPE_HO;
                }
                else
                {
                    sts[1]->active_cnt = 0;
                }
#else
                sts[1]->active_cnt = 0;
#endif
            }
        }
        else
        {
            sts[n]->VAD = 1;
            sts[n]->active_cnt++;
#ifdef NONBE_1299_ACTIVE_CNT
            sts[n]->active_cnt = min( sts[n]->active_cnt, 200 );
#else
            sts[n]->active_cnt = min( sts[n]->active_cnt, 100 );
#endif
        }

        /* set CNA flag */