Commit 3ff461a0 authored by Arash Azizi's avatar Arash Azizi
Browse files

issue: 2457 Unfinished commits trying to harmonize Extend function pair

parent 82ef8f7d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@
#define FIX_1525_UNINIT_FORMAT_SWITCHING_DEC            /* VA: float issue 1525: fix reading of uninitialized memory in format switching at the decoder */
#define HARMONIZE_2446_CON_TCX_FX                       /* FhG: basop issue: 2446 harmonization of function con_tcx_fx() */
#define FIX_2433_ARITH_OVERFLOW_IN_QMETA_ENC            /* Nokia: Fix to convert non-converted binary operations */
#define HARMONIZE_2481_EXTEND_SHRINK                    /* FhG: basop issue 2481 Harmonizing functions extend_frm_*fx() and shrink_frm_*fx */

/* #################### End BE switches ################################## */

+19 −3
Original line number Diff line number Diff line
@@ -1952,6 +1952,7 @@ static bool shrink_frm_ivas_fx(
*
********************************************************************************
*/
#ifndef HARMONIZE_2481_EXTEND_SHRINK
static bool extend_frm_fx(
    apa_state_t *ps,
    const Word16 frm_in_fx[], // Qx
@@ -2206,13 +2207,23 @@ static bool extend_frm_fx(
    return 0;
}

#endif // !HARMONIZE_2481_EXTEND_SHRINK

#ifndef HARMONIZE_2481_EXTEND_SHRINK
static bool extend_frm_ivas_fx(
    apa_state_t* ps,
    const Word16 frm_in_fx[], // Qx
    Word16 frm_out_fx[],      // Qx
    Word16 Q_frm_in,
    UWord16* l_frm_out )
#else
static bool extend_frm_fx(
    apa_state_t* ps,
    const Word16 frm_in_fx[], // Qx
    Word16 frm_out_fx[],      // Qx
    Word16 Q_frm_in,
    UWord16* l_frm_out)
#endif // !HARMONIZE_2481_EXTEND_SHRINK
{
    bool findSynchResult = 0;
    move16();
@@ -2334,7 +2345,12 @@ static bool extend_frm_ivas_fx(
    IF( over[n] )
    {
        /* calculate overlap position */
#ifndef HARMONIZE_2481_EXTEND_SHRINK
        IF(isSilence_ivas_fx(frm_in_fx, Q_frm_in, l_seg, 10))
#else

        IF((isSilence_ivas_fx(frm_in_fx, Q_frm_in, l_seg, 10) && NE_16(st->element_mode, EVS_MONO)) || (isSilence_fx(frm_in_fx, l_seg, 10) && EQ_16(st->element_mode, EVS_MONO)))
#endif // !HARMONIZE_2481_EXTEND_SHRINK
        {
            /* maximum scaling */
            energy_fx = -65 * ( 1 << 8 ); // Q8