Commit 8d688c88 authored by sagnowski's avatar sagnowski
Browse files

Disable fix in EVS mode to keep BE

parent 469329b7
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@
#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD      /* VA/Eri: issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */
#define NONBE_1122_JBM_FIX_PLAYOUT_DELAY_IN_DTX         /* FhG: Avoid JBM ignoring safety margin and setting playout delay to 0 during DTX */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */

#define NONBE_1231_BASOP_819_THRESHOLD_MASA2TOTAL        /* Nokia: add fix for precision limitation in comparison with masa2total energy ratio threshold to be aligned with BASOP*/
/* ##################### End NON-BE switches ########################### */
+20 −1
Original line number Diff line number Diff line
@@ -199,6 +199,9 @@ struct JB4
    JB4_DATAUNIT_HANDLE freeMemorySlots[MAX_JBM_SLOTS];
    uint16_t nFreeMemorySlots;
    /*@} */
#ifdef NONBE_1122_KEEP_EVS_MODE_UNCHANGED
    bool evsMode;
#endif
}; /* JB4 */


@@ -293,6 +296,9 @@ ivas_error JB4_Create(
        h->freeMemorySlots[iter] = &h->memorySlots[iter];
    }
    h->nFreeMemorySlots = MAX_JBM_SLOTS;
#ifdef NONBE_1122_KEEP_EVS_MODE_UNCHANGED
    h->evsMode = false;
#endif
    *ph = h;

    return IVAS_ERR_OK;
@@ -369,6 +375,12 @@ ivas_error JB4_Init(
    return IVAS_ERR_OK;
}

#ifdef NONBE_1122_KEEP_EVS_MODE_UNCHANGED
void JB4_TMP_SetEvsCompatFlag( JB4_HANDLE h )
{
    h->evsMode = true;
}
#endif

/* Returns a memory slot to store a new data unit */
JB4_DATAUNIT_HANDLE JB4_AllocDataUnit(
@@ -672,7 +684,14 @@ static void JB4_targetPlayoutDelay(
    }

#ifdef NONBE_1122_JBM_FIX_PLAYOUT_DELAY_IN_DTX
#ifdef NONBE_1122_KEEP_EVS_MODE_UNCHANGED
    if ( !h->evsMode )
    {
#endif
        *targetDtx = JB4_MAX( *targetDtx, (uint32_t) h->safetyMargin );
#ifdef NONBE_1122_KEEP_EVS_MODE_UNCHANGED
    }
#endif
    *targetStartUp = JB4_MAX( *targetStartUp, (uint32_t) h->safetyMargin );
#else
    if ( *targetStartUp < 60 )
+4 −0
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ void JB4_Destroy( JB4_HANDLE *ph );

ivas_error JB4_Init( JB4_HANDLE h, const int16_t safetyMargin );

#ifdef NONBE_1122_KEEP_EVS_MODE_UNCHANGED
void JB4_TMP_SetEvsCompatFlag( JB4_HANDLE h );
#endif

JB4_DATAUNIT_HANDLE JB4_AllocDataUnit( JB4_HANDLE h );

void JB4_FreeDataUnit( JB4_HANDLE h, JB4_DATAUNIT_HANDLE dataUnit );
+6 −0
Original line number Diff line number Diff line
@@ -793,6 +793,12 @@ ivas_error IVAS_DEC_EnableVoIP(
    {
        return IVAS_ERR_FAILED_ALLOC;
    }
#ifdef NONBE_1122_KEEP_EVS_MODE_UNCHANGED
    if ( hIvasDec->mode == IVAS_DEC_MODE_EVS )
    {
        JB4_TMP_SetEvsCompatFlag( hIvasDec->hVoIP->hJBM );
    }
#endif

    /* init flush buffer if necessary (only needed for binaural)*/
    if ( hIvasDec->flushbuffer == NULL && ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )