Loading lib_dec/jbm_pcmdsp_apa_fx.c +36 −16 Original line number Diff line number Diff line Loading @@ -161,9 +161,9 @@ static bool extend_frm_ivas_fx( apa_state_t *ps, const Word16 frm_in[], Word16 f #else static bool shrink_frm_fx( apa_state_t *ps, const Word16 frm_in[], UWord16 maxScaling, Word16 frm_out[], Word16 Q_frm_in, UWord16 *l_frm_out, Word16 leg_flag ); static bool shrink_frm_fx( apa_state_t *ps, const Word16 frm_in[], UWord16 maxScaling, Word16 frm_out[], Word16 Q_frm_in, UWord16 *l_frm_out, Word16 isEVS ); 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 ); 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 isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK Loading Loading @@ -707,7 +707,7 @@ UWord8 apa_exec_fx( Word32 expScaling, actScaling; UWord32 statsResetThreshold, statsResetShift; #ifdef HARMONIZE_2481_EXTEND_SHRINK Word16 leg_flag = 1; Word16 isEVS = 1; #endif // HARMONIZE_2481_EXTEND_SHRINK statsResetThreshold = 1637; Loading Loading @@ -807,7 +807,7 @@ UWord8 apa_exec_fx( #ifndef HARMONIZE_2481_EXTEND_SHRINK shrink_frm_fx( ps, frm_in, maxScaling, a_out, &l_frm_out ); #else shrink_frm_fx( ps, frm_in, maxScaling, a_out, 0, &l_frm_out, leg_flag ); shrink_frm_fx( ps, frm_in, maxScaling, a_out, 0, &l_frm_out, isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK } /* extend */ Loading @@ -816,7 +816,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, 0, &l_frm_out, leg_flag ); extend_frm_fx( ps, frm_in, a_out, 0, &l_frm_out, isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK } /* control the amount/frequency of scaling */ Loading Loading @@ -937,7 +937,7 @@ UWord8 apa_exec_ivas_fx( Word16 Q_a_out; Word16 Q_a_out_init_old; #ifdef HARMONIZE_2481_EXTEND_SHRINK Word16 leg_flag = 0; Word16 isEVS = 0; #endif // HARMONIZE_2481_EXTEND_SHRINK Q_a_out = add( getScaleFactor32_copy( a_in, l_in ), Q11 - Q16 - Q1 ); Loading Loading @@ -1053,7 +1053,7 @@ UWord8 apa_exec_ivas_fx( #ifndef HARMONIZE_2481_EXTEND_SHRINK shrink_frm_ivas_fx( ps, frm_in, maxScaling, a_tmp, Q_a_out, &l_frm_out ); #else shrink_frm_fx( ps, frm_in, maxScaling, a_tmp, Q_a_out, &l_frm_out, leg_flag ); shrink_frm_fx( ps, frm_in, maxScaling, a_tmp, Q_a_out, &l_frm_out, isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK } /* extend */ Loading @@ -1062,7 +1062,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, leg_flag ); extend_frm_fx( ps, frm_in, a_tmp, Q_a_out, &l_frm_out, isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK } /* control the amount/frequency of scaling */ Loading Loading @@ -1811,7 +1811,7 @@ static bool shrink_frm_fx( Word16 frm_out_fx[], // Qx Word16 Q_frm_in, UWord16 *l_frm_out, Word16 leg_flag ) Word16 isEVS ) #endif // !HARMONIZE_2481_EXTEND_SHRINK { bool findSynchResult = 0; Loading @@ -1823,6 +1823,9 @@ static bool shrink_frm_fx( Word32 quality_fx = 0; UWord16 l_frm; UWord16 l_seg; #ifdef HARMONIZE_2481_EXTEND_SHRINK Word16 Silence; #endif // HARMONIZE_2481_EXTEND_SHRINK move16(); move32(); Loading Loading @@ -1850,7 +1853,14 @@ static bool shrink_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 ) && ( !leg_flag ) ) || ( isSilence_fx( frm_in_fx, l_seg, 10 ) && leg_flag ) ) IF(isEVS) { Silence = isSilence_fx(frm_in_fx, l_seg, 10); } ELSE{ Silence = isSilence_ivas_fx(frm_in_fx, Q_frm_in, l_seg, 10); } IF( Silence ) #endif // !HARMONIZE_2481_EXTEND_SHRINK { /* maximum scaling */ Loading Loading @@ -1899,7 +1909,7 @@ static bool shrink_frm_fx( ps->signalScaleForCorrelation = add( ps->signalScaleForCorrelation, Q_frm_in ); move16(); #else IF( leg_flag ) IF( isEVS ) { findSynchResult = find_synch_fx( ps, ps->frmInScaled, l_frm, s_start, (UWord16) ( sub( s_end, s_start ) ), 0, l_seg, 0, &energy_fx, &quality_fx, &xtract ); } Loading Loading @@ -2294,7 +2304,7 @@ static bool extend_frm_fx( Word16 frm_out_fx[], // Qx Word16 Q_frm_in, UWord16 *l_frm_out, Word16 leg_flag ) Word16 isEVS ) #endif // !HARMONIZE_2481_EXTEND_SHRINK { bool findSynchResult = 0; Loading @@ -2312,6 +2322,10 @@ static bool extend_frm_fx( Word32 quality_fx = 0; move32(); UWord16 l_frm, l_seg; #ifdef HARMONIZE_2481_EXTEND_SHRINK Word16 Silence; #endif // HARMONIZE_2481_EXTEND_SHRINK const Word16 *fadeOut_fx, *fadeIn_fx; Word16 *out_fx; Loading Loading @@ -2420,7 +2434,13 @@ 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 ) && ( !leg_flag ) ) || ( isSilence_fx( frm_in_fx, l_seg, 10 ) && leg_flag ) ) IF(isEVS) { Silence = isSilence_fx(frm_in_fx, l_seg, 10); } ELSE{ Silence = isSilence_ivas_fx(frm_in_fx, Q_frm_in, l_seg, 10); } IF(Silence) #endif // !HARMONIZE_2481_EXTEND_SHRINK { /* maximum scaling */ Loading Loading @@ -2454,7 +2474,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( leg_flag ) IF( isEVS ) { 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] ); } Loading Loading
lib_dec/jbm_pcmdsp_apa_fx.c +36 −16 Original line number Diff line number Diff line Loading @@ -161,9 +161,9 @@ static bool extend_frm_ivas_fx( apa_state_t *ps, const Word16 frm_in[], Word16 f #else static bool shrink_frm_fx( apa_state_t *ps, const Word16 frm_in[], UWord16 maxScaling, Word16 frm_out[], Word16 Q_frm_in, UWord16 *l_frm_out, Word16 leg_flag ); static bool shrink_frm_fx( apa_state_t *ps, const Word16 frm_in[], UWord16 maxScaling, Word16 frm_out[], Word16 Q_frm_in, UWord16 *l_frm_out, Word16 isEVS ); 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 ); 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 isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK Loading Loading @@ -707,7 +707,7 @@ UWord8 apa_exec_fx( Word32 expScaling, actScaling; UWord32 statsResetThreshold, statsResetShift; #ifdef HARMONIZE_2481_EXTEND_SHRINK Word16 leg_flag = 1; Word16 isEVS = 1; #endif // HARMONIZE_2481_EXTEND_SHRINK statsResetThreshold = 1637; Loading Loading @@ -807,7 +807,7 @@ UWord8 apa_exec_fx( #ifndef HARMONIZE_2481_EXTEND_SHRINK shrink_frm_fx( ps, frm_in, maxScaling, a_out, &l_frm_out ); #else shrink_frm_fx( ps, frm_in, maxScaling, a_out, 0, &l_frm_out, leg_flag ); shrink_frm_fx( ps, frm_in, maxScaling, a_out, 0, &l_frm_out, isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK } /* extend */ Loading @@ -816,7 +816,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, 0, &l_frm_out, leg_flag ); extend_frm_fx( ps, frm_in, a_out, 0, &l_frm_out, isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK } /* control the amount/frequency of scaling */ Loading Loading @@ -937,7 +937,7 @@ UWord8 apa_exec_ivas_fx( Word16 Q_a_out; Word16 Q_a_out_init_old; #ifdef HARMONIZE_2481_EXTEND_SHRINK Word16 leg_flag = 0; Word16 isEVS = 0; #endif // HARMONIZE_2481_EXTEND_SHRINK Q_a_out = add( getScaleFactor32_copy( a_in, l_in ), Q11 - Q16 - Q1 ); Loading Loading @@ -1053,7 +1053,7 @@ UWord8 apa_exec_ivas_fx( #ifndef HARMONIZE_2481_EXTEND_SHRINK shrink_frm_ivas_fx( ps, frm_in, maxScaling, a_tmp, Q_a_out, &l_frm_out ); #else shrink_frm_fx( ps, frm_in, maxScaling, a_tmp, Q_a_out, &l_frm_out, leg_flag ); shrink_frm_fx( ps, frm_in, maxScaling, a_tmp, Q_a_out, &l_frm_out, isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK } /* extend */ Loading @@ -1062,7 +1062,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, leg_flag ); extend_frm_fx( ps, frm_in, a_tmp, Q_a_out, &l_frm_out, isEVS ); #endif // !HARMONIZE_2481_EXTEND_SHRINK } /* control the amount/frequency of scaling */ Loading Loading @@ -1811,7 +1811,7 @@ static bool shrink_frm_fx( Word16 frm_out_fx[], // Qx Word16 Q_frm_in, UWord16 *l_frm_out, Word16 leg_flag ) Word16 isEVS ) #endif // !HARMONIZE_2481_EXTEND_SHRINK { bool findSynchResult = 0; Loading @@ -1823,6 +1823,9 @@ static bool shrink_frm_fx( Word32 quality_fx = 0; UWord16 l_frm; UWord16 l_seg; #ifdef HARMONIZE_2481_EXTEND_SHRINK Word16 Silence; #endif // HARMONIZE_2481_EXTEND_SHRINK move16(); move32(); Loading Loading @@ -1850,7 +1853,14 @@ static bool shrink_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 ) && ( !leg_flag ) ) || ( isSilence_fx( frm_in_fx, l_seg, 10 ) && leg_flag ) ) IF(isEVS) { Silence = isSilence_fx(frm_in_fx, l_seg, 10); } ELSE{ Silence = isSilence_ivas_fx(frm_in_fx, Q_frm_in, l_seg, 10); } IF( Silence ) #endif // !HARMONIZE_2481_EXTEND_SHRINK { /* maximum scaling */ Loading Loading @@ -1899,7 +1909,7 @@ static bool shrink_frm_fx( ps->signalScaleForCorrelation = add( ps->signalScaleForCorrelation, Q_frm_in ); move16(); #else IF( leg_flag ) IF( isEVS ) { findSynchResult = find_synch_fx( ps, ps->frmInScaled, l_frm, s_start, (UWord16) ( sub( s_end, s_start ) ), 0, l_seg, 0, &energy_fx, &quality_fx, &xtract ); } Loading Loading @@ -2294,7 +2304,7 @@ static bool extend_frm_fx( Word16 frm_out_fx[], // Qx Word16 Q_frm_in, UWord16 *l_frm_out, Word16 leg_flag ) Word16 isEVS ) #endif // !HARMONIZE_2481_EXTEND_SHRINK { bool findSynchResult = 0; Loading @@ -2312,6 +2322,10 @@ static bool extend_frm_fx( Word32 quality_fx = 0; move32(); UWord16 l_frm, l_seg; #ifdef HARMONIZE_2481_EXTEND_SHRINK Word16 Silence; #endif // HARMONIZE_2481_EXTEND_SHRINK const Word16 *fadeOut_fx, *fadeIn_fx; Word16 *out_fx; Loading Loading @@ -2420,7 +2434,13 @@ 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 ) && ( !leg_flag ) ) || ( isSilence_fx( frm_in_fx, l_seg, 10 ) && leg_flag ) ) IF(isEVS) { Silence = isSilence_fx(frm_in_fx, l_seg, 10); } ELSE{ Silence = isSilence_ivas_fx(frm_in_fx, Q_frm_in, l_seg, 10); } IF(Silence) #endif // !HARMONIZE_2481_EXTEND_SHRINK { /* maximum scaling */ Loading Loading @@ -2454,7 +2474,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( leg_flag ) IF( isEVS ) { 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] ); } Loading