Loading lib_dec/FEC_HQ_phase_ecu_fx.c +19 −18 Original line number Diff line number Diff line Loading @@ -1456,6 +1456,7 @@ static void ivas_spec_ana_fx( Word16 window_corr, window_corr_step; Word16 currPlocs, endPlocs, nJacob, k, i; Word32 sig, noise, st_point, end_point; Word32 xfp_32[3]; // Q + 16 move16(); // LprotLog2Minus1 move16(); // hamm_len2 Loading Loading @@ -1692,9 +1693,9 @@ static void ivas_spec_ana_fx( test(); IF( n > 0 && *pPlocs == 0 ) /* Very 1st peak position possible to have a peak at 0/DC index position. */ { fraction = imax_fx( &xfp[*pPlocs], -1 ); /* in Q15 */ acc = L_deposit_h( *pPlocs ); *pPlocsi++ = L_mac( acc, fraction, 1 ); Copy_Scale_sig_16_32( &xfp[*pPlocs], xfp_32, 3, Q16 ); // Q + 16 acc = L_deposit_h( *pPlocs ); // Q16 *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16 move32(); pPlocs++; n = sub( n, 1 ); Loading @@ -1703,11 +1704,11 @@ static void ivas_spec_ana_fx( test(); IF( n > 0 && EQ_16( *pPlocs, 1 ) ) /* Also 2nd peak position uses DC which makes jacobsen unsuitable. */ { fraction = imax_fx( &xfp[*pPlocs - 1], -1 ); /* in Q15 */ acc = L_deposit_h( *pPlocs - 1 ); *pPlocsi++ = L_mac( acc, fraction, 1 ); Copy_Scale_sig_16_32( &xfp[*pPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 acc = L_deposit_h( sub( *pPlocs, 1 ) ); // Q16 *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16 move32(); currPlocs = *pPlocs++; currPlocs = *pPlocs++; // Q16 move16(); n = sub( n, 1 ); } Loading @@ -1730,10 +1731,10 @@ static void ivas_spec_ana_fx( FOR( k = 0; k < nJacob; k++ ) { fraction = ivas_imax2_jacobsen_mag_fx( &( X_sav[currPlocs - 1] ), &( X_sav[Lprot - 1 - currPlocs] ) ); /* in Q15 */ acc = L_deposit_h( currPlocs ); *pPlocsi++ = L_mac( acc, fraction, 1 ); acc = L_deposit_h( currPlocs ); // Q16 *pPlocsi++ = L_mac( acc, fraction, 1 ); // Q16 move32(); currPlocs = *pPlocs++; currPlocs = *pPlocs++; // Q16 move16(); } n = sub( n, nJacob ); Loading @@ -1749,11 +1750,11 @@ static void ivas_spec_ana_fx( IF( EQ_16( currPlocs, ( sub( Lprot2_1, DELTA_CORR_F0_INT ) ) ) ) /* Also 2nd last peak position uses fs/2 which makes jacobsen less suitable. */ { fraction = imax_fx( &xfp[currPlocs - 1], 0 ); /* in Q15 */ acc = L_deposit_h( sub( currPlocs, 1 ) ); *pPlocsi++ = L_mac( acc, fraction, 1 ); Copy_Scale_sig_16_32( &xfp[currPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 acc = L_deposit_h( sub( currPlocs, 1 ) ); // Q16 *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16 move32(); currPlocs = *pPlocs++; currPlocs = *pPlocs++; // Q16 move16(); n = sub( n, 1 ); } Loading @@ -1763,11 +1764,11 @@ static void ivas_spec_ana_fx( * whould point */ IF( n > 0 ) /* fs/2 which makes special case . */ { fraction = imax_fx( &xfp[currPlocs - 2], 0 ); /* in Q15 */ acc = L_deposit_h( sub( currPlocs, 2 ) ); *pPlocsi++ = L_mac( acc, fraction, 1 ); Copy_Scale_sig_16_32( &xfp[currPlocs - 2], xfp_32, 3, Q16 ); // Q + 16 acc = L_deposit_h( sub( currPlocs, 2 ) ); // Q16 *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16 move32(); currPlocs = *pPlocs++; currPlocs = *pPlocs++; // Q16 move16(); n = sub( n, 1 ); } Loading Loading
lib_dec/FEC_HQ_phase_ecu_fx.c +19 −18 Original line number Diff line number Diff line Loading @@ -1456,6 +1456,7 @@ static void ivas_spec_ana_fx( Word16 window_corr, window_corr_step; Word16 currPlocs, endPlocs, nJacob, k, i; Word32 sig, noise, st_point, end_point; Word32 xfp_32[3]; // Q + 16 move16(); // LprotLog2Minus1 move16(); // hamm_len2 Loading Loading @@ -1692,9 +1693,9 @@ static void ivas_spec_ana_fx( test(); IF( n > 0 && *pPlocs == 0 ) /* Very 1st peak position possible to have a peak at 0/DC index position. */ { fraction = imax_fx( &xfp[*pPlocs], -1 ); /* in Q15 */ acc = L_deposit_h( *pPlocs ); *pPlocsi++ = L_mac( acc, fraction, 1 ); Copy_Scale_sig_16_32( &xfp[*pPlocs], xfp_32, 3, Q16 ); // Q + 16 acc = L_deposit_h( *pPlocs ); // Q16 *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16 move32(); pPlocs++; n = sub( n, 1 ); Loading @@ -1703,11 +1704,11 @@ static void ivas_spec_ana_fx( test(); IF( n > 0 && EQ_16( *pPlocs, 1 ) ) /* Also 2nd peak position uses DC which makes jacobsen unsuitable. */ { fraction = imax_fx( &xfp[*pPlocs - 1], -1 ); /* in Q15 */ acc = L_deposit_h( *pPlocs - 1 ); *pPlocsi++ = L_mac( acc, fraction, 1 ); Copy_Scale_sig_16_32( &xfp[*pPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 acc = L_deposit_h( sub( *pPlocs, 1 ) ); // Q16 *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16 move32(); currPlocs = *pPlocs++; currPlocs = *pPlocs++; // Q16 move16(); n = sub( n, 1 ); } Loading @@ -1730,10 +1731,10 @@ static void ivas_spec_ana_fx( FOR( k = 0; k < nJacob; k++ ) { fraction = ivas_imax2_jacobsen_mag_fx( &( X_sav[currPlocs - 1] ), &( X_sav[Lprot - 1 - currPlocs] ) ); /* in Q15 */ acc = L_deposit_h( currPlocs ); *pPlocsi++ = L_mac( acc, fraction, 1 ); acc = L_deposit_h( currPlocs ); // Q16 *pPlocsi++ = L_mac( acc, fraction, 1 ); // Q16 move32(); currPlocs = *pPlocs++; currPlocs = *pPlocs++; // Q16 move16(); } n = sub( n, nJacob ); Loading @@ -1749,11 +1750,11 @@ static void ivas_spec_ana_fx( IF( EQ_16( currPlocs, ( sub( Lprot2_1, DELTA_CORR_F0_INT ) ) ) ) /* Also 2nd last peak position uses fs/2 which makes jacobsen less suitable. */ { fraction = imax_fx( &xfp[currPlocs - 1], 0 ); /* in Q15 */ acc = L_deposit_h( sub( currPlocs, 1 ) ); *pPlocsi++ = L_mac( acc, fraction, 1 ); Copy_Scale_sig_16_32( &xfp[currPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 acc = L_deposit_h( sub( currPlocs, 1 ) ); // Q16 *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16 move32(); currPlocs = *pPlocs++; currPlocs = *pPlocs++; // Q16 move16(); n = sub( n, 1 ); } Loading @@ -1763,11 +1764,11 @@ static void ivas_spec_ana_fx( * whould point */ IF( n > 0 ) /* fs/2 which makes special case . */ { fraction = imax_fx( &xfp[currPlocs - 2], 0 ); /* in Q15 */ acc = L_deposit_h( sub( currPlocs, 2 ) ); *pPlocsi++ = L_mac( acc, fraction, 1 ); Copy_Scale_sig_16_32( &xfp[currPlocs - 2], xfp_32, 3, Q16 ); // Q + 16 acc = L_deposit_h( sub( currPlocs, 2 ) ); // Q16 *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16 move32(); currPlocs = *pPlocs++; currPlocs = *pPlocs++; // Q16 move16(); n = sub( n, 1 ); } Loading