Commit 2fcd6932 authored by Arash Azizi's avatar Arash Azizi
Browse files

issue: 2481 Adding legacy flag in the function signature. changing the...

issue: 2481 Adding legacy flag in the function signature. changing the mechanism of deciding legacy case
parent 4da2b2f1
Loading
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ static bool extend_frm_ivas_fx( apa_state_t *ps, const Word16 frm_in[], Word16 f

#else

static bool extend_frm_fx( apa_state_t *ps, const Word16 frm_in[], Word16 frm_out[], Word16 Q_frm_in, UWord16 *l_frm_out );
static bool extend_frm_fx( apa_state_t *ps, const Word16 frm_in[], Word16 frm_out[], Word16 Q_frm_in, UWord16 *l_frm_out, Word16 leg_flag );

#endif // !HARMONIZE_2481_EXTEND_SHRINK

@@ -806,7 +806,7 @@ UWord8 apa_exec_fx(
#ifndef HARMONIZE_2481_EXTEND_SHRINK
            extend_frm_fx( ps, frm_in, a_out, &l_frm_out );
#else
            extend_frm_fx( ps, frm_in, a_out, NULL, &l_frm_out );
            extend_frm_fx( ps, frm_in, a_out, 0 , &l_frm_out, (Word16) 1 );
#endif // !HARMONIZE_2481_EXTEND_SHRINK
        }
        /* control the amount/frequency of scaling */
@@ -1045,7 +1045,7 @@ UWord8 apa_exec_ivas_fx(
#ifndef HARMONIZE_2481_EXTEND_SHRINK
                extend_frm_ivas_fx( ps, frm_in, a_tmp, Q_a_out, &l_frm_out );
#else
                extend_frm_fx( ps, frm_in, a_tmp, Q_a_out, &l_frm_out );
                extend_frm_fx( ps, frm_in, a_tmp, Q_a_out, &l_frm_out, (Word16) 0 );
#endif // !HARMONIZE_2481_EXTEND_SHRINK
            }
            /* control the amount/frequency of scaling */
@@ -2238,7 +2238,8 @@ static bool extend_frm_fx(
    const Word16 frm_in_fx[], // Qx
    Word16 frm_out_fx[],      // Qx
    Word16 Q_frm_in,
    UWord16 *l_frm_out )
    UWord16 *l_frm_out,
    Word16 leg_flag)
#endif // !HARMONIZE_2481_EXTEND_SHRINK
{
    bool findSynchResult = 0;
@@ -2364,7 +2365,7 @@ static bool extend_frm_fx(
#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 ) && ( Q_frm_in != NULL ) || ( isSilence_fx( frm_in_fx, l_seg, 10 ) && ( Q_frm_in == NULL ) ) )
        IF( isSilence_ivas_fx( frm_in_fx, Q_frm_in, l_seg, 10 ) && ( !leg_flag ) || ( isSilence_fx( frm_in_fx, l_seg, 10 ) && leg_flag ) )
#endif // !HARMONIZE_2481_EXTEND_SHRINK
        {
            /* maximum scaling */
@@ -2398,7 +2399,7 @@ static bool extend_frm_fx(
            findSynchResult = find_synch_fx( ps, frmInScaled, extract_l( L_shl( l_frm, 1 ) ), s_start, sub( s_end, s_start ), sync_start, l_seg, l_frm, &energy_fx, &quality_fx, &xtract[n] );
            ps->signalScaleForCorrelation = add( ps->signalScaleForCorrelation, Q_frm_in );
#else
            IF( Q_frm_in == NULL )
            IF( leg_flag )
            {
                findSynchResult = find_synch_fx( ps, frmInScaled, extract_l( L_shl( l_frm, 1 ) ), s_start, sub( s_end, s_start ), sync_start, l_seg, l_frm, &energy_fx, &quality_fx, &xtract[n] );
            }