Loading lib_com/ivas_qspherical_com.c +19 −0 Original line number Diff line number Diff line Loading @@ -50,7 +50,25 @@ * ivas_qmetadata_reorder_generic() * *------------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED UWord16 ivas_qmetadata_reorder_generic( const Word16 signed_value ) { UWord16 unsigned_value; IF( signed_value < 0 ) { // unsigned_value = ( ( UWord16 ) - ( signed_value + 1 ) << 1 ) + 1; unsigned_value = (UWord16) L_add( L_shl( negate( add( signed_value, 1 ) ), 1 ), 1 ); } ELSE { unsigned_value = (UWord16) L_shl( signed_value, 1 ); } return unsigned_value; } #else uint16_t ivas_qmetadata_reorder_generic( const int16_t signed_value ) { Loading @@ -67,6 +85,7 @@ uint16_t ivas_qmetadata_reorder_generic( return unsigned_value; } #endif /*------------------------------------------------------------------------- Loading lib_com/swb_bwe_com_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -543,7 +543,7 @@ void calc_normal_length_fx( pit++; } L_tmp = L_mult0( peak, add( 15, THRES ) ); /*Q_syn */ L_tmp = L_mult0( peak, 15 + THRES ); /*Q_syn */ IF( EQ_16( THRES, 8 ) ) { L_tmp1 = L_shl( Mpy_32_16_1( L_mean, 32767 ), 3 ); Loading Loading @@ -877,7 +877,7 @@ void calc_norm_envelop_fx( } envelope[env_index] = L_tmp; move32(); env_index = add( env_index, 1 ); env_index++; } i = 0; Loading @@ -896,7 +896,7 @@ void calc_norm_envelop_fx( } envelope[env_index] = L_tmp; move32(); env_index = add( env_index, 1 ); env_index++; i = add( i, 1 ); } Loading lib_com/tools_fx.c +10 −10 Original line number Diff line number Diff line Loading @@ -423,22 +423,22 @@ Word32 sum_32_fx( const Word16 lvec, /* i : length of input vector */ Word16 *e ) { Word16 i; Word32 tmp; Word16 i, shift; Word64 tmp = 0; move64(); Word32 ans; tmp = 0; Word16 exp = 0; move32(); move16(); FOR( i = 0; i < lvec; i++ ) { tmp = BASOP_Util_Add_Mant32Exp( tmp, exp, vec[i], *e, &exp ); tmp = W_add( tmp, vec[i] ); // e } *e = exp; shift = W_norm( tmp ); tmp = W_shl( tmp, shift ); // shift + (31 - e) ans = W_extract_h( tmp ); // shift + (31 - e) - 32 *e = add( sub( *e, shift ), 32 ); move16(); return tmp; return ans; } Word32 sum2_fx_mod( /* o : sum of all squared vector elements Q(2x+1 -5)*/ Loading lib_dec/ivas_stereo_icbwe_dec.c +2 −2 Original line number Diff line number Diff line Loading @@ -1392,7 +1392,7 @@ void stereo_icBWE_dec_fx( tmp = shl( tmp, 2 ); icbweM2Ref_fx = Sqrt16( sub( 16384, tmp ), &temp1_fx ); icbweM2Ref_fx = BASOP_Util_Divide1616_Scale( icbweM2Ref_fx, ratio_L_fx, &temp2_fx ); icbweM2Ref_fx = shl( icbweM2Ref_fx, add( temp1_fx, sub( temp2_fx, 1 ) ) ); // Q14 icbweM2Ref_fx = shl_sat( icbweM2Ref_fx, add( temp1_fx, sub( temp2_fx, 1 ) ) ); // Q14 } ELSE { Loading Loading @@ -1421,7 +1421,7 @@ void stereo_icBWE_dec_fx( tmp = shl( tmp, 2 ); icbweM2Ref_fx = Sqrt16( sub( 16384, tmp ), &temp1_fx ); icbweM2Ref_fx = BASOP_Util_Divide1616_Scale( icbweM2Ref_fx, sub( 32767, ratio_L_fx ), &temp2_fx ); icbweM2Ref_fx = shl( icbweM2Ref_fx, add( temp2_fx, sub( temp1_fx, 1 ) ) ); // Q14 icbweM2Ref_fx = shl_sat( icbweM2Ref_fx, add( temp2_fx, sub( temp1_fx, 1 ) ) ); // Q14 } ELSE { Loading lib_enc/cod_tcx.c +2 −2 Original line number Diff line number Diff line Loading @@ -278,7 +278,7 @@ void TNSAnalysisStereo_fx( * both filters for the decision */ meanPredictionGain_fx = add( shr( pFilter[0]->predictionGain, 1 ), shr( pFilter[1]->predictionGain, 1 ) ); // Q7 meanPredictionGain_fx = mac_r( L_mult( pFilter[0]->predictionGain, 16384 ), pFilter[1]->predictionGain, 16384 ); // Q7 maxPredictionGain_fx = s_max( maxPredictionGain_fx, meanPredictionGain_fx ); // Q7 test(); Loading Loading
lib_com/ivas_qspherical_com.c +19 −0 Original line number Diff line number Diff line Loading @@ -50,7 +50,25 @@ * ivas_qmetadata_reorder_generic() * *------------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED UWord16 ivas_qmetadata_reorder_generic( const Word16 signed_value ) { UWord16 unsigned_value; IF( signed_value < 0 ) { // unsigned_value = ( ( UWord16 ) - ( signed_value + 1 ) << 1 ) + 1; unsigned_value = (UWord16) L_add( L_shl( negate( add( signed_value, 1 ) ), 1 ), 1 ); } ELSE { unsigned_value = (UWord16) L_shl( signed_value, 1 ); } return unsigned_value; } #else uint16_t ivas_qmetadata_reorder_generic( const int16_t signed_value ) { Loading @@ -67,6 +85,7 @@ uint16_t ivas_qmetadata_reorder_generic( return unsigned_value; } #endif /*------------------------------------------------------------------------- Loading
lib_com/swb_bwe_com_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -543,7 +543,7 @@ void calc_normal_length_fx( pit++; } L_tmp = L_mult0( peak, add( 15, THRES ) ); /*Q_syn */ L_tmp = L_mult0( peak, 15 + THRES ); /*Q_syn */ IF( EQ_16( THRES, 8 ) ) { L_tmp1 = L_shl( Mpy_32_16_1( L_mean, 32767 ), 3 ); Loading Loading @@ -877,7 +877,7 @@ void calc_norm_envelop_fx( } envelope[env_index] = L_tmp; move32(); env_index = add( env_index, 1 ); env_index++; } i = 0; Loading @@ -896,7 +896,7 @@ void calc_norm_envelop_fx( } envelope[env_index] = L_tmp; move32(); env_index = add( env_index, 1 ); env_index++; i = add( i, 1 ); } Loading
lib_com/tools_fx.c +10 −10 Original line number Diff line number Diff line Loading @@ -423,22 +423,22 @@ Word32 sum_32_fx( const Word16 lvec, /* i : length of input vector */ Word16 *e ) { Word16 i; Word32 tmp; Word16 i, shift; Word64 tmp = 0; move64(); Word32 ans; tmp = 0; Word16 exp = 0; move32(); move16(); FOR( i = 0; i < lvec; i++ ) { tmp = BASOP_Util_Add_Mant32Exp( tmp, exp, vec[i], *e, &exp ); tmp = W_add( tmp, vec[i] ); // e } *e = exp; shift = W_norm( tmp ); tmp = W_shl( tmp, shift ); // shift + (31 - e) ans = W_extract_h( tmp ); // shift + (31 - e) - 32 *e = add( sub( *e, shift ), 32 ); move16(); return tmp; return ans; } Word32 sum2_fx_mod( /* o : sum of all squared vector elements Q(2x+1 -5)*/ Loading
lib_dec/ivas_stereo_icbwe_dec.c +2 −2 Original line number Diff line number Diff line Loading @@ -1392,7 +1392,7 @@ void stereo_icBWE_dec_fx( tmp = shl( tmp, 2 ); icbweM2Ref_fx = Sqrt16( sub( 16384, tmp ), &temp1_fx ); icbweM2Ref_fx = BASOP_Util_Divide1616_Scale( icbweM2Ref_fx, ratio_L_fx, &temp2_fx ); icbweM2Ref_fx = shl( icbweM2Ref_fx, add( temp1_fx, sub( temp2_fx, 1 ) ) ); // Q14 icbweM2Ref_fx = shl_sat( icbweM2Ref_fx, add( temp1_fx, sub( temp2_fx, 1 ) ) ); // Q14 } ELSE { Loading Loading @@ -1421,7 +1421,7 @@ void stereo_icBWE_dec_fx( tmp = shl( tmp, 2 ); icbweM2Ref_fx = Sqrt16( sub( 16384, tmp ), &temp1_fx ); icbweM2Ref_fx = BASOP_Util_Divide1616_Scale( icbweM2Ref_fx, sub( 32767, ratio_L_fx ), &temp2_fx ); icbweM2Ref_fx = shl( icbweM2Ref_fx, add( temp2_fx, sub( temp1_fx, 1 ) ) ); // Q14 icbweM2Ref_fx = shl_sat( icbweM2Ref_fx, add( temp2_fx, sub( temp1_fx, 1 ) ) ); // Q14 } ELSE { Loading
lib_enc/cod_tcx.c +2 −2 Original line number Diff line number Diff line Loading @@ -278,7 +278,7 @@ void TNSAnalysisStereo_fx( * both filters for the decision */ meanPredictionGain_fx = add( shr( pFilter[0]->predictionGain, 1 ), shr( pFilter[1]->predictionGain, 1 ) ); // Q7 meanPredictionGain_fx = mac_r( L_mult( pFilter[0]->predictionGain, 16384 ), pFilter[1]->predictionGain, 16384 ); // Q7 maxPredictionGain_fx = s_max( maxPredictionGain_fx, meanPredictionGain_fx ); // Q7 test(); Loading